|
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 $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(C)'` |
|
69 $ hg prune -qd '0 0' . |
|
70 $ hg log -G --hidden |
|
71 x 7f7f229b13a6 (draft): C |
|
72 | |
|
73 | o 35b183996678 (draft): B |
|
74 |/ |
|
75 | x f5bc6836db60 (draft): A |
|
76 |/ |
|
77 @ a9bdc8b26820 (public): O |
|
78 |
|
79 $ inspect_obsmarkers |
|
80 obsstore content |
|
81 ================ |
|
82 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
83 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
84 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
85 obshashtree |
|
86 =========== |
|
87 a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 a9c02d134f5b98acc74d1dc4eb28fd59f958a2bd |
|
88 f5bc6836db60e308a17ba08bf050154ba9c4fad7 619b4d13bd9878f04d7208dcfcf1e89da826f6be |
|
89 35b1839966785d5703a01607229eea932db42f87 ddeb7b7a87378f59cecb36d5146df0092b6b3327 |
|
90 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 58ef2e726c5bd89bceffb6243294b38eadbf3d60 |
|
91 obshashrange |
|
92 ============ |
|
93 rev node index size depth obshash |
|
94 2 35b183996678 0 2 2 2a098b4a877f |
|
95 2 35b183996678 1 1 2 916e804c50de |
|
96 0 a9bdc8b26820 0 1 1 a9c02d134f5b |
|
97 $ cd .. |
|
98 $ cd .. |
|
99 |
|
100 Actual Test |
|
101 ----------- |
|
102 |
|
103 $ dotest C.4 O |
|
104 ## Running testcase C.4 |
|
105 # testing echange of "O" (a9bdc8b26820) |
|
106 ## initial state |
|
107 # obstore: main |
|
108 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
109 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
110 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
111 # obstore: pushdest |
|
112 # obstore: pulldest |
|
113 ## pushing "O" from main to pushdest |
|
114 pushing to pushdest |
|
115 searching for changes |
|
116 no changes found |
|
117 remote: 2 new obsolescence markers |
|
118 ## post push state |
|
119 # obstore: main |
|
120 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
121 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
122 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
123 # obstore: pushdest |
|
124 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
125 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
126 # obstore: pulldest |
|
127 ## pulling "a9bdc8b26820" from main into pulldest |
|
128 pulling from main |
|
129 no changes found |
|
130 2 new obsolescence markers |
|
131 ## post pull state |
|
132 # obstore: main |
|
133 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
134 f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
135 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
136 # obstore: pushdest |
|
137 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
138 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
139 # obstore: pulldest |
|
140 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
141 f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |