comparison tests/test-exchange-obsmarkers-case-A1.t @ 2268:f2ebe960998b stable

tests: update test to match upstreamable version Name have been clarified, documentation has been updated and some test-case have been updated to match the intended test.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Sat, 08 Apr 2017 12:48:20 +0200
parents tests/test-exchange-A1.t@a202f3af890c
children 67b59d1657cf 8feb2cae7eae
comparison
equal deleted inserted replaced
2267:150fee60887a 2268:f2ebe960998b
1 ============================================
2 Testing obsolescence markers push: Cases A.1
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 A: simple cases
13 TestCase 1: pushing a single head
14 Subcases:
15 # A.1.1 pushing a single head (2 variants)
16 # A.1.2 pushing multiple changesets into a single head (2 variants)
17
18 Case: A.1.1 pushing a single head
19 =================================
20 ..
21 .. {{{
22 .. ⇠◔ A
23 .. |
24 .. ● O
25 .. }}}
26 ..
27 .. Marker exists from:
28 ..
29 .. * A
30 ..
31 .. Commands run:
32 ..
33 .. * hg push -r A
34 .. * hg push
35 ..
36 .. Expected exchange:
37 ..
38 .. * chain from A
39
40 Setup
41 -----
42
43 $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
44
45 initial
46
47 $ setuprepos A.1.1
48 creating test repo for test case A.1.1
49 - pulldest
50 - main
51 - pushdest
52 cd into `main` and proceed with env setup
53 $ cd main
54 $ mkcommit A
55 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'`
56 $ hg log -G
57 @ f5bc6836db60 (draft): A
58 |
59 o a9bdc8b26820 (public): O
60
61 $ inspect_obsmarkers
62 obsstore content
63 ================
64 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
65 obshashtree
66 ===========
67 a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
68 f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
69 obshashrange
70 ============
71 rev node index size depth obshash
72 1 f5bc6836db60 0 2 2 50656e04a95e
73 0 a9bdc8b26820 0 1 1 000000000000
74 1 f5bc6836db60 1 1 2 50656e04a95e
75 $ cd ..
76 $ cd ..
77
78 setup both variants
79
80 $ cp -R A.1.1 A.1.1.a
81 $ cp -R A.1.1 A.1.1.b
82
83 Variant a: push -r A
84 --------------------
85
86 $ dotest A.1.1.a A
87 ## Running testcase A.1.1.a
88 # testing echange of "A" (f5bc6836db60)
89 ## initial state
90 # obstore: main
91 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
92 # obstore: pushdest
93 # obstore: pulldest
94 ## pushing "A" from main to pushdest
95 pushing to pushdest
96 searching for changes
97 remote: adding changesets
98 remote: adding manifests
99 remote: adding file changes
100 remote: added 1 changesets with 1 changes to 1 files
101 remote: 1 new obsolescence markers
102 ## post push state
103 # obstore: main
104 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
105 # obstore: pushdest
106 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
107 # obstore: pulldest
108 ## pulling "f5bc6836db60" from main into pulldest
109 pulling from main
110 searching for changes
111 adding changesets
112 adding manifests
113 adding file changes
114 added 1 changesets with 1 changes to 1 files
115 1 new obsolescence markers
116 (run 'hg update' to get a working copy)
117 ## post pull state
118 # obstore: main
119 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
120 # obstore: pushdest
121 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
122 # obstore: pulldest
123 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
124
125 Variant b: push
126 ---------------
127
128 $ dotest A.1.1.b
129 ## Running testcase A.1.1.b
130 ## initial state
131 # obstore: main
132 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
133 # obstore: pushdest
134 # obstore: pulldest
135 ## pushing from main to pushdest
136 pushing to pushdest
137 searching for changes
138 remote: adding changesets
139 remote: adding manifests
140 remote: adding file changes
141 remote: added 1 changesets with 1 changes to 1 files
142 remote: 1 new obsolescence markers
143 ## post push state
144 # obstore: main
145 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
146 # obstore: pushdest
147 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
148 # obstore: pulldest
149 ## pulling from main into pulldest
150 pulling from main
151 searching for changes
152 adding changesets
153 adding manifests
154 adding file changes
155 added 1 changesets with 1 changes to 1 files
156 1 new obsolescence markers
157 (run 'hg update' to get a working copy)
158 ## post pull state
159 # obstore: main
160 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
161 # obstore: pushdest
162 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
163 # obstore: pulldest
164 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
165
166 A.1.2 pushing multiple changesets into a single head
167 ====================================================
168
169 .. {{{
170 .. ◔ B
171 .. |
172 .. ⇠◔ A
173 .. |
174 .. ● O
175 .. }}}
176 ..
177 .. Marker exist from:
178 ..
179 .. * A
180 ..
181 .. Command run:
182 ..
183 .. * hg push -r B
184 .. * hg push
185 ..
186 .. Expected exchange:
187 ..
188 .. * chain from A
189
190 Setup
191 -----
192
193 initial
194
195 $ setuprepos A.1.2
196 creating test repo for test case A.1.2
197 - pulldest
198 - main
199 - pushdest
200 cd into `main` and proceed with env setup
201 $ cd main
202 $ mkcommit A
203 $ mkcommit B
204 $ hg log -G
205 @ f6fbb35d8ac9 (draft): B
206 |
207 o f5bc6836db60 (draft): A
208 |
209 o a9bdc8b26820 (public): O
210
211 $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'`
212 $ inspect_obsmarkers
213 obsstore content
214 ================
215 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
216 obshashtree
217 ===========
218 a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
219 f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
220 f6fbb35d8ac958bbe70035e4c789c18471cdc0af 9cfa25b36856aa720419146abddd011cf87d368c
221 obshashrange
222 ============
223 rev node index size depth obshash
224 2 f6fbb35d8ac9 0 3 3 000000000000
225 1 f5bc6836db60 0 2 2 50656e04a95e
226 0 a9bdc8b26820 0 1 1 000000000000
227 1 f5bc6836db60 1 1 2 50656e04a95e
228 2 f6fbb35d8ac9 2 1 3 000000000000
229 $ cd ..
230 $ cd ..
231
232 setup both variants
233
234 $ cp -R A.1.2 A.1.2.a
235 $ cp -R A.1.2 A.1.2.b
236
237 Variant a: push -r A
238 --------------------
239
240 $ dotest A.1.2.a B
241 ## Running testcase A.1.2.a
242 # testing echange of "B" (f6fbb35d8ac9)
243 ## initial state
244 # obstore: main
245 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
246 # obstore: pushdest
247 # obstore: pulldest
248 ## pushing "B" from main to pushdest
249 pushing to pushdest
250 searching for changes
251 remote: adding changesets
252 remote: adding manifests
253 remote: adding file changes
254 remote: added 2 changesets with 2 changes to 2 files
255 remote: 1 new obsolescence markers
256 ## post push state
257 # obstore: main
258 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
259 # obstore: pushdest
260 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
261 # obstore: pulldest
262 ## pulling "f6fbb35d8ac9" from main into pulldest
263 pulling from main
264 searching for changes
265 adding changesets
266 adding manifests
267 adding file changes
268 added 2 changesets with 2 changes to 2 files
269 1 new obsolescence markers
270 (run 'hg update' to get a working copy)
271 ## post pull state
272 # obstore: main
273 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
274 # obstore: pushdest
275 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
276 # obstore: pulldest
277 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
278
279 Variant b: push
280 ---------------
281
282 $ dotest A.1.2.b
283 ## Running testcase A.1.2.b
284 ## initial state
285 # obstore: main
286 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
287 # obstore: pushdest
288 # obstore: pulldest
289 ## pushing from main to pushdest
290 pushing to pushdest
291 searching for changes
292 remote: adding changesets
293 remote: adding manifests
294 remote: adding file changes
295 remote: added 2 changesets with 2 changes to 2 files
296 remote: 1 new obsolescence markers
297 ## post push state
298 # obstore: main
299 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
300 # obstore: pushdest
301 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
302 # obstore: pulldest
303 ## pulling from main into pulldest
304 pulling from main
305 searching for changes
306 adding changesets
307 adding manifests
308 adding file changes
309 added 2 changesets with 2 changes to 2 files
310 1 new obsolescence markers
311 (run 'hg update' to get a working copy)
312 ## post pull state
313 # obstore: main
314 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
315 # obstore: pushdest
316 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
317 # obstore: pulldest
318 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}