##// END OF EJS Templates
tests: conditionalize test-treemanifest.t...
Gregory Szorc -
r37450:28ee8b28 default
parent child Browse files
Show More
@@ -1,878 +1,908 b''
1 1 #require killdaemons
2 2
3 3 $ cat << EOF >> $HGRCPATH
4 4 > [ui]
5 5 > ssh=$PYTHON "$TESTDIR/dummyssh"
6 6 > EOF
7 7
8 8 Set up repo
9 9
10 10 $ hg --config experimental.treemanifest=True init repo
11 11 $ cd repo
12 12
13 13 Requirements get set on init
14 14
15 15 $ grep treemanifest .hg/requires
16 16 treemanifest
17 17
18 18 Without directories, looks like any other repo
19 19
20 20 $ echo 0 > a
21 21 $ echo 0 > b
22 22 $ hg ci -Aqm initial
23 23 $ hg debugdata -m 0
24 24 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
25 25 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
26 26
27 27 Submanifest is stored in separate revlog
28 28
29 29 $ mkdir dir1
30 30 $ echo 1 > dir1/a
31 31 $ echo 1 > dir1/b
32 32 $ echo 1 > e
33 33 $ hg ci -Aqm 'add dir1'
34 34 $ hg debugdata -m 1
35 35 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
36 36 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
37 37 dir1\x008b3ffd73f901e83304c83d33132c8e774ceac44et (esc)
38 38 e\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
39 39 $ hg debugdata --dir dir1 0
40 40 a\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
41 41 b\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
42 42
43 43 Can add nested directories
44 44
45 45 $ mkdir dir1/dir1
46 46 $ echo 2 > dir1/dir1/a
47 47 $ echo 2 > dir1/dir1/b
48 48 $ mkdir dir1/dir2
49 49 $ echo 2 > dir1/dir2/a
50 50 $ echo 2 > dir1/dir2/b
51 51 $ hg ci -Aqm 'add dir1/dir1'
52 52 $ hg files -r .
53 53 a
54 54 b
55 55 dir1/a
56 56 dir1/b
57 57 dir1/dir1/a
58 58 dir1/dir1/b
59 59 dir1/dir2/a
60 60 dir1/dir2/b
61 61 e
62 62
63 63 The manifest command works
64 64
65 65 $ hg manifest
66 66 a
67 67 b
68 68 dir1/a
69 69 dir1/b
70 70 dir1/dir1/a
71 71 dir1/dir1/b
72 72 dir1/dir2/a
73 73 dir1/dir2/b
74 74 e
75 75
76 76 Revision is not created for unchanged directory
77 77
78 78 $ mkdir dir2
79 79 $ echo 3 > dir2/a
80 80 $ hg add dir2
81 81 adding dir2/a
82 82 $ hg debugindex --dir dir1 > before
83 83 $ hg ci -qm 'add dir2'
84 84 $ hg debugindex --dir dir1 > after
85 85 $ diff before after
86 86 $ rm before after
87 87
88 88 Removing directory does not create an revlog entry
89 89
90 90 $ hg rm dir1/dir1
91 91 removing dir1/dir1/a
92 92 removing dir1/dir1/b
93 93 $ hg debugindex --dir dir1/dir1 > before
94 94 $ hg ci -qm 'remove dir1/dir1'
95 95 $ hg debugindex --dir dir1/dir1 > after
96 96 $ diff before after
97 97 $ rm before after
98 98
99 99 Check that hg files (calls treemanifest.walk()) works
100 100 without loading all directory revlogs
101 101
102 102 $ hg co 'desc("add dir2")'
103 103 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
104 104 $ mv .hg/store/meta/dir2 .hg/store/meta/dir2-backup
105 105 $ hg files -r . dir1
106 106 dir1/a
107 107 dir1/b
108 108 dir1/dir1/a
109 109 dir1/dir1/b
110 110 dir1/dir2/a
111 111 dir1/dir2/b
112 112
113 113 Check that status between revisions works (calls treemanifest.matches())
114 114 without loading all directory revlogs
115 115
116 116 $ hg status --rev 'desc("add dir1")' --rev . dir1
117 117 A dir1/dir1/a
118 118 A dir1/dir1/b
119 119 A dir1/dir2/a
120 120 A dir1/dir2/b
121 121 $ mv .hg/store/meta/dir2-backup .hg/store/meta/dir2
122 122
123 123 Merge creates 2-parent revision of directory revlog
124 124
125 125 $ echo 5 > dir1/a
126 126 $ hg ci -Aqm 'modify dir1/a'
127 127 $ hg co '.^'
128 128 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
129 129 $ echo 6 > dir1/b
130 130 $ hg ci -Aqm 'modify dir1/b'
131 131 $ hg merge 'desc("modify dir1/a")'
132 132 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
133 133 (branch merge, don't forget to commit)
134 134 $ hg ci -m 'conflict-free merge involving dir1/'
135 135 $ cat dir1/a
136 136 5
137 137 $ cat dir1/b
138 138 6
139 139 $ hg debugindex --dir dir1
140 140 rev linkrev nodeid p1 p2
141 141 0 1 8b3ffd73f901 000000000000 000000000000
142 142 1 2 68e9d057c5a8 8b3ffd73f901 000000000000
143 143 2 4 4698198d2624 68e9d057c5a8 000000000000
144 144 3 5 44844058ccce 68e9d057c5a8 000000000000
145 145 4 6 bf3d9b744927 68e9d057c5a8 000000000000
146 146 5 7 dde7c0af2a03 bf3d9b744927 44844058ccce
147 147
148 148 Merge keeping directory from parent 1 does not create revlog entry. (Note that
149 149 dir1's manifest does change, but only because dir1/a's filelog changes.)
150 150
151 151 $ hg co 'desc("add dir2")'
152 152 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
153 153 $ echo 8 > dir2/a
154 154 $ hg ci -m 'modify dir2/a'
155 155 created new head
156 156
157 157 $ hg debugindex --dir dir2 > before
158 158 $ hg merge 'desc("modify dir1/a")'
159 159 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
160 160 (branch merge, don't forget to commit)
161 161 $ hg revert -r 'desc("modify dir2/a")' .
162 162 reverting dir1/a
163 163 $ hg ci -m 'merge, keeping parent 1'
164 164 $ hg debugindex --dir dir2 > after
165 165 $ diff before after
166 166 $ rm before after
167 167
168 168 Merge keeping directory from parent 2 does not create revlog entry. (Note that
169 169 dir2's manifest does change, but only because dir2/a's filelog changes.)
170 170
171 171 $ hg co 'desc("modify dir2/a")'
172 172 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
173 173 $ hg debugindex --dir dir1 > before
174 174 $ hg merge 'desc("modify dir1/a")'
175 175 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
176 176 (branch merge, don't forget to commit)
177 177 $ hg revert -r 'desc("modify dir1/a")' .
178 178 reverting dir2/a
179 179 $ hg ci -m 'merge, keeping parent 2'
180 180 created new head
181 181 $ hg debugindex --dir dir1 > after
182 182 $ diff before after
183 183 $ rm before after
184 184
185 185 Create flat source repo for tests with mixed flat/tree manifests
186 186
187 187 $ cd ..
188 188 $ hg init repo-flat
189 189 $ cd repo-flat
190 190
191 191 Create a few commits with flat manifest
192 192
193 193 $ echo 0 > a
194 194 $ echo 0 > b
195 195 $ echo 0 > e
196 196 $ for d in dir1 dir1/dir1 dir1/dir2 dir2
197 197 > do
198 198 > mkdir $d
199 199 > echo 0 > $d/a
200 200 > echo 0 > $d/b
201 201 > done
202 202 $ hg ci -Aqm initial
203 203
204 204 $ echo 1 > a
205 205 $ echo 1 > dir1/a
206 206 $ echo 1 > dir1/dir1/a
207 207 $ hg ci -Aqm 'modify on branch 1'
208 208
209 209 $ hg co 0
210 210 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
211 211 $ echo 2 > b
212 212 $ echo 2 > dir1/b
213 213 $ echo 2 > dir1/dir1/b
214 214 $ hg ci -Aqm 'modify on branch 2'
215 215
216 216 $ hg merge 1
217 217 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
218 218 (branch merge, don't forget to commit)
219 219 $ hg ci -m 'merge of flat manifests to new flat manifest'
220 220
221 221 $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log
222 222 $ cat hg.pid >> $DAEMON_PIDS
223 223
224 224 Create clone with tree manifests enabled
225 225
226 226 $ cd ..
227 227 $ hg clone --config experimental.treemanifest=1 \
228 228 > http://localhost:$HGPORT repo-mixed -r 1
229 229 adding changesets
230 230 adding manifests
231 231 adding file changes
232 232 added 2 changesets with 14 changes to 11 files
233 233 new changesets 5b02a3e8db7e:581ef6037d8b
234 234 updating to branch default
235 235 11 files updated, 0 files merged, 0 files removed, 0 files unresolved
236 236 $ cd repo-mixed
237 237 $ test -d .hg/store/meta
238 238 [1]
239 239 $ grep treemanifest .hg/requires
240 240 treemanifest
241 241
242 242 Should be possible to push updates from flat to tree manifest repo
243 243
244 244 $ hg -R ../repo-flat push ssh://user@dummy/repo-mixed
245 245 pushing to ssh://user@dummy/repo-mixed
246 246 searching for changes
247 247 remote: adding changesets
248 248 remote: adding manifests
249 249 remote: adding file changes
250 250 remote: added 2 changesets with 3 changes to 3 files
251 251
252 252 Commit should store revlog per directory
253 253
254 254 $ hg co 1
255 255 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
256 256 $ echo 3 > a
257 257 $ echo 3 > dir1/a
258 258 $ echo 3 > dir1/dir1/a
259 259 $ hg ci -m 'first tree'
260 260 created new head
261 261 $ find .hg/store/meta | sort
262 262 .hg/store/meta
263 263 .hg/store/meta/dir1
264 264 .hg/store/meta/dir1/00manifest.i
265 265 .hg/store/meta/dir1/dir1
266 266 .hg/store/meta/dir1/dir1/00manifest.i
267 267 .hg/store/meta/dir1/dir2
268 268 .hg/store/meta/dir1/dir2/00manifest.i
269 269 .hg/store/meta/dir2
270 270 .hg/store/meta/dir2/00manifest.i
271 271
272 272 Merge of two trees
273 273
274 274 $ hg co 2
275 275 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
276 276 $ hg merge 1
277 277 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
278 278 (branch merge, don't forget to commit)
279 279 $ hg ci -m 'merge of flat manifests to new tree manifest'
280 280 created new head
281 281 $ hg diff -r 3
282 282
283 283 Parent of tree root manifest should be flat manifest, and two for merge
284 284
285 285 $ hg debugindex -m
286 286 rev linkrev nodeid p1 p2
287 287 0 0 40536115ed9e 000000000000 000000000000
288 288 1 1 f3376063c255 40536115ed9e 000000000000
289 289 2 2 5d9b9da231a2 40536115ed9e 000000000000
290 290 3 3 d17d663cbd8a 5d9b9da231a2 f3376063c255
291 291 4 4 51e32a8c60ee f3376063c255 000000000000
292 292 5 5 cc5baa78b230 5d9b9da231a2 f3376063c255
293 293
294 294
295 295 Status across flat/tree boundary should work
296 296
297 297 $ hg status --rev '.^' --rev .
298 298 M a
299 299 M dir1/a
300 300 M dir1/dir1/a
301 301
302 302
303 303 Turning off treemanifest config has no effect
304 304
305 305 $ hg debugindex --dir dir1
306 306 rev linkrev nodeid p1 p2
307 307 0 4 064927a0648a 000000000000 000000000000
308 308 1 5 25ecb8cb8618 000000000000 000000000000
309 309 $ echo 2 > dir1/a
310 310 $ hg --config experimental.treemanifest=False ci -qm 'modify dir1/a'
311 311 $ hg debugindex --dir dir1
312 312 rev linkrev nodeid p1 p2
313 313 0 4 064927a0648a 000000000000 000000000000
314 314 1 5 25ecb8cb8618 000000000000 000000000000
315 315 2 6 5b16163a30c6 25ecb8cb8618 000000000000
316 316
317 317 Stripping and recovering changes should work
318 318
319 319 $ hg st --change tip
320 320 M dir1/a
321 321 $ hg --config extensions.strip= strip tip
322 322 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
323 323 saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/51cfd7b1e13b-78a2f3ed-backup.hg
324 324 $ hg debugindex --dir dir1
325 325 rev linkrev nodeid p1 p2
326 326 0 4 064927a0648a 000000000000 000000000000
327 327 1 5 25ecb8cb8618 000000000000 000000000000
328 328
329 329 #if repobundlerepo
330 330 $ hg incoming .hg/strip-backup/*
331 331 comparing with .hg/strip-backup/*-backup.hg (glob)
332 332 searching for changes
333 333 changeset: 6:51cfd7b1e13b
334 334 tag: tip
335 335 user: test
336 336 date: Thu Jan 01 00:00:00 1970 +0000
337 337 summary: modify dir1/a
338 338
339 339 #endif
340 340
341 341 $ hg unbundle .hg/strip-backup/*
342 342 adding changesets
343 343 adding manifests
344 344 adding file changes
345 345 added 1 changesets with 1 changes to 1 files
346 346 new changesets 51cfd7b1e13b
347 347 (run 'hg update' to get a working copy)
348 348 $ hg --config extensions.strip= strip tip
349 349 saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/*-backup.hg (glob)
350 350 $ hg unbundle -q .hg/strip-backup/*
351 351 $ hg debugindex --dir dir1
352 352 rev linkrev nodeid p1 p2
353 353 0 4 064927a0648a 000000000000 000000000000
354 354 1 5 25ecb8cb8618 000000000000 000000000000
355 355 2 6 5b16163a30c6 25ecb8cb8618 000000000000
356 356 $ hg st --change tip
357 357 M dir1/a
358 358
359 359 Shelving and unshelving should work
360 360
361 361 $ echo foo >> dir1/a
362 362 $ hg --config extensions.shelve= shelve
363 363 shelved as default
364 364 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
365 365 $ hg --config extensions.shelve= unshelve
366 366 unshelving change 'default'
367 367 $ hg diff --nodates
368 368 diff -r 708a273da119 dir1/a
369 369 --- a/dir1/a
370 370 +++ b/dir1/a
371 371 @@ -1,1 +1,2 @@
372 372 1
373 373 +foo
374 374
375 375 Pushing from treemanifest repo to an empty repo makes that a treemanifest repo
376 376
377 377 $ cd ..
378 378 $ hg init empty-repo
379 379 $ cat << EOF >> empty-repo/.hg/hgrc
380 380 > [experimental]
381 381 > changegroup3=yes
382 382 > EOF
383 383 $ grep treemanifest empty-repo/.hg/requires
384 384 [1]
385 385 $ hg push -R repo -r 0 empty-repo
386 386 pushing to empty-repo
387 387 searching for changes
388 388 adding changesets
389 389 adding manifests
390 390 adding file changes
391 391 added 1 changesets with 2 changes to 2 files
392 392 $ grep treemanifest empty-repo/.hg/requires
393 393 treemanifest
394 394
395 395 Pushing to an empty repo works
396 396
397 397 $ hg --config experimental.treemanifest=1 init clone
398 398 $ grep treemanifest clone/.hg/requires
399 399 treemanifest
400 400 $ hg push -R repo clone
401 401 pushing to clone
402 402 searching for changes
403 403 adding changesets
404 404 adding manifests
405 405 adding file changes
406 406 added 11 changesets with 15 changes to 10 files (+3 heads)
407 407 $ grep treemanifest clone/.hg/requires
408 408 treemanifest
409 409 $ hg -R clone verify
410 410 checking changesets
411 411 checking manifests
412 412 checking directory manifests
413 413 crosschecking files in changesets and manifests
414 414 checking files
415 415 10 files, 11 changesets, 15 total revisions
416 416
417 417 Create deeper repo with tree manifests.
418 418
419 419 $ hg --config experimental.treemanifest=True init deeprepo
420 420 $ cd deeprepo
421 421
422 422 $ mkdir .A
423 423 $ mkdir b
424 424 $ mkdir b/bar
425 425 $ mkdir b/bar/orange
426 426 $ mkdir b/bar/orange/fly
427 427 $ mkdir b/foo
428 428 $ mkdir b/foo/apple
429 429 $ mkdir b/foo/apple/bees
430 430
431 431 $ touch .A/one.txt
432 432 $ touch .A/two.txt
433 433 $ touch b/bar/fruits.txt
434 434 $ touch b/bar/orange/fly/gnat.py
435 435 $ touch b/bar/orange/fly/housefly.txt
436 436 $ touch b/foo/apple/bees/flower.py
437 437 $ touch c.txt
438 438 $ touch d.py
439 439
440 440 $ hg ci -Aqm 'initial'
441 441
442 442 $ echo >> .A/one.txt
443 443 $ echo >> .A/two.txt
444 444 $ echo >> b/bar/fruits.txt
445 445 $ echo >> b/bar/orange/fly/gnat.py
446 446 $ echo >> b/bar/orange/fly/housefly.txt
447 447 $ echo >> b/foo/apple/bees/flower.py
448 448 $ echo >> c.txt
449 449 $ echo >> d.py
450 450 $ hg ci -Aqm 'second'
451 451
452 452 We'll see that visitdir works by removing some treemanifest revlogs and running
453 453 the files command with various parameters.
454 454
455 455 Test files from the root.
456 456
457 457 $ hg files -r .
458 458 .A/one.txt
459 459 .A/two.txt
460 460 b/bar/fruits.txt
461 461 b/bar/orange/fly/gnat.py
462 462 b/bar/orange/fly/housefly.txt
463 463 b/foo/apple/bees/flower.py
464 464 c.txt
465 465 d.py
466 466
467 467 Excludes with a glob should not exclude everything from the glob's root
468 468
469 469 $ hg files -r . -X 'b/fo?' b
470 470 b/bar/fruits.txt
471 471 b/bar/orange/fly/gnat.py
472 472 b/bar/orange/fly/housefly.txt
473 473 $ cp -R .hg/store .hg/store-copy
474 474
475 475 Test files for a subdirectory.
476 476
477 #if reporevlogstore
477 478 $ rm -r .hg/store/meta/~2e_a
479 #endif
480 #if reposimplestore
481 $ rm -r .hg/store/meta/._a
482 #endif
478 483 $ hg files -r . b
479 484 b/bar/fruits.txt
480 485 b/bar/orange/fly/gnat.py
481 486 b/bar/orange/fly/housefly.txt
482 487 b/foo/apple/bees/flower.py
483 488 $ hg diff -r '.^' -r . --stat b
484 489 b/bar/fruits.txt | 1 +
485 490 b/bar/orange/fly/gnat.py | 1 +
486 491 b/bar/orange/fly/housefly.txt | 1 +
487 492 b/foo/apple/bees/flower.py | 1 +
488 493 4 files changed, 4 insertions(+), 0 deletions(-)
489 494 $ cp -R .hg/store-copy/. .hg/store
490 495
491 496 Test files with just includes and excludes.
492 497
498 #if reporevlogstore
493 499 $ rm -r .hg/store/meta/~2e_a
500 #endif
501 #if reposimplestore
502 $ rm -r .hg/store/meta/._a
503 #endif
494 504 $ rm -r .hg/store/meta/b/bar/orange/fly
495 505 $ rm -r .hg/store/meta/b/foo/apple/bees
496 506 $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
497 507 b/bar/fruits.txt
498 508 $ hg diff -r '.^' -r . --stat -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
499 509 b/bar/fruits.txt | 1 +
500 510 1 files changed, 1 insertions(+), 0 deletions(-)
501 511 $ cp -R .hg/store-copy/. .hg/store
502 512
503 513 Test files for a subdirectory, excluding a directory within it.
504 514
515 #if reporevlogstore
505 516 $ rm -r .hg/store/meta/~2e_a
517 #endif
518 #if reposimplestore
519 $ rm -r .hg/store/meta/._a
520 #endif
506 521 $ rm -r .hg/store/meta/b/foo
507 522 $ hg files -r . -X path:b/foo b
508 523 b/bar/fruits.txt
509 524 b/bar/orange/fly/gnat.py
510 525 b/bar/orange/fly/housefly.txt
511 526 $ hg diff -r '.^' -r . --stat -X path:b/foo b
512 527 b/bar/fruits.txt | 1 +
513 528 b/bar/orange/fly/gnat.py | 1 +
514 529 b/bar/orange/fly/housefly.txt | 1 +
515 530 3 files changed, 3 insertions(+), 0 deletions(-)
516 531 $ cp -R .hg/store-copy/. .hg/store
517 532
518 533 Test files for a sub directory, including only a directory within it, and
519 534 including an unrelated directory.
520 535
536 #if reporevlogstore
521 537 $ rm -r .hg/store/meta/~2e_a
538 #endif
539 #if reposimplestore
540 $ rm -r .hg/store/meta/._a
541 #endif
522 542 $ rm -r .hg/store/meta/b/foo
523 543 $ hg files -r . -I path:b/bar/orange -I path:a b
524 544 b/bar/orange/fly/gnat.py
525 545 b/bar/orange/fly/housefly.txt
526 546 $ hg diff -r '.^' -r . --stat -I path:b/bar/orange -I path:a b
527 547 b/bar/orange/fly/gnat.py | 1 +
528 548 b/bar/orange/fly/housefly.txt | 1 +
529 549 2 files changed, 2 insertions(+), 0 deletions(-)
530 550 $ cp -R .hg/store-copy/. .hg/store
531 551
532 552 Test files for a pattern, including a directory, and excluding a directory
533 553 within that.
534 554
555 #if reporevlogstore
535 556 $ rm -r .hg/store/meta/~2e_a
557 #endif
558 #if reposimplestore
559 $ rm -r .hg/store/meta/._a
560 #endif
536 561 $ rm -r .hg/store/meta/b/foo
537 562 $ rm -r .hg/store/meta/b/bar/orange
538 563 $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange
539 564 b/bar/fruits.txt
540 565 $ hg diff -r '.^' -r . --stat glob:**.txt -I path:b/bar -X path:b/bar/orange
541 566 b/bar/fruits.txt | 1 +
542 567 1 files changed, 1 insertions(+), 0 deletions(-)
543 568 $ cp -R .hg/store-copy/. .hg/store
544 569
545 570 Add some more changes to the deep repo
546 571 $ echo narf >> b/bar/fruits.txt
547 572 $ hg ci -m narf
548 573 $ echo troz >> b/bar/orange/fly/gnat.py
549 574 $ hg ci -m troz
550 575
551 576 Verify works
552 577 $ hg verify
553 578 checking changesets
554 579 checking manifests
555 580 checking directory manifests
556 581 crosschecking files in changesets and manifests
557 582 checking files
558 583 8 files, 4 changesets, 18 total revisions
559 584
560 585 #if repofncache
561 586 Dirlogs are included in fncache
562 587 $ grep meta/.A/00manifest.i .hg/store/fncache
563 588 meta/.A/00manifest.i
564 589
565 590 Rebuilt fncache includes dirlogs
566 591 $ rm .hg/store/fncache
567 592 $ hg debugrebuildfncache
568 593 adding data/.A/one.txt.i
569 594 adding data/.A/two.txt.i
570 595 adding data/b/bar/fruits.txt.i
571 596 adding data/b/bar/orange/fly/gnat.py.i
572 597 adding data/b/bar/orange/fly/housefly.txt.i
573 598 adding data/b/foo/apple/bees/flower.py.i
574 599 adding data/c.txt.i
575 600 adding data/d.py.i
576 601 adding meta/.A/00manifest.i
577 602 adding meta/b/00manifest.i
578 603 adding meta/b/bar/00manifest.i
579 604 adding meta/b/bar/orange/00manifest.i
580 605 adding meta/b/bar/orange/fly/00manifest.i
581 606 adding meta/b/foo/00manifest.i
582 607 adding meta/b/foo/apple/00manifest.i
583 608 adding meta/b/foo/apple/bees/00manifest.i
584 609 16 items added, 0 removed from fncache
585 610 #endif
586 611
587 612 Finish first server
588 613 $ killdaemons.py
589 614
590 615 Back up the recently added revlogs
591 616 $ cp -R .hg/store .hg/store-newcopy
592 617
593 618 Verify reports missing dirlog
594 619 $ rm .hg/store/meta/b/00manifest.*
595 620 $ hg verify
596 621 checking changesets
597 622 checking manifests
598 623 checking directory manifests
599 624 0: empty or missing b/
600 625 b/@0: parent-directory manifest refers to unknown revision 67688a370455
601 626 b/@1: parent-directory manifest refers to unknown revision f065da70369e
602 627 b/@2: parent-directory manifest refers to unknown revision ac0d30948e0b
603 628 b/@3: parent-directory manifest refers to unknown revision 367152e6af28
604 warning: orphan data file 'meta/b/bar/00manifest.i'
605 warning: orphan data file 'meta/b/bar/orange/00manifest.i'
606 warning: orphan data file 'meta/b/bar/orange/fly/00manifest.i'
607 warning: orphan data file 'meta/b/foo/00manifest.i'
608 warning: orphan data file 'meta/b/foo/apple/00manifest.i'
609 warning: orphan data file 'meta/b/foo/apple/bees/00manifest.i'
629 warning: orphan data file 'meta/b/bar/00manifest.i' (reporevlogstore !)
630 warning: orphan data file 'meta/b/bar/orange/00manifest.i' (reporevlogstore !)
631 warning: orphan data file 'meta/b/bar/orange/fly/00manifest.i' (reporevlogstore !)
632 warning: orphan data file 'meta/b/foo/00manifest.i' (reporevlogstore !)
633 warning: orphan data file 'meta/b/foo/apple/00manifest.i' (reporevlogstore !)
634 warning: orphan data file 'meta/b/foo/apple/bees/00manifest.i' (reporevlogstore !)
610 635 crosschecking files in changesets and manifests
611 636 b/bar/fruits.txt@0: in changeset but not in manifest
612 637 b/bar/orange/fly/gnat.py@0: in changeset but not in manifest
613 638 b/bar/orange/fly/housefly.txt@0: in changeset but not in manifest
614 639 b/foo/apple/bees/flower.py@0: in changeset but not in manifest
615 640 checking files
616 641 8 files, 4 changesets, 18 total revisions
617 6 warnings encountered!
642 6 warnings encountered! (reporevlogstore !)
618 643 9 integrity errors encountered!
619 644 (first damaged changeset appears to be 0)
620 645 [1]
621 646 $ cp -R .hg/store-newcopy/. .hg/store
622 647
623 648 Verify reports missing dirlog entry
624 649 $ mv -f .hg/store-copy/meta/b/00manifest.* .hg/store/meta/b/
625 650 $ hg verify
626 651 checking changesets
627 652 checking manifests
628 653 checking directory manifests
629 654 b/@2: parent-directory manifest refers to unknown revision ac0d30948e0b
630 655 b/@3: parent-directory manifest refers to unknown revision 367152e6af28
631 656 b/bar/@?: rev 2 points to unexpected changeset 2
632 657 b/bar/@?: 44d7e1146e0d not in parent-directory manifest
633 658 b/bar/@?: rev 3 points to unexpected changeset 3
634 659 b/bar/@?: 70b10c6b17b7 not in parent-directory manifest
635 660 b/bar/orange/@?: rev 2 points to unexpected changeset 3
636 661 (expected None)
637 662 b/bar/orange/fly/@?: rev 2 points to unexpected changeset 3
638 663 (expected None)
639 664 crosschecking files in changesets and manifests
640 665 checking files
641 666 8 files, 4 changesets, 18 total revisions
642 667 2 warnings encountered!
643 668 8 integrity errors encountered!
644 669 (first damaged changeset appears to be 2)
645 670 [1]
646 671 $ cp -R .hg/store-newcopy/. .hg/store
647 672
648 673 Test cloning a treemanifest repo over http.
649 674 $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log
650 675 $ cat hg.pid >> $DAEMON_PIDS
651 676 $ cd ..
652 677 We can clone even with the knob turned off and we'll get a treemanifest repo.
653 678 $ hg clone --config experimental.treemanifest=False \
654 679 > --config experimental.changegroup3=True \
655 680 > http://localhost:$HGPORT deepclone
656 681 requesting all changes
657 682 adding changesets
658 683 adding manifests
659 684 adding file changes
660 685 added 4 changesets with 18 changes to 8 files
661 686 new changesets 775704be6f52:523e5c631710
662 687 updating to branch default
663 688 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
664 689 No server errors.
665 690 $ cat deeprepo/errors.log
666 691 requires got updated to include treemanifest
667 692 $ cat deepclone/.hg/requires | grep treemanifest
668 693 treemanifest
669 694 Tree manifest revlogs exist.
670 695 $ find deepclone/.hg/store/meta | sort
671 696 deepclone/.hg/store/meta
697 deepclone/.hg/store/meta/._a (reposimplestore !)
698 deepclone/.hg/store/meta/._a/00manifest.i (reposimplestore !)
672 699 deepclone/.hg/store/meta/b
673 700 deepclone/.hg/store/meta/b/00manifest.i
674 701 deepclone/.hg/store/meta/b/bar
675 702 deepclone/.hg/store/meta/b/bar/00manifest.i
676 703 deepclone/.hg/store/meta/b/bar/orange
677 704 deepclone/.hg/store/meta/b/bar/orange/00manifest.i
678 705 deepclone/.hg/store/meta/b/bar/orange/fly
679 706 deepclone/.hg/store/meta/b/bar/orange/fly/00manifest.i
680 707 deepclone/.hg/store/meta/b/foo
681 708 deepclone/.hg/store/meta/b/foo/00manifest.i
682 709 deepclone/.hg/store/meta/b/foo/apple
683 710 deepclone/.hg/store/meta/b/foo/apple/00manifest.i
684 711 deepclone/.hg/store/meta/b/foo/apple/bees
685 712 deepclone/.hg/store/meta/b/foo/apple/bees/00manifest.i
686 deepclone/.hg/store/meta/~2e_a
687 deepclone/.hg/store/meta/~2e_a/00manifest.i
713 deepclone/.hg/store/meta/~2e_a (reporevlogstore !)
714 deepclone/.hg/store/meta/~2e_a/00manifest.i (reporevlogstore !)
688 715 Verify passes.
689 716 $ cd deepclone
690 717 $ hg verify
691 718 checking changesets
692 719 checking manifests
693 720 checking directory manifests
694 721 crosschecking files in changesets and manifests
695 722 checking files
696 723 8 files, 4 changesets, 18 total revisions
697 724 $ cd ..
698 725
726 #if reporevlogstore
699 727 Create clones using old repo formats to use in later tests
700 728 $ hg clone --config format.usestore=False \
701 729 > --config experimental.changegroup3=True \
702 730 > http://localhost:$HGPORT deeprepo-basicstore
703 731 requesting all changes
704 732 adding changesets
705 733 adding manifests
706 734 adding file changes
707 735 added 4 changesets with 18 changes to 8 files
708 736 new changesets 775704be6f52:523e5c631710
709 737 updating to branch default
710 738 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
711 739 $ cd deeprepo-basicstore
712 740 $ grep store .hg/requires
713 741 [1]
714 742 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --errorlog=errors.log
715 743 $ cat hg.pid >> $DAEMON_PIDS
716 744 $ cd ..
717 745 $ hg clone --config format.usefncache=False \
718 746 > --config experimental.changegroup3=True \
719 747 > http://localhost:$HGPORT deeprepo-encodedstore
720 748 requesting all changes
721 749 adding changesets
722 750 adding manifests
723 751 adding file changes
724 752 added 4 changesets with 18 changes to 8 files
725 753 new changesets 775704be6f52:523e5c631710
726 754 updating to branch default
727 755 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
728 756 $ cd deeprepo-encodedstore
729 757 $ grep fncache .hg/requires
730 758 [1]
731 759 $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --errorlog=errors.log
732 760 $ cat hg.pid >> $DAEMON_PIDS
733 761 $ cd ..
734 762
735 763 Local clone with basicstore
736 764 $ hg clone -U deeprepo-basicstore local-clone-basicstore
737 765 $ hg -R local-clone-basicstore verify
738 766 checking changesets
739 767 checking manifests
740 768 checking directory manifests
741 769 crosschecking files in changesets and manifests
742 770 checking files
743 771 8 files, 4 changesets, 18 total revisions
744 772
745 773 Local clone with encodedstore
746 774 $ hg clone -U deeprepo-encodedstore local-clone-encodedstore
747 775 $ hg -R local-clone-encodedstore verify
748 776 checking changesets
749 777 checking manifests
750 778 checking directory manifests
751 779 crosschecking files in changesets and manifests
752 780 checking files
753 781 8 files, 4 changesets, 18 total revisions
754 782
755 783 Local clone with fncachestore
756 784 $ hg clone -U deeprepo local-clone-fncachestore
757 785 $ hg -R local-clone-fncachestore verify
758 786 checking changesets
759 787 checking manifests
760 788 checking directory manifests
761 789 crosschecking files in changesets and manifests
762 790 checking files
763 791 8 files, 4 changesets, 18 total revisions
764 792
765 793 Stream clone with basicstore
766 794 $ hg clone --config experimental.changegroup3=True --stream -U \
767 795 > http://localhost:$HGPORT1 stream-clone-basicstore
768 796 streaming all changes
769 797 18 files to transfer, * of data (glob)
770 798 transferred * in * seconds (*) (glob)
771 799 searching for changes
772 800 no changes found
773 801 $ hg -R stream-clone-basicstore verify
774 802 checking changesets
775 803 checking manifests
776 804 checking directory manifests
777 805 crosschecking files in changesets and manifests
778 806 checking files
779 807 8 files, 4 changesets, 18 total revisions
780 808
781 809 Stream clone with encodedstore
782 810 $ hg clone --config experimental.changegroup3=True --stream -U \
783 811 > http://localhost:$HGPORT2 stream-clone-encodedstore
784 812 streaming all changes
785 813 18 files to transfer, * of data (glob)
786 814 transferred * in * seconds (*) (glob)
787 815 searching for changes
788 816 no changes found
789 817 $ hg -R stream-clone-encodedstore verify
790 818 checking changesets
791 819 checking manifests
792 820 checking directory manifests
793 821 crosschecking files in changesets and manifests
794 822 checking files
795 823 8 files, 4 changesets, 18 total revisions
796 824
797 825 Stream clone with fncachestore
798 826 $ hg clone --config experimental.changegroup3=True --stream -U \
799 827 > http://localhost:$HGPORT stream-clone-fncachestore
800 828 streaming all changes
801 829 18 files to transfer, * of data (glob)
802 830 transferred * in * seconds (*) (glob)
803 831 searching for changes
804 832 no changes found
805 833 $ hg -R stream-clone-fncachestore verify
806 834 checking changesets
807 835 checking manifests
808 836 checking directory manifests
809 837 crosschecking files in changesets and manifests
810 838 checking files
811 839 8 files, 4 changesets, 18 total revisions
812 840
813 841 Packed bundle
814 842 $ hg -R deeprepo debugcreatestreamclonebundle repo-packed.hg
815 843 writing 5330 bytes for 18 files
816 844 bundle requirements: generaldelta, revlogv1, treemanifest
817 845 $ hg debugbundle --spec repo-packed.hg
818 846 none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Ctreemanifest
819 847
848 #endif
849
820 850 Bundle with changegroup2 is not supported
821 851
822 852 $ hg -R deeprepo bundle --all -t v2 deeprepo.bundle
823 853 abort: repository does not support bundle version 02
824 854 [255]
825 855
826 856 Pull does not include changegroup for manifest the client already has from
827 857 other branch
828 858
829 859 $ mkdir grafted-dir-repo
830 860 $ cd grafted-dir-repo
831 861 $ hg --config experimental.treemanifest=1 init
832 862 $ mkdir dir
833 863 $ echo a > dir/file
834 864 $ echo a > file
835 865 $ hg ci -Am initial
836 866 adding dir/file
837 867 adding file
838 868 $ echo b > dir/file
839 869 $ hg ci -m updated
840 870 $ hg co '.^'
841 871 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
842 872 $ hg revert -r tip dir/
843 873 reverting dir/file
844 874 $ echo b > file # to make sure root manifest is sent
845 875 $ hg ci -m grafted
846 876 created new head
847 877 $ cd ..
848 878
849 879 $ hg --config experimental.treemanifest=1 clone --pull -r 1 \
850 880 > grafted-dir-repo grafted-dir-repo-clone
851 881 adding changesets
852 882 adding manifests
853 883 adding file changes
854 884 added 2 changesets with 3 changes to 2 files
855 885 new changesets d84f4c419457:09ab742f3b0f
856 886 updating to branch default
857 887 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
858 888 $ cd grafted-dir-repo-clone
859 889 $ hg pull -r 2
860 890 pulling from $TESTTMP/grafted-dir-repo
861 891 searching for changes
862 892 adding changesets
863 893 adding manifests
864 894 adding file changes
865 895 added 1 changesets with 1 changes to 1 files (+1 heads)
866 896 new changesets 73699489fb7c
867 897 (run 'hg heads' to see heads, 'hg merge' to merge)
868 898
869 899 Committing a empty commit does not duplicate root treemanifest
870 900 $ echo z >> z
871 901 $ hg commit -Aqm 'pre-empty commit'
872 902 $ hg rm z
873 903 $ hg commit --amend -m 'empty commit'
874 904 saved backup bundle to $TESTTMP/grafted-dir-repo-clone/.hg/strip-backup/cb99d5717cea-9e3b6b02-amend.hg
875 905 $ hg log -r 'tip + tip^' -T '{manifest}\n'
876 906 1:678d3574b88c
877 907 1:678d3574b88c
878 908 $ hg --config extensions.strip= strip -r . -q
General Comments 0
You need to be logged in to leave comments. Login now