Debian Codegraph @

tests/test-exchange-obsmarkers-case-C4.t

raw
1 ============================================
2 Testing obsolescence markers push: Cases C.4
3 ============================================
4
5 Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of
6 all changesets that requested to be "in sync" after the push (even if they are
7 already on both side).
8
9 This test belongs to a series of tests checking such set is properly computed
10 and applied. This does not tests "obsmarkers" discovery capabilities.
11
12 Category C: advanced case
13 TestCase 4: multiple successors, one is pruned
14
15 C.4 multiple successors, one is pruned
16 ======================================
17
18 .. (A similarish situation can appends with split markers see the Z section)
19 ..
20 .. {{{
21 .. A
22 .. B ○⇢ø⇠⊗ C
23 .. \|/
24 .. ● O
25 .. }}}
26 ..
27 .. Marker exist from:
28 ..
29 .. * `A ø⇠○ B`
30 .. * `A ø⇠○ C`
31 .. * C (prune)
32 ..
33 .. Command run:
34 ..
35 .. * hg push -r O
36 ..
37 .. Expected exchange:
38 ..
39 .. * `A ø⇠○ C`
40 .. * C (prune)
41 ..
42 .. Expected exclude:
43 ..
44 .. * `A ø⇠○ B`
45
46 Setup
47 -----
48
49 $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
50
51 Implemented as the non-split version
52
53 $ setuprepos C.4
54 creating test repo for test case C.4
55 - pulldest
56 - main
57 - pushdest
58 cd into `main` and proceed with env setup
59 $ cd main
60 $ mkcommit A
61 $ hg update -q 0
62 $ mkcommit B
63 created new head
64 $ hg update -q 0
65 $ mkcommit C
66 created new head
67 $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(B)'`
68 1 new obsolescence markers
69 obsoleted 1 changesets
70 $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(C)'`
71 1 new obsolescence markers
72 2 new content-divergent changesets
73 $ hg prune -qd '0 0' .
74 $ hg log -G --hidden
75 x 7f7f229b13a6 (draft): C
76 |
77 | o 35b183996678 (draft): B
78 |/
79 | x f5bc6836db60 (draft): A
80 |/
81 @ a9bdc8b26820 (public): O
82
83 $ inspect_obsmarkers
84 obsstore content
85 ================
86 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
87 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
88 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
89 $ cd ..
90 $ cd ..
91
92 Actual Test
93 -----------
94
95 $ dotest C.4 O
96 ## Running testcase C.4
97 # testing echange of "O" (a9bdc8b26820)
98 ## initial state
99 # obstore: main
100 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
101 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
102 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
103 # obstore: pushdest
104 # obstore: pulldest
105 ## pushing "O" from main to pushdest
106 pushing to pushdest
107 searching for changes
108 no changes found
109 remote: 2 new obsolescence markers
110 ## post push state
111 # obstore: main
112 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
113 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
114 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
115 # obstore: pushdest
116 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
117 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
118 # obstore: pulldest
119 ## pulling "a9bdc8b26820" from main into pulldest
120 pulling from main
121 no changes found
122 2 new obsolescence markers
123 ## post pull state
124 # obstore: main
125 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
126 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
127 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
128 # obstore: pushdest
129 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
130 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
131 # obstore: pulldest
132 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
133 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}