|
1 ============================================ |
|
2 Testing obsolescence markers push: Cases C.2 |
|
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 2: Pruned changeset on precursors |
|
14 Variants: |
|
15 # a: explicite push |
|
16 # b: bare push |
|
17 |
|
18 C.2 Pruned changeset on precursors |
|
19 ================================== |
|
20 |
|
21 .. {{{ |
|
22 .. B ⊗ |
|
23 .. | |
|
24 .. A ø⇠◔ A' |
|
25 .. |/ |
|
26 .. ● O |
|
27 .. }}} |
|
28 .. |
|
29 .. Marker exist from: |
|
30 .. |
|
31 .. * A' succeed to A |
|
32 .. * B (prune) |
|
33 .. |
|
34 .. Command run: |
|
35 .. |
|
36 .. * hg push -r A' |
|
37 .. * hg push |
|
38 .. |
|
39 .. Expected exchange: |
|
40 .. |
|
41 .. * `A ø⇠o A'` |
|
42 .. * B (prune) |
|
43 |
|
44 Setup |
|
45 ----- |
|
46 |
|
47 $ . $TESTDIR/testlib/exchange-obsmarker-util.sh |
|
48 |
|
49 Itinial |
|
50 |
|
51 $ setuprepos C.2 |
|
52 creating test repo for test case C.2 |
|
53 - pulldest |
|
54 - main |
|
55 - pushdest |
|
56 cd into `main` and proceed with env setup |
|
57 $ cd main |
|
58 $ mkcommit A0 |
|
59 $ mkcommit B |
|
60 $ hg prune -qd '0 0' . |
|
61 $ hg update -q 0 |
|
62 $ mkcommit A1 |
|
63 created new head |
|
64 $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` |
|
65 $ hg log -G --hidden |
|
66 @ e5ea8f9c7314 (draft): A1 |
|
67 | |
|
68 | x 06055a7959d4 (draft): B |
|
69 | | |
|
70 | x 28b51eb45704 (draft): A0 |
|
71 |/ |
|
72 o a9bdc8b26820 (public): O |
|
73 |
|
74 $ inspect_obsmarkers |
|
75 obsstore content |
|
76 ================ |
|
77 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
78 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
79 obshashtree |
|
80 =========== |
|
81 a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 |
|
82 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 72f95b7b9fa12243aeb90433d211f2c38263da31 |
|
83 06055a7959d4128e6e3bccfd01482e83a2db8a3a 58ecf9a107b10986d88da605eb0d03b7f24ae486 |
|
84 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646 |
|
85 obshashrange |
|
86 ============ |
|
87 rev node index size depth obshash |
|
88 3 e5ea8f9c7314 0 2 2 289cb0d058c8 |
|
89 0 a9bdc8b26820 0 1 1 000000000000 |
|
90 3 e5ea8f9c7314 1 1 2 289cb0d058c8 |
|
91 $ cd .. |
|
92 $ cd .. |
|
93 |
|
94 $ cp -R C.2 C.2.a |
|
95 $ cp -R C.2 C.2.b |
|
96 |
|
97 Actual Test (explicit push) |
|
98 --------------------------- |
|
99 |
|
100 $ dotest C.2.a A1 |
|
101 ## Running testcase C.2.a |
|
102 # testing echange of "A1" (e5ea8f9c7314) |
|
103 ## initial state |
|
104 # obstore: main |
|
105 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
106 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
107 # obstore: pushdest |
|
108 # obstore: pulldest |
|
109 ## pushing "A1" from main to pushdest |
|
110 pushing to pushdest |
|
111 searching for changes |
|
112 remote: adding changesets |
|
113 remote: adding manifests |
|
114 remote: adding file changes |
|
115 remote: added 1 changesets with 1 changes to 1 files |
|
116 remote: 2 new obsolescence markers |
|
117 ## post push state |
|
118 # obstore: main |
|
119 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
120 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
121 # obstore: pushdest |
|
122 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
123 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
124 # obstore: pulldest |
|
125 ## pulling "e5ea8f9c7314" from main into pulldest |
|
126 pulling from main |
|
127 searching for changes |
|
128 adding changesets |
|
129 adding manifests |
|
130 adding file changes |
|
131 added 1 changesets with 1 changes to 1 files |
|
132 2 new obsolescence markers |
|
133 (run 'hg update' to get a working copy) |
|
134 ## post pull state |
|
135 # obstore: main |
|
136 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
137 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
138 # obstore: pushdest |
|
139 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
140 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
141 # obstore: pulldest |
|
142 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
143 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
144 |
|
145 Actual Test (bare push) |
|
146 ------------------------------------- |
|
147 |
|
148 $ dotest C.2.b |
|
149 ## Running testcase C.2.b |
|
150 ## initial state |
|
151 # obstore: main |
|
152 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
153 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
154 # obstore: pushdest |
|
155 # obstore: pulldest |
|
156 ## pushing from main to pushdest |
|
157 pushing to pushdest |
|
158 searching for changes |
|
159 remote: adding changesets |
|
160 remote: adding manifests |
|
161 remote: adding file changes |
|
162 remote: added 1 changesets with 1 changes to 1 files |
|
163 remote: 2 new obsolescence markers |
|
164 ## post push state |
|
165 # obstore: main |
|
166 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
167 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
168 # obstore: pushdest |
|
169 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
170 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
171 # obstore: pulldest |
|
172 ## pulling from main into pulldest |
|
173 pulling from main |
|
174 searching for changes |
|
175 adding changesets |
|
176 adding manifests |
|
177 adding file changes |
|
178 added 1 changesets with 1 changes to 1 files |
|
179 2 new obsolescence markers |
|
180 (run 'hg update' to get a working copy) |
|
181 ## post pull state |
|
182 # obstore: main |
|
183 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
184 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
185 # obstore: pushdest |
|
186 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
187 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
188 # obstore: pulldest |
|
189 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
190 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |