equal
deleted
inserted
replaced
1 #testcases flat tree |
1 #testcases flat tree |
2 $ . "$TESTDIR/narrow-library.sh" |
2 $ . "$TESTDIR/narrow-library.sh" |
|
3 |
|
4 $ cat >> $HGRCPATH <<EOF |
|
5 > [alias] |
|
6 > l = log -G -T "{if(ellipsis, '...')}{rev}: {desc}\n" |
|
7 > EOF |
3 |
8 |
4 #if tree |
9 #if tree |
5 $ cat << EOF >> $HGRCPATH |
10 $ cat << EOF >> $HGRCPATH |
6 > [experimental] |
11 > [experimental] |
7 > treemanifest = 1 |
12 > treemanifest = 1 |
74 $ hg commit -m 'add outside2' |
79 $ hg commit -m 'add outside2' |
75 |
80 |
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 |
91 Widen the narrow spec to see the widest file. This should not get the newly |
104 Widen the narrow spec to see the widest file. This should not get the newly |
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 |
98 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob) |
116 saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-widen.hg (glob) |
99 adding changesets |
117 adding changesets |
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 |
106 |
131 |
107 $ cat widest/f |
132 $ cat widest/f |
128 $ cat widest/f |
153 $ cat widest/f |
129 widest v3 |
154 widest v3 |
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 |
145 $ hg tracked --addinclude 'widest |
178 $ hg tracked --addinclude 'widest |
146 > ' |
179 > ' |
178 $ hg update 'desc("update widest v4")' |
211 $ hg update 'desc("update widest v4")' |
179 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
212 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
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. |
195 |
236 |
196 $ cd .. |
237 $ cd .. |
243 checking manifests |
284 checking manifests |
244 checking directory manifests (tree !) |
285 checking directory manifests (tree !) |
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 |
260 saved backup bundle to $TESTTMP/narrow2/.hg/strip-backup/*-widen.hg (glob) |
309 saved backup bundle to $TESTTMP/narrow2/.hg/strip-backup/*-widen.hg (glob) |
261 adding changesets |
310 adding changesets |
266 I path:d0 |
315 I path:d0 |
267 I path:d1 |
316 I path:d1 |
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 |
284 $ hg verify |
342 $ hg verify |
285 checking changesets |
343 checking changesets |
292 Widening preserves parent of local commit |
350 Widening preserves parent of local commit |
293 |
351 |
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 |
310 $ cd .. |
394 $ cd .. |
311 $ hg clone -q --narrow ssh://user@dummy/upstream narrow-bookmarks --include d4 |
395 $ hg clone -q --narrow ssh://user@dummy/upstream narrow-bookmarks --include d4 |
326 $ cd .. |
410 $ cd .. |
327 $ hg clone -q --narrow ssh://user@dummy/upstream interrupted --include d0 |
411 $ hg clone -q --narrow ssh://user@dummy/upstream interrupted --include d0 |
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 |
338 searching for changes |
425 searching for changes |
339 saved backup bundle to $TESTTMP/interrupted/.hg/strip-backup/*-widen.hg (glob) |
426 saved backup bundle to $TESTTMP/interrupted/.hg/strip-backup/*-widen.hg (glob) |
342 adding file changes |
429 adding file changes |
343 transaction abort! |
430 transaction abort! |
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 |
351 adding changesets |
438 adding changesets |
352 adding manifests |
439 adding manifests |
353 adding file changes |
440 adding file changes |
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) |