##// END OF EJS Templates
tests: show graph log before and after widening in more cases...
Martin von Zweigbergk -
r43516:a151606a default draft
parent child Browse files
Show More
@@ -1,6 +1,11 b''
1 #testcases flat tree
1 #testcases flat tree
2 $ . "$TESTDIR/narrow-library.sh"
2 $ . "$TESTDIR/narrow-library.sh"
3
3
4 $ cat >> $HGRCPATH <<EOF
5 > [alias]
6 > l = log -G -T "{if(ellipsis, '...')}{rev}: {desc}\n"
7 > EOF
8
4 #if tree
9 #if tree
5 $ cat << EOF >> $HGRCPATH
10 $ cat << EOF >> $HGRCPATH
6 > [experimental]
11 > [experimental]
@@ -76,15 +81,23 b' add more upstream files which we will in'
76 $ echo 'widest v4' > widest/f
81 $ echo 'widest v4' > widest/f
77 $ hg commit -m 'update widest v4'
82 $ hg commit -m 'update widest v4'
78
83
79 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
84 $ hg l
80 7: update widest v4
85 @ 7: update widest v4
81 6: add outside2
86 |
82 5: update inside
87 o 6: add outside2
83 4: update widest v3
88 |
84 3: add wider, update widest
89 o 5: update inside
85 2: add outside
90 |
86 1: add widest
91 o 4: update widest v3
87 0: add inside
92 |
93 o 3: add wider, update widest
94 |
95 o 2: add outside
96 |
97 o 1: add widest
98 |
99 o 0: add inside
100
88
101
89 $ cd ..
102 $ cd ..
90
103
@@ -92,6 +105,11 b' Widen the narrow spec to see the widest '
92 added upstream revisions.
105 added upstream revisions.
93
106
94 $ cd narrow
107 $ cd narrow
108 $ hg l
109 @ ...1: add outside
110 |
111 o 0: add inside
112
95 $ hg tracked --addinclude widest/f
113 $ hg tracked --addinclude widest/f
96 comparing with ssh://user@dummy/master
114 comparing with ssh://user@dummy/master
97 searching for changes
115 searching for changes
@@ -100,6 +118,13 b' added upstream revisions.'
100 adding manifests
118 adding manifests
101 adding file changes
119 adding file changes
102 added 3 changesets with 2 changes to 2 files
120 added 3 changesets with 2 changes to 2 files
121 $ hg l
122 @ ...2: add outside
123 |
124 o 1: add widest
125 |
126 o 0: add inside
127
103 $ hg tracked
128 $ hg tracked
104 I path:inside
129 I path:inside
105 I path:widest/f
130 I path:widest/f
@@ -130,15 +155,23 b' Pull down the newly added upstream revis'
130 $ cat inside/f
155 $ cat inside/f
131 inside v2
156 inside v2
132
157
133 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
158 $ hg l
134 7: update widest v4
159 o 7: update widest v4
135 ...6: add outside2
160 |
136 5: update inside
161 o ...6: add outside2
137 4: update widest v3
162 |
138 3: add wider, update widest
163 @ 5: update inside
139 ...2: add outside
164 |
140 1: add widest
165 o 4: update widest v3
141 0: add inside
166 |
167 o 3: add wider, update widest
168 |
169 o ...2: add outside
170 |
171 o 1: add widest
172 |
173 o 0: add inside
174
142
175
143 Check that widening with a newline fails
176 Check that widening with a newline fails
144
177
@@ -180,15 +213,23 b' widen the narrow spec to include the wid'
180 $ cat widest/f
213 $ cat widest/f
181 widest v4
214 widest v4
182
215
183 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
216 $ hg l
184 7: update widest v4
217 @ 7: update widest v4
185 ...6: add outside2
218 |
186 5: update inside
219 o ...6: add outside2
187 4: update widest v3
220 |
188 3: add wider, update widest
221 o 5: update inside
189 ...2: add outside
222 |
190 1: add widest
223 o 4: update widest v3
191 0: add inside
224 |
225 o 3: add wider, update widest
226 |
227 o ...2: add outside
228 |
229 o 1: add widest
230 |
231 o 0: add inside
232
192
233
193 separate suite of tests: files from 0-10 modified in changes 0-10. This allows
234 separate suite of tests: files from 0-10 modified in changes 0-10. This allows
194 more obvious precise tests tickling particular corner cases.
235 more obvious precise tests tickling particular corner cases.
@@ -245,15 +286,23 b' make narrow clone with every third node.'
245 crosschecking files in changesets and manifests
286 crosschecking files in changesets and manifests
246 checking files
287 checking files
247 checked 8 changesets with 4 changes to 4 files
288 checked 8 changesets with 4 changes to 4 files
248 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
289 $ hg l
249 ...7: add d10/f
290 @ ...7: add d10/f
250 6: add d9/f
291 |
251 ...5: add d8/f
292 o 6: add d9/f
252 4: add d6/f
293 |
253 ...3: add d5/f
294 o ...5: add d8/f
254 2: add d3/f
295 |
255 ...1: add d2/f
296 o 4: add d6/f
256 0: add d0/f
297 |
298 o ...3: add d5/f
299 |
300 o 2: add d3/f
301 |
302 o ...1: add d2/f
303 |
304 o 0: add d0/f
305
257 $ hg tracked --addinclude d1
306 $ hg tracked --addinclude d1
258 comparing with ssh://user@dummy/upstream
307 comparing with ssh://user@dummy/upstream
259 searching for changes
308 searching for changes
@@ -268,16 +317,25 b' make narrow clone with every third node.'
268 I path:d3
317 I path:d3
269 I path:d6
318 I path:d6
270 I path:d9
319 I path:d9
271 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
320 $ hg l
272 ...8: add d10/f
321 @ ...8: add d10/f
273 7: add d9/f
322 |
274 ...6: add d8/f
323 o 7: add d9/f
275 5: add d6/f
324 |
276 ...4: add d5/f
325 o ...6: add d8/f
277 3: add d3/f
326 |
278 ...2: add d2/f
327 o 5: add d6/f
279 1: add d1/f
328 |
280 0: add d0/f
329 o ...4: add d5/f
330 |
331 o 3: add d3/f
332 |
333 o ...2: add d2/f
334 |
335 o 1: add d1/f
336 |
337 o 0: add d0/f
338
281
339
282 Verify shouldn't claim the repo is corrupt after a widen.
340 Verify shouldn't claim the repo is corrupt after a widen.
283
341
@@ -294,16 +352,42 b' Widening preserves parent of local commi'
294 $ cd ..
352 $ cd ..
295 $ hg clone -q --narrow ssh://user@dummy/upstream narrow3 --include d2 -r 2
353 $ hg clone -q --narrow ssh://user@dummy/upstream narrow3 --include d2 -r 2
296 $ cd narrow3
354 $ cd narrow3
297 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
355 $ hg l
298 1: add d2/f
356 @ 1: add d2/f
299 ...0: add d1/f
357 |
358 o ...0: add d1/f
359
300 $ hg pull -q -r 3
360 $ hg pull -q -r 3
301 $ hg co -q tip
361 $ hg co -q tip
302 $ hg pull -q -r 4
362 $ hg pull -q -r 4
303 $ echo local > d2/f
363 $ echo local > d2/f
304 $ hg ci -m local
364 $ hg ci -m local
305 created new head
365 created new head
366 $ hg l
367 @ 4: local
368 |
369 | o ...3: add d4/f
370 |/
371 o ...2: add d3/f
372 |
373 o 1: add d2/f
374 |
375 o ...0: add d1/f
376
306 $ hg tracked -q --addinclude d0 --addinclude d9
377 $ hg tracked -q --addinclude d0 --addinclude d9
378 $ hg l
379 @ 5: local
380 |
381 | o ...4: add d4/f
382 |/
383 o ...3: add d3/f
384 |
385 o 2: add d2/f
386 |
387 o ...1: add d1/f
388 |
389 o 0: add d0/f
390
307
391
308 Widening preserves bookmarks
392 Widening preserves bookmarks
309
393
@@ -328,10 +412,13 b' Widening that fails can be recovered fro'
328 $ cd interrupted
412 $ cd interrupted
329 $ echo local > d0/f
413 $ echo local > d0/f
330 $ hg ci -m local
414 $ hg ci -m local
331 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
415 $ hg l
332 2: local
416 @ 2: local
333 ...1: add d10/f
417 |
334 0: add d0/f
418 o ...1: add d10/f
419 |
420 o 0: add d0/f
421
335 $ hg bookmarks bookmark
422 $ hg bookmarks bookmark
336 $ hg --config hooks.pretxnchangegroup.bad=false tracked --addinclude d1
423 $ hg --config hooks.pretxnchangegroup.bad=false tracked --addinclude d1
337 comparing with ssh://user@dummy/upstream
424 comparing with ssh://user@dummy/upstream
@@ -344,7 +431,7 b' Widening that fails can be recovered fro'
344 rollback completed
431 rollback completed
345 abort: pretxnchangegroup.bad hook exited with status 1
432 abort: pretxnchangegroup.bad hook exited with status 1
346 [255]
433 [255]
347 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
434 $ hg l
348 $ hg bookmarks
435 $ hg bookmarks
349 no bookmarks set
436 no bookmarks set
350 $ hg unbundle .hg/strip-backup/*-widen.hg
437 $ hg unbundle .hg/strip-backup/*-widen.hg
@@ -354,9 +441,12 b' Widening that fails can be recovered fro'
354 added 3 changesets with 2 changes to 1 files
441 added 3 changesets with 2 changes to 1 files
355 new changesets *:* (glob)
442 new changesets *:* (glob)
356 (run 'hg update' to get a working copy)
443 (run 'hg update' to get a working copy)
357 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n"
444 $ hg l
358 2: local
445 o 2: local
359 ...1: add d10/f
446 |
360 0: add d0/f
447 o ...1: add d10/f
448 |
449 o 0: add d0/f
450
361 $ hg bookmarks
451 $ hg bookmarks
362 * bookmark 2:* (glob)
452 * bookmark 2:* (glob)
General Comments 0
You need to be logged in to leave comments. Login now