##// END OF EJS Templates
tests: port inline cgi script in test-largefiles.t to python 3...
Augie Fackler -
r37762:1398c2d7 default
parent child Browse files
Show More
@@ -1,1887 +1,1887 b''
1 1 This file used to contains all largefile tests.
2 2 Do not add any new tests in this file as it his already far too long to run.
3 3
4 4 It contains all the testing of the basic concepts of large file in a single block.
5 5
6 6 $ USERCACHE="$TESTTMP/cache"; export USERCACHE
7 7 $ mkdir "${USERCACHE}"
8 8 $ cat >> $HGRCPATH <<EOF
9 9 > [extensions]
10 10 > largefiles=
11 11 > purge=
12 12 > rebase=
13 13 > transplant=
14 14 > [phases]
15 15 > publish=False
16 16 > [largefiles]
17 17 > minsize=2
18 18 > patterns=glob:**.dat
19 19 > usercache=${USERCACHE}
20 20 > [hooks]
21 21 > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status"
22 22 > EOF
23 23
24 24 Create the repo with a couple of revisions of both large and normal
25 25 files.
26 26 Test status and dirstate of largefiles and that summary output is correct.
27 27
28 28 $ hg init a
29 29 $ cd a
30 30 $ mkdir sub
31 31 $ echo normal1 > normal1
32 32 $ echo normal2 > sub/normal2
33 33 $ echo large1 > large1
34 34 $ echo large2 > sub/large2
35 35 $ hg add normal1 sub/normal2
36 36 $ hg add --large large1 sub/large2
37 37 $ hg commit -m "add files"
38 38 Invoking status precommit hook
39 39 A large1
40 40 A normal1
41 41 A sub/large2
42 42 A sub/normal2
43 43 $ touch large1 sub/large2
44 44 $ sleep 1
45 45 $ hg st
46 46 $ hg debugstate --nodates
47 47 n 644 41 set .hglf/large1
48 48 n 644 41 set .hglf/sub/large2
49 49 n 644 8 set normal1
50 50 n 644 8 set sub/normal2
51 51 $ hg debugstate --large --nodates
52 52 n 644 7 set large1
53 53 n 644 7 set sub/large2
54 54 $ echo normal11 > normal1
55 55 $ echo normal22 > sub/normal2
56 56 $ echo large11 > large1
57 57 $ echo large22 > sub/large2
58 58 $ hg commit -m "edit files"
59 59 Invoking status precommit hook
60 60 M large1
61 61 M normal1
62 62 M sub/large2
63 63 M sub/normal2
64 64 $ hg sum --large
65 65 parent: 1:ce8896473775 tip
66 66 edit files
67 67 branch: default
68 68 commit: (clean)
69 69 update: (current)
70 70 phases: 2 draft
71 71 largefiles: (no remote repo)
72 72
73 73 Commit preserved largefile contents.
74 74
75 75 $ cat normal1
76 76 normal11
77 77 $ cat large1
78 78 large11
79 79 $ cat sub/normal2
80 80 normal22
81 81 $ cat sub/large2
82 82 large22
83 83
84 84 Test status, subdir and unknown files
85 85
86 86 $ echo unknown > sub/unknown
87 87 $ hg st --all
88 88 ? sub/unknown
89 89 C large1
90 90 C normal1
91 91 C sub/large2
92 92 C sub/normal2
93 93 $ hg st --all sub
94 94 ? sub/unknown
95 95 C sub/large2
96 96 C sub/normal2
97 97 $ rm sub/unknown
98 98
99 99 Test messages and exit codes for remove warning cases
100 100
101 101 $ hg remove -A large1
102 102 not removing large1: file still exists
103 103 [1]
104 104 $ echo 'modified' > large1
105 105 $ hg remove large1
106 106 not removing large1: file is modified (use -f to force removal)
107 107 [1]
108 108 $ echo 'new' > normalnew
109 109 $ hg add normalnew
110 110 $ echo 'new' > largenew
111 111 $ hg add --large normalnew
112 112 normalnew already tracked!
113 113 $ hg remove normalnew largenew
114 114 not removing largenew: file is untracked
115 115 not removing normalnew: file has been marked for add (use 'hg forget' to undo add)
116 116 [1]
117 117 $ rm normalnew largenew
118 118 $ hg up -Cq
119 119
120 120 Remove both largefiles and normal files.
121 121
122 122 $ hg remove normal1 large1
123 123 $ hg status large1
124 124 R large1
125 125 $ hg commit -m "remove files"
126 126 Invoking status precommit hook
127 127 R large1
128 128 R normal1
129 129 $ ls
130 130 sub
131 131 $ echo "testlargefile" > large1-test
132 132 $ hg add --large large1-test
133 133 $ hg st
134 134 A large1-test
135 135 $ hg rm large1-test
136 136 not removing large1-test: file has been marked for add (use forget to undo)
137 137 [1]
138 138 $ hg st
139 139 A large1-test
140 140 $ hg forget large1-test
141 141 $ hg st
142 142 ? large1-test
143 143 $ hg remove large1-test
144 144 not removing large1-test: file is untracked
145 145 [1]
146 146 $ hg forget large1-test
147 147 not removing large1-test: file is already untracked
148 148 [1]
149 149 $ rm large1-test
150 150
151 151 Copy both largefiles and normal files (testing that status output is correct).
152 152
153 153 $ hg cp sub/normal2 normal1
154 154 $ hg cp sub/large2 large1
155 155 $ hg commit -m "copy files"
156 156 Invoking status precommit hook
157 157 A large1
158 158 A normal1
159 159 $ cat normal1
160 160 normal22
161 161 $ cat large1
162 162 large22
163 163
164 164 Test moving largefiles and verify that normal files are also unaffected.
165 165
166 166 $ hg mv normal1 normal3
167 167 $ hg mv large1 large3
168 168 $ hg mv sub/normal2 sub/normal4
169 169 $ hg mv sub/large2 sub/large4
170 170 $ hg commit -m "move files"
171 171 Invoking status precommit hook
172 172 A large3
173 173 A normal3
174 174 A sub/large4
175 175 A sub/normal4
176 176 R large1
177 177 R normal1
178 178 R sub/large2
179 179 R sub/normal2
180 180 $ cat normal3
181 181 normal22
182 182 $ cat large3
183 183 large22
184 184 $ cat sub/normal4
185 185 normal22
186 186 $ cat sub/large4
187 187 large22
188 188
189 189
190 190 #if serve
191 191 Test display of largefiles in hgweb
192 192
193 193 $ hg serve -d -p $HGPORT --pid-file ../hg.pid
194 194 $ cat ../hg.pid >> $DAEMON_PIDS
195 195 $ get-with-headers.py $LOCALIP:$HGPORT 'file/tip/?style=raw'
196 196 200 Script output follows
197 197
198 198
199 199 drwxr-xr-x sub
200 200 -rw-r--r-- 41 large3
201 201 -rw-r--r-- 9 normal3
202 202
203 203
204 204 $ get-with-headers.py $LOCALIP:$HGPORT 'file/tip/sub/?style=raw'
205 205 200 Script output follows
206 206
207 207
208 208 -rw-r--r-- 41 large4
209 209 -rw-r--r-- 9 normal4
210 210
211 211
212 212 $ killdaemons.py
213 213 #endif
214 214
215 215 Test largefiles can be loaded in hgweb (wrapcommand() shouldn't fail)
216 216
217 217 $ cat <<EOF > "$TESTTMP/hgweb.cgi"
218 218 > #!$PYTHON
219 219 > from mercurial import demandimport; demandimport.enable()
220 220 > from mercurial.hgweb import hgweb
221 221 > from mercurial.hgweb import wsgicgi
222 > application = hgweb('.', 'test repo')
222 > application = hgweb(b'.', b'test repo')
223 223 > wsgicgi.launch(application)
224 224 > EOF
225 225 $ . "$TESTDIR/cgienv"
226 226
227 227 $ SCRIPT_NAME='' \
228 228 > $PYTHON "$TESTTMP/hgweb.cgi" > /dev/null
229 229
230 230 Test archiving the various revisions. These hit corner cases known with
231 231 archiving.
232 232
233 233 $ hg archive -r 0 ../archive0
234 234 $ hg archive -r 1 ../archive1
235 235 $ hg archive -r 2 ../archive2
236 236 $ hg archive -r 3 ../archive3
237 237 $ hg archive -r 4 ../archive4
238 238 $ cd ../archive0
239 239 $ cat normal1
240 240 normal1
241 241 $ cat large1
242 242 large1
243 243 $ cat sub/normal2
244 244 normal2
245 245 $ cat sub/large2
246 246 large2
247 247 $ cd ../archive1
248 248 $ cat normal1
249 249 normal11
250 250 $ cat large1
251 251 large11
252 252 $ cat sub/normal2
253 253 normal22
254 254 $ cat sub/large2
255 255 large22
256 256 $ cd ../archive2
257 257 $ ls
258 258 sub
259 259 $ cat sub/normal2
260 260 normal22
261 261 $ cat sub/large2
262 262 large22
263 263 $ cd ../archive3
264 264 $ cat normal1
265 265 normal22
266 266 $ cat large1
267 267 large22
268 268 $ cat sub/normal2
269 269 normal22
270 270 $ cat sub/large2
271 271 large22
272 272 $ cd ../archive4
273 273 $ cat normal3
274 274 normal22
275 275 $ cat large3
276 276 large22
277 277 $ cat sub/normal4
278 278 normal22
279 279 $ cat sub/large4
280 280 large22
281 281
282 282 Commit corner case: specify files to commit.
283 283
284 284 $ cd ../a
285 285 $ echo normal3 > normal3
286 286 $ echo large3 > large3
287 287 $ echo normal4 > sub/normal4
288 288 $ echo large4 > sub/large4
289 289 $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again"
290 290 Invoking status precommit hook
291 291 M large3
292 292 M normal3
293 293 M sub/large4
294 294 M sub/normal4
295 295 $ cat normal3
296 296 normal3
297 297 $ cat large3
298 298 large3
299 299 $ cat sub/normal4
300 300 normal4
301 301 $ cat sub/large4
302 302 large4
303 303
304 304 One more commit corner case: commit from a subdirectory.
305 305
306 306 $ cd ../a
307 307 $ echo normal33 > normal3
308 308 $ echo large33 > large3
309 309 $ echo normal44 > sub/normal4
310 310 $ echo large44 > sub/large4
311 311 $ cd sub
312 312 $ hg commit -m "edit files yet again"
313 313 Invoking status precommit hook
314 314 M large3
315 315 M normal3
316 316 M sub/large4
317 317 M sub/normal4
318 318 $ cat ../normal3
319 319 normal33
320 320 $ cat ../large3
321 321 large33
322 322 $ cat normal4
323 323 normal44
324 324 $ cat large4
325 325 large44
326 326
327 327 Committing standins is not allowed.
328 328
329 329 $ cd ..
330 330 $ echo large3 > large3
331 331 $ hg commit .hglf/large3 -m "try to commit standin"
332 332 abort: file ".hglf/large3" is a largefile standin
333 333 (commit the largefile itself instead)
334 334 [255]
335 335
336 336 Corner cases for adding largefiles.
337 337
338 338 $ echo large5 > large5
339 339 $ hg add --large large5
340 340 $ hg add --large large5
341 341 large5 already a largefile
342 342 $ mkdir sub2
343 343 $ echo large6 > sub2/large6
344 344 $ echo large7 > sub2/large7
345 345 $ hg add --large sub2
346 346 adding sub2/large6 as a largefile
347 347 adding sub2/large7 as a largefile
348 348 $ hg st
349 349 M large3
350 350 A large5
351 351 A sub2/large6
352 352 A sub2/large7
353 353
354 354 Committing directories containing only largefiles.
355 355
356 356 $ mkdir -p z/y/x/m
357 357 $ touch z/y/x/m/large1
358 358 $ touch z/y/x/large2
359 359 $ hg add --large z/y/x/m/large1 z/y/x/large2
360 360 $ hg commit -m "Subdir with directory only containing largefiles" z
361 361 Invoking status precommit hook
362 362 M large3
363 363 A large5
364 364 A sub2/large6
365 365 A sub2/large7
366 366 A z/y/x/large2
367 367 A z/y/x/m/large1
368 368
369 369 (and a bit of log testing)
370 370
371 371 $ hg log -T '{rev}\n' z/y/x/m/large1
372 372 7
373 373 $ hg log -T '{rev}\n' z/y/x/m # with only a largefile
374 374 7
375 375
376 376 $ hg rollback --quiet
377 377 $ touch z/y/x/m/normal
378 378 $ hg add z/y/x/m/normal
379 379 $ hg commit -m "Subdir with mixed contents" z
380 380 Invoking status precommit hook
381 381 M large3
382 382 A large5
383 383 A sub2/large6
384 384 A sub2/large7
385 385 A z/y/x/large2
386 386 A z/y/x/m/large1
387 387 A z/y/x/m/normal
388 388 $ hg st
389 389 M large3
390 390 A large5
391 391 A sub2/large6
392 392 A sub2/large7
393 393 $ hg rollback --quiet
394 394 $ hg revert z/y/x/large2 z/y/x/m/large1
395 395 $ rm z/y/x/large2 z/y/x/m/large1
396 396 $ hg commit -m "Subdir with normal contents" z
397 397 Invoking status precommit hook
398 398 M large3
399 399 A large5
400 400 A sub2/large6
401 401 A sub2/large7
402 402 A z/y/x/m/normal
403 403 $ hg st
404 404 M large3
405 405 A large5
406 406 A sub2/large6
407 407 A sub2/large7
408 408 $ hg rollback --quiet
409 409 $ hg revert --quiet z
410 410 $ hg commit -m "Empty subdir" z
411 411 abort: z: no match under directory!
412 412 [255]
413 413 $ rm -rf z
414 414 $ hg ci -m "standin" .hglf
415 415 abort: file ".hglf" is a largefile standin
416 416 (commit the largefile itself instead)
417 417 [255]
418 418
419 419 Test "hg status" with combination of 'file pattern' and 'directory
420 420 pattern' for largefiles:
421 421
422 422 $ hg status sub2/large6 sub2
423 423 A sub2/large6
424 424 A sub2/large7
425 425
426 426 Config settings (pattern **.dat, minsize 2 MB) are respected.
427 427
428 428 $ echo testdata > test.dat
429 429 $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null
430 430 $ hg add
431 431 adding reallylarge as a largefile
432 432 adding test.dat as a largefile
433 433
434 434 Test that minsize and --lfsize handle float values;
435 435 also tests that --lfsize overrides largefiles.minsize.
436 436 (0.250 MB = 256 kB = 262144 B)
437 437
438 438 $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null
439 439 $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null
440 440 $ hg --config largefiles.minsize=.25 add
441 441 adding ratherlarge as a largefile
442 442 adding medium
443 443 $ hg forget medium
444 444 $ hg --config largefiles.minsize=.25 add --lfsize=.125
445 445 adding medium as a largefile
446 446 $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null
447 447 $ hg --config largefiles.minsize=.25 add --lfsize=.125
448 448 adding notlarge
449 449 $ hg forget notlarge
450 450
451 451 Test forget on largefiles.
452 452
453 453 $ hg forget large3 large5 test.dat reallylarge ratherlarge medium
454 454 $ hg commit -m "add/edit more largefiles"
455 455 Invoking status precommit hook
456 456 A sub2/large6
457 457 A sub2/large7
458 458 R large3
459 459 ? large5
460 460 ? medium
461 461 ? notlarge
462 462 ? ratherlarge
463 463 ? reallylarge
464 464 ? test.dat
465 465 $ hg st
466 466 ? large3
467 467 ? large5
468 468 ? medium
469 469 ? notlarge
470 470 ? ratherlarge
471 471 ? reallylarge
472 472 ? test.dat
473 473
474 474 Purge with largefiles: verify that largefiles are still in the working
475 475 dir after a purge.
476 476
477 477 $ hg purge --all
478 478 $ cat sub/large4
479 479 large44
480 480 $ cat sub2/large6
481 481 large6
482 482 $ cat sub2/large7
483 483 large7
484 484
485 485 Test addremove: verify that files that should be added as largefiles are added as
486 486 such and that already-existing largefiles are not added as normal files by
487 487 accident.
488 488
489 489 $ rm normal3
490 490 $ rm sub/large4
491 491 $ echo "testing addremove with patterns" > testaddremove.dat
492 492 $ echo "normaladdremove" > normaladdremove
493 493 $ hg addremove
494 494 removing sub/large4
495 495 adding testaddremove.dat as a largefile
496 496 removing normal3
497 497 adding normaladdremove
498 498
499 499 Test addremove with -R
500 500
501 501 $ hg up -C
502 502 getting changed largefiles
503 503 1 largefiles updated, 0 removed
504 504 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
505 505 $ rm normal3
506 506 $ rm sub/large4
507 507 $ echo "testing addremove with patterns" > testaddremove.dat
508 508 $ echo "normaladdremove" > normaladdremove
509 509 $ cd ..
510 510 $ hg -R a -v addremove
511 511 removing sub/large4
512 512 adding testaddremove.dat as a largefile
513 513 removing normal3
514 514 adding normaladdremove
515 515 $ cd a
516 516
517 517 Test 3364
518 518 $ hg clone . ../addrm
519 519 updating to branch default
520 520 getting changed largefiles
521 521 3 largefiles updated, 0 removed
522 522 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
523 523 $ cd ../addrm
524 524 $ cat >> .hg/hgrc <<EOF
525 525 > [hooks]
526 526 > post-commit.stat=sh -c "echo \\"Invoking status postcommit hook\\"; hg status -A"
527 527 > EOF
528 528 $ touch foo
529 529 $ hg add --large foo
530 530 $ hg ci -m "add foo"
531 531 Invoking status precommit hook
532 532 A foo
533 533 Invoking status postcommit hook
534 534 C foo
535 535 C normal3
536 536 C sub/large4
537 537 C sub/normal4
538 538 C sub2/large6
539 539 C sub2/large7
540 540 $ rm foo
541 541 $ hg st
542 542 ! foo
543 543 hmm.. no precommit invoked, but there is a postcommit??
544 544 $ hg ci -m "will not checkin"
545 545 nothing changed (1 missing files, see 'hg status')
546 546 Invoking status postcommit hook
547 547 ! foo
548 548 C normal3
549 549 C sub/large4
550 550 C sub/normal4
551 551 C sub2/large6
552 552 C sub2/large7
553 553 [1]
554 554 $ hg addremove
555 555 removing foo
556 556 $ hg st
557 557 R foo
558 558 $ hg ci -m "used to say nothing changed"
559 559 Invoking status precommit hook
560 560 R foo
561 561 Invoking status postcommit hook
562 562 C normal3
563 563 C sub/large4
564 564 C sub/normal4
565 565 C sub2/large6
566 566 C sub2/large7
567 567 $ hg st
568 568
569 569 Test 3507 (both normal files and largefiles were a problem)
570 570
571 571 $ touch normal
572 572 $ touch large
573 573 $ hg add normal
574 574 $ hg add --large large
575 575 $ hg ci -m "added"
576 576 Invoking status precommit hook
577 577 A large
578 578 A normal
579 579 Invoking status postcommit hook
580 580 C large
581 581 C normal
582 582 C normal3
583 583 C sub/large4
584 584 C sub/normal4
585 585 C sub2/large6
586 586 C sub2/large7
587 587 $ hg remove normal
588 588 $ hg addremove --traceback
589 589 $ hg ci -m "addremoved normal"
590 590 Invoking status precommit hook
591 591 R normal
592 592 Invoking status postcommit hook
593 593 C large
594 594 C normal3
595 595 C sub/large4
596 596 C sub/normal4
597 597 C sub2/large6
598 598 C sub2/large7
599 599 $ hg up -C '.^'
600 600 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
601 601 $ hg remove large
602 602 $ hg addremove --traceback
603 603 $ hg ci -m "removed large"
604 604 Invoking status precommit hook
605 605 R large
606 606 created new head
607 607 Invoking status postcommit hook
608 608 C normal
609 609 C normal3
610 610 C sub/large4
611 611 C sub/normal4
612 612 C sub2/large6
613 613 C sub2/large7
614 614
615 615 Test commit -A (issue3542)
616 616 $ echo large8 > large8
617 617 $ hg add --large large8
618 618 $ hg ci -Am 'this used to add large8 as normal and commit both'
619 619 Invoking status precommit hook
620 620 A large8
621 621 Invoking status postcommit hook
622 622 C large8
623 623 C normal
624 624 C normal3
625 625 C sub/large4
626 626 C sub/normal4
627 627 C sub2/large6
628 628 C sub2/large7
629 629 $ rm large8
630 630 $ hg ci -Am 'this used to not notice the rm'
631 631 removing large8
632 632 Invoking status precommit hook
633 633 R large8
634 634 Invoking status postcommit hook
635 635 C normal
636 636 C normal3
637 637 C sub/large4
638 638 C sub/normal4
639 639 C sub2/large6
640 640 C sub2/large7
641 641
642 642 Test that a standin can't be added as a large file
643 643
644 644 $ touch large
645 645 $ hg add --large large
646 646 $ hg ci -m "add"
647 647 Invoking status precommit hook
648 648 A large
649 649 Invoking status postcommit hook
650 650 C large
651 651 C normal
652 652 C normal3
653 653 C sub/large4
654 654 C sub/normal4
655 655 C sub2/large6
656 656 C sub2/large7
657 657 $ hg remove large
658 658 $ touch large
659 659 $ hg addremove --config largefiles.patterns=**large --traceback
660 660 adding large as a largefile
661 661
662 662 Test that outgoing --large works (with revsets too)
663 663 $ hg outgoing --rev '.^' --large
664 664 comparing with $TESTTMP/a
665 665 searching for changes
666 666 changeset: 8:c02fd3b77ec4
667 667 user: test
668 668 date: Thu Jan 01 00:00:00 1970 +0000
669 669 summary: add foo
670 670
671 671 changeset: 9:289dd08c9bbb
672 672 user: test
673 673 date: Thu Jan 01 00:00:00 1970 +0000
674 674 summary: used to say nothing changed
675 675
676 676 changeset: 10:34f23ac6ac12
677 677 user: test
678 678 date: Thu Jan 01 00:00:00 1970 +0000
679 679 summary: added
680 680
681 681 changeset: 12:710c1b2f523c
682 682 parent: 10:34f23ac6ac12
683 683 user: test
684 684 date: Thu Jan 01 00:00:00 1970 +0000
685 685 summary: removed large
686 686
687 687 changeset: 13:0a3e75774479
688 688 user: test
689 689 date: Thu Jan 01 00:00:00 1970 +0000
690 690 summary: this used to add large8 as normal and commit both
691 691
692 692 changeset: 14:84f3d378175c
693 693 user: test
694 694 date: Thu Jan 01 00:00:00 1970 +0000
695 695 summary: this used to not notice the rm
696 696
697 697 largefiles to upload (1 entities):
698 698 large8
699 699
700 700 $ cd ../a
701 701
702 702 Clone a largefiles repo.
703 703
704 704 $ hg clone . ../b
705 705 updating to branch default
706 706 getting changed largefiles
707 707 3 largefiles updated, 0 removed
708 708 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
709 709 $ cd ../b
710 710 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
711 711 7:daea875e9014 add/edit more largefiles
712 712 6:4355d653f84f edit files yet again
713 713 5:9d5af5072dbd edit files again
714 714 4:74c02385b94c move files
715 715 3:9e8fbc4bce62 copy files
716 716 2:51a0ae4d5864 remove files
717 717 1:ce8896473775 edit files
718 718 0:30d30fe6a5be add files
719 719 $ cat normal3
720 720 normal33
721 721
722 722 Test graph log
723 723
724 724 $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n'
725 725 @ 7:daea875e9014 add/edit more largefiles
726 726 |
727 727 o 6:4355d653f84f edit files yet again
728 728 |
729 729 o 5:9d5af5072dbd edit files again
730 730 |
731 731 o 4:74c02385b94c move files
732 732 |
733 733 o 3:9e8fbc4bce62 copy files
734 734 |
735 735 o 2:51a0ae4d5864 remove files
736 736 |
737 737 o 1:ce8896473775 edit files
738 738 |
739 739 o 0:30d30fe6a5be add files
740 740
741 741
742 742 Test log with --patch
743 743
744 744 $ hg log --patch -r 6::7
745 745 changeset: 6:4355d653f84f
746 746 user: test
747 747 date: Thu Jan 01 00:00:00 1970 +0000
748 748 summary: edit files yet again
749 749
750 750 diff -r 9d5af5072dbd -r 4355d653f84f .hglf/large3
751 751 --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000
752 752 +++ b/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000
753 753 @@ -1,1 +1,1 @@
754 754 -baaf12afde9d8d67f25dab6dced0d2bf77dba47c
755 755 +7838695e10da2bb75ac1156565f40a2595fa2fa0
756 756 diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4
757 757 --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000
758 758 +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000
759 759 @@ -1,1 +1,1 @@
760 760 -aeb2210d19f02886dde00dac279729a48471e2f9
761 761 +971fb41e78fea4f8e0ba5244784239371cb00591
762 762 diff -r 9d5af5072dbd -r 4355d653f84f normal3
763 763 --- a/normal3 Thu Jan 01 00:00:00 1970 +0000
764 764 +++ b/normal3 Thu Jan 01 00:00:00 1970 +0000
765 765 @@ -1,1 +1,1 @@
766 766 -normal3
767 767 +normal33
768 768 diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4
769 769 --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000
770 770 +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000
771 771 @@ -1,1 +1,1 @@
772 772 -normal4
773 773 +normal44
774 774
775 775 changeset: 7:daea875e9014
776 776 tag: tip
777 777 user: test
778 778 date: Thu Jan 01 00:00:00 1970 +0000
779 779 summary: add/edit more largefiles
780 780
781 781 diff -r 4355d653f84f -r daea875e9014 .hglf/large3
782 782 --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000
783 783 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
784 784 @@ -1,1 +0,0 @@
785 785 -7838695e10da2bb75ac1156565f40a2595fa2fa0
786 786 diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large6
787 787 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
788 788 +++ b/.hglf/sub2/large6 Thu Jan 01 00:00:00 1970 +0000
789 789 @@ -0,0 +1,1 @@
790 790 +0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30
791 791 diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large7
792 792 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
793 793 +++ b/.hglf/sub2/large7 Thu Jan 01 00:00:00 1970 +0000
794 794 @@ -0,0 +1,1 @@
795 795 +bb3151689acb10f0c3125c560d5e63df914bc1af
796 796
797 797
798 798 $ hg log --patch -r 6::7 sub/
799 799 changeset: 6:4355d653f84f
800 800 user: test
801 801 date: Thu Jan 01 00:00:00 1970 +0000
802 802 summary: edit files yet again
803 803
804 804 diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4
805 805 --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000
806 806 +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000
807 807 @@ -1,1 +1,1 @@
808 808 -aeb2210d19f02886dde00dac279729a48471e2f9
809 809 +971fb41e78fea4f8e0ba5244784239371cb00591
810 810 diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4
811 811 --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000
812 812 +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000
813 813 @@ -1,1 +1,1 @@
814 814 -normal4
815 815 +normal44
816 816
817 817
818 818 log with both --follow and --patch
819 819
820 820 $ hg log --follow --patch --limit 2
821 821 changeset: 7:daea875e9014
822 822 tag: tip
823 823 user: test
824 824 date: Thu Jan 01 00:00:00 1970 +0000
825 825 summary: add/edit more largefiles
826 826
827 827 diff -r 4355d653f84f -r daea875e9014 .hglf/large3
828 828 --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000
829 829 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
830 830 @@ -1,1 +0,0 @@
831 831 -7838695e10da2bb75ac1156565f40a2595fa2fa0
832 832 diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large6
833 833 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
834 834 +++ b/.hglf/sub2/large6 Thu Jan 01 00:00:00 1970 +0000
835 835 @@ -0,0 +1,1 @@
836 836 +0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30
837 837 diff -r 4355d653f84f -r daea875e9014 .hglf/sub2/large7
838 838 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
839 839 +++ b/.hglf/sub2/large7 Thu Jan 01 00:00:00 1970 +0000
840 840 @@ -0,0 +1,1 @@
841 841 +bb3151689acb10f0c3125c560d5e63df914bc1af
842 842
843 843 changeset: 6:4355d653f84f
844 844 user: test
845 845 date: Thu Jan 01 00:00:00 1970 +0000
846 846 summary: edit files yet again
847 847
848 848 diff -r 9d5af5072dbd -r 4355d653f84f .hglf/large3
849 849 --- a/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000
850 850 +++ b/.hglf/large3 Thu Jan 01 00:00:00 1970 +0000
851 851 @@ -1,1 +1,1 @@
852 852 -baaf12afde9d8d67f25dab6dced0d2bf77dba47c
853 853 +7838695e10da2bb75ac1156565f40a2595fa2fa0
854 854 diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4
855 855 --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000
856 856 +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000
857 857 @@ -1,1 +1,1 @@
858 858 -aeb2210d19f02886dde00dac279729a48471e2f9
859 859 +971fb41e78fea4f8e0ba5244784239371cb00591
860 860 diff -r 9d5af5072dbd -r 4355d653f84f normal3
861 861 --- a/normal3 Thu Jan 01 00:00:00 1970 +0000
862 862 +++ b/normal3 Thu Jan 01 00:00:00 1970 +0000
863 863 @@ -1,1 +1,1 @@
864 864 -normal3
865 865 +normal33
866 866 diff -r 9d5af5072dbd -r 4355d653f84f sub/normal4
867 867 --- a/sub/normal4 Thu Jan 01 00:00:00 1970 +0000
868 868 +++ b/sub/normal4 Thu Jan 01 00:00:00 1970 +0000
869 869 @@ -1,1 +1,1 @@
870 870 -normal4
871 871 +normal44
872 872
873 873 $ hg log --follow --patch sub/large4
874 874 changeset: 6:4355d653f84f
875 875 user: test
876 876 date: Thu Jan 01 00:00:00 1970 +0000
877 877 summary: edit files yet again
878 878
879 879 diff -r 9d5af5072dbd -r 4355d653f84f .hglf/sub/large4
880 880 --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000
881 881 +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000
882 882 @@ -1,1 +1,1 @@
883 883 -aeb2210d19f02886dde00dac279729a48471e2f9
884 884 +971fb41e78fea4f8e0ba5244784239371cb00591
885 885
886 886 changeset: 5:9d5af5072dbd
887 887 user: test
888 888 date: Thu Jan 01 00:00:00 1970 +0000
889 889 summary: edit files again
890 890
891 891 diff -r 74c02385b94c -r 9d5af5072dbd .hglf/sub/large4
892 892 --- a/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000
893 893 +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000
894 894 @@ -1,1 +1,1 @@
895 895 -eb7338044dc27f9bc59b8dd5a246b065ead7a9c4
896 896 +aeb2210d19f02886dde00dac279729a48471e2f9
897 897
898 898 changeset: 4:74c02385b94c
899 899 user: test
900 900 date: Thu Jan 01 00:00:00 1970 +0000
901 901 summary: move files
902 902
903 903 diff -r 9e8fbc4bce62 -r 74c02385b94c .hglf/sub/large4
904 904 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
905 905 +++ b/.hglf/sub/large4 Thu Jan 01 00:00:00 1970 +0000
906 906 @@ -0,0 +1,1 @@
907 907 +eb7338044dc27f9bc59b8dd5a246b065ead7a9c4
908 908
909 909 changeset: 1:ce8896473775
910 910 user: test
911 911 date: Thu Jan 01 00:00:00 1970 +0000
912 912 summary: edit files
913 913
914 914 diff -r 30d30fe6a5be -r ce8896473775 .hglf/sub/large2
915 915 --- a/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000
916 916 +++ b/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000
917 917 @@ -1,1 +1,1 @@
918 918 -1deebade43c8c498a3c8daddac0244dc55d1331d
919 919 +eb7338044dc27f9bc59b8dd5a246b065ead7a9c4
920 920
921 921 changeset: 0:30d30fe6a5be
922 922 user: test
923 923 date: Thu Jan 01 00:00:00 1970 +0000
924 924 summary: add files
925 925
926 926 diff -r 000000000000 -r 30d30fe6a5be .hglf/sub/large2
927 927 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
928 928 +++ b/.hglf/sub/large2 Thu Jan 01 00:00:00 1970 +0000
929 929 @@ -0,0 +1,1 @@
930 930 +1deebade43c8c498a3c8daddac0244dc55d1331d
931 931
932 932 $ cat sub/normal4
933 933 normal44
934 934 $ cat sub/large4
935 935 large44
936 936 $ cat sub2/large6
937 937 large6
938 938 $ cat sub2/large7
939 939 large7
940 940 $ hg log -qf sub2/large7
941 941 7:daea875e9014
942 942 $ hg log -Gqf sub2/large7
943 943 @ 7:daea875e9014
944 944 |
945 945 ~
946 946 $ cd ..
947 947
948 948 Test log from outside repo
949 949
950 950 $ hg log b/sub -T '{rev}:{node|short} {desc|firstline}\n'
951 951 6:4355d653f84f edit files yet again
952 952 5:9d5af5072dbd edit files again
953 953 4:74c02385b94c move files
954 954 1:ce8896473775 edit files
955 955 0:30d30fe6a5be add files
956 956
957 957 Test clone at revision
958 958
959 959 $ hg clone a -r 3 c
960 960 adding changesets
961 961 adding manifests
962 962 adding file changes
963 963 added 4 changesets with 10 changes to 4 files
964 964 new changesets 30d30fe6a5be:9e8fbc4bce62
965 965 updating to branch default
966 966 getting changed largefiles
967 967 2 largefiles updated, 0 removed
968 968 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
969 969 $ cd c
970 970 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
971 971 3:9e8fbc4bce62 copy files
972 972 2:51a0ae4d5864 remove files
973 973 1:ce8896473775 edit files
974 974 0:30d30fe6a5be add files
975 975 $ cat normal1
976 976 normal22
977 977 $ cat large1
978 978 large22
979 979 $ cat sub/normal2
980 980 normal22
981 981 $ cat sub/large2
982 982 large22
983 983
984 984 Old revisions of a clone have correct largefiles content (this also
985 985 tests update).
986 986
987 987 $ hg update -r 1
988 988 getting changed largefiles
989 989 1 largefiles updated, 0 removed
990 990 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
991 991 $ cat large1
992 992 large11
993 993 $ cat sub/large2
994 994 large22
995 995 $ cd ..
996 996
997 997 Test cloning with --all-largefiles flag
998 998
999 999 $ rm "${USERCACHE}"/*
1000 1000 $ hg clone --all-largefiles a a-backup
1001 1001 updating to branch default
1002 1002 getting changed largefiles
1003 1003 3 largefiles updated, 0 removed
1004 1004 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1005 1005 8 additional largefiles cached
1006 1006
1007 1007 $ rm "${USERCACHE}"/*
1008 1008 $ hg clone --all-largefiles -u 0 a a-clone0
1009 1009 updating to branch default
1010 1010 getting changed largefiles
1011 1011 2 largefiles updated, 0 removed
1012 1012 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
1013 1013 9 additional largefiles cached
1014 1014 $ hg -R a-clone0 sum
1015 1015 parent: 0:30d30fe6a5be
1016 1016 add files
1017 1017 branch: default
1018 1018 commit: (clean)
1019 1019 update: 7 new changesets (update)
1020 1020 phases: 8 draft
1021 1021
1022 1022 $ rm "${USERCACHE}"/*
1023 1023 $ hg clone --all-largefiles -u 1 a a-clone1
1024 1024 updating to branch default
1025 1025 getting changed largefiles
1026 1026 2 largefiles updated, 0 removed
1027 1027 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
1028 1028 8 additional largefiles cached
1029 1029 $ hg -R a-clone1 verify --large --lfa --lfc
1030 1030 checking changesets
1031 1031 checking manifests
1032 1032 crosschecking files in changesets and manifests
1033 1033 checking files
1034 1034 10 files, 8 changesets, 24 total revisions
1035 1035 searching 8 changesets for largefiles
1036 1036 verified contents of 13 revisions of 6 largefiles
1037 1037 $ hg -R a-clone1 sum
1038 1038 parent: 1:ce8896473775
1039 1039 edit files
1040 1040 branch: default
1041 1041 commit: (clean)
1042 1042 update: 6 new changesets (update)
1043 1043 phases: 8 draft
1044 1044
1045 1045 $ rm "${USERCACHE}"/*
1046 1046 $ hg clone --all-largefiles -U a a-clone-u
1047 1047 11 additional largefiles cached
1048 1048 $ hg -R a-clone-u sum
1049 1049 parent: -1:000000000000 (no revision checked out)
1050 1050 branch: default
1051 1051 commit: (clean)
1052 1052 update: 8 new changesets (update)
1053 1053 phases: 8 draft
1054 1054
1055 1055 Show computed destination directory:
1056 1056
1057 1057 $ mkdir xyz
1058 1058 $ cd xyz
1059 1059 $ hg clone ../a
1060 1060 destination directory: a
1061 1061 updating to branch default
1062 1062 getting changed largefiles
1063 1063 3 largefiles updated, 0 removed
1064 1064 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1065 1065 $ cd ..
1066 1066
1067 1067 Clone URL without path:
1068 1068
1069 1069 $ hg clone file://
1070 1070 abort: repository / not found!
1071 1071 [255]
1072 1072
1073 1073 Ensure base clone command argument validation
1074 1074
1075 1075 $ hg clone -U -u 0 a a-clone-failure
1076 1076 abort: cannot specify both --noupdate and --updaterev
1077 1077 [255]
1078 1078
1079 1079 $ hg clone --all-largefiles a ssh://localhost/a
1080 1080 abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a
1081 1081 [255]
1082 1082
1083 1083 Test pulling with --all-largefiles flag. Also test that the largefiles are
1084 1084 downloaded from 'default' instead of 'default-push' when no source is specified
1085 1085 (issue3584)
1086 1086
1087 1087 $ rm -Rf a-backup
1088 1088 $ hg clone -r 1 a a-backup
1089 1089 adding changesets
1090 1090 adding manifests
1091 1091 adding file changes
1092 1092 added 2 changesets with 8 changes to 4 files
1093 1093 new changesets 30d30fe6a5be:ce8896473775
1094 1094 updating to branch default
1095 1095 getting changed largefiles
1096 1096 2 largefiles updated, 0 removed
1097 1097 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
1098 1098 $ rm "${USERCACHE}"/*
1099 1099 $ cd a-backup
1100 1100 $ hg pull --all-largefiles --config paths.default-push=bogus/path
1101 1101 pulling from $TESTTMP/a
1102 1102 searching for changes
1103 1103 adding changesets
1104 1104 adding manifests
1105 1105 adding file changes
1106 1106 added 6 changesets with 16 changes to 8 files
1107 1107 new changesets 51a0ae4d5864:daea875e9014
1108 1108 (run 'hg update' to get a working copy)
1109 1109 6 largefiles cached
1110 1110
1111 1111 redo pull with --lfrev and check it pulls largefiles for the right revs
1112 1112
1113 1113 $ hg rollback
1114 1114 repository tip rolled back to revision 1 (undo pull)
1115 1115 $ hg pull -v --lfrev 'heads(pulled())+min(pulled())'
1116 1116 pulling from $TESTTMP/a
1117 1117 searching for changes
1118 1118 all local heads known remotely
1119 1119 6 changesets found
1120 1120 uncompressed size of bundle content:
1121 1121 1389 (changelog)
1122 1122 1599 (manifests)
1123 1123 254 .hglf/large1
1124 1124 564 .hglf/large3
1125 1125 572 .hglf/sub/large4
1126 1126 182 .hglf/sub2/large6
1127 1127 182 .hglf/sub2/large7
1128 1128 212 normal1
1129 1129 457 normal3
1130 1130 465 sub/normal4
1131 1131 adding changesets
1132 1132 adding manifests
1133 1133 adding file changes
1134 1134 added 6 changesets with 16 changes to 8 files
1135 1135 new changesets 51a0ae4d5864:daea875e9014
1136 1136 calling hook changegroup.lfiles: hgext.largefiles.reposetup.checkrequireslfiles
1137 1137 (run 'hg update' to get a working copy)
1138 1138 pulling largefiles for revision 7
1139 1139 found 971fb41e78fea4f8e0ba5244784239371cb00591 in store
1140 1140 found 0d6d75887db61b2c7e6c74b5dd8fc6ad50c0cc30 in store
1141 1141 found bb3151689acb10f0c3125c560d5e63df914bc1af in store
1142 1142 pulling largefiles for revision 2
1143 1143 found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store
1144 1144 0 largefiles cached
1145 1145
1146 1146 lfpull
1147 1147
1148 1148 $ hg lfpull -r : --config largefiles.usercache=usercache-lfpull
1149 1149 2 largefiles cached
1150 1150 $ hg lfpull -v -r 4+2 --config largefiles.usercache=usercache-lfpull
1151 1151 pulling largefiles for revision 4
1152 1152 found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store
1153 1153 found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store
1154 1154 pulling largefiles for revision 2
1155 1155 found eb7338044dc27f9bc59b8dd5a246b065ead7a9c4 in store
1156 1156 0 largefiles cached
1157 1157
1158 1158 $ ls usercache-lfpull/* | sort
1159 1159 usercache-lfpull/1deebade43c8c498a3c8daddac0244dc55d1331d
1160 1160 usercache-lfpull/4669e532d5b2c093a78eca010077e708a071bb64
1161 1161
1162 1162 $ cd ..
1163 1163
1164 1164 Rebasing between two repositories does not revert largefiles to old
1165 1165 revisions (this was a very bad bug that took a lot of work to fix).
1166 1166
1167 1167 $ hg clone a d
1168 1168 updating to branch default
1169 1169 getting changed largefiles
1170 1170 3 largefiles updated, 0 removed
1171 1171 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1172 1172 $ cd b
1173 1173 $ echo large4-modified > sub/large4
1174 1174 $ echo normal3-modified > normal3
1175 1175 $ hg commit -m "modify normal file and largefile in repo b"
1176 1176 Invoking status precommit hook
1177 1177 M normal3
1178 1178 M sub/large4
1179 1179 $ cd ../d
1180 1180 $ echo large6-modified > sub2/large6
1181 1181 $ echo normal4-modified > sub/normal4
1182 1182 $ hg commit -m "modify normal file largefile in repo d"
1183 1183 Invoking status precommit hook
1184 1184 M sub/normal4
1185 1185 M sub2/large6
1186 1186 $ cd ..
1187 1187 $ hg clone d e
1188 1188 updating to branch default
1189 1189 getting changed largefiles
1190 1190 3 largefiles updated, 0 removed
1191 1191 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1192 1192 $ cd d
1193 1193
1194 1194 More rebase testing, but also test that the largefiles are downloaded from
1195 1195 'default-push' when no source is specified (issue3584). (The largefile from the
1196 1196 pulled revision is however not downloaded but found in the local cache.)
1197 1197 Largefiles are fetched for the new pulled revision, not for existing revisions,
1198 1198 rebased or not.
1199 1199
1200 1200 $ [ ! -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ]
1201 1201 $ hg pull --rebase --all-largefiles --config paths.default-push=bogus/path --config paths.default=../b
1202 1202 pulling from $TESTTMP/b
1203 1203 searching for changes
1204 1204 adding changesets
1205 1205 adding manifests
1206 1206 adding file changes
1207 1207 added 1 changesets with 2 changes to 2 files (+1 heads)
1208 1208 new changesets a381d2c8c80e
1209 1209 rebasing 8:f574fb32bb45 "modify normal file largefile in repo d"
1210 1210 Invoking status precommit hook
1211 1211 M sub/normal4
1212 1212 M sub2/large6
1213 1213 saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-dd1d9f80-rebase.hg
1214 1214 0 largefiles cached
1215 1215 $ [ -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ]
1216 1216 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
1217 1217 9:598410d3eb9a modify normal file largefile in repo d
1218 1218 8:a381d2c8c80e modify normal file and largefile in repo b
1219 1219 7:daea875e9014 add/edit more largefiles
1220 1220 6:4355d653f84f edit files yet again
1221 1221 5:9d5af5072dbd edit files again
1222 1222 4:74c02385b94c move files
1223 1223 3:9e8fbc4bce62 copy files
1224 1224 2:51a0ae4d5864 remove files
1225 1225 1:ce8896473775 edit files
1226 1226 0:30d30fe6a5be add files
1227 1227 $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n'
1228 1228 @ 9:598410d3eb9a modify normal file largefile in repo d
1229 1229 |
1230 1230 o 8:a381d2c8c80e modify normal file and largefile in repo b
1231 1231 |
1232 1232 o 7:daea875e9014 add/edit more largefiles
1233 1233 |
1234 1234 o 6:4355d653f84f edit files yet again
1235 1235 |
1236 1236 o 5:9d5af5072dbd edit files again
1237 1237 |
1238 1238 o 4:74c02385b94c move files
1239 1239 |
1240 1240 o 3:9e8fbc4bce62 copy files
1241 1241 |
1242 1242 o 2:51a0ae4d5864 remove files
1243 1243 |
1244 1244 o 1:ce8896473775 edit files
1245 1245 |
1246 1246 o 0:30d30fe6a5be add files
1247 1247
1248 1248 $ cat normal3
1249 1249 normal3-modified
1250 1250 $ cat sub/normal4
1251 1251 normal4-modified
1252 1252 $ cat sub/large4
1253 1253 large4-modified
1254 1254 $ cat sub2/large6
1255 1255 large6-modified
1256 1256 $ cat sub2/large7
1257 1257 large7
1258 1258 $ cd ../e
1259 1259 $ hg pull ../b
1260 1260 pulling from ../b
1261 1261 searching for changes
1262 1262 adding changesets
1263 1263 adding manifests
1264 1264 adding file changes
1265 1265 added 1 changesets with 2 changes to 2 files (+1 heads)
1266 1266 new changesets a381d2c8c80e
1267 1267 (run 'hg heads' to see heads, 'hg merge' to merge)
1268 1268 $ hg rebase
1269 1269 rebasing 8:f574fb32bb45 "modify normal file largefile in repo d"
1270 1270 Invoking status precommit hook
1271 1271 M sub/normal4
1272 1272 M sub2/large6
1273 1273 saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-dd1d9f80-rebase.hg
1274 1274 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
1275 1275 9:598410d3eb9a modify normal file largefile in repo d
1276 1276 8:a381d2c8c80e modify normal file and largefile in repo b
1277 1277 7:daea875e9014 add/edit more largefiles
1278 1278 6:4355d653f84f edit files yet again
1279 1279 5:9d5af5072dbd edit files again
1280 1280 4:74c02385b94c move files
1281 1281 3:9e8fbc4bce62 copy files
1282 1282 2:51a0ae4d5864 remove files
1283 1283 1:ce8896473775 edit files
1284 1284 0:30d30fe6a5be add files
1285 1285 $ cat normal3
1286 1286 normal3-modified
1287 1287 $ cat sub/normal4
1288 1288 normal4-modified
1289 1289 $ cat sub/large4
1290 1290 large4-modified
1291 1291 $ cat sub2/large6
1292 1292 large6-modified
1293 1293 $ cat sub2/large7
1294 1294 large7
1295 1295
1296 1296 Log on largefiles
1297 1297
1298 1298 - same output
1299 1299 $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4
1300 1300 8:a381d2c8c80e modify normal file and largefile in repo b
1301 1301 6:4355d653f84f edit files yet again
1302 1302 5:9d5af5072dbd edit files again
1303 1303 4:74c02385b94c move files
1304 1304 $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4
1305 1305 o 8:a381d2c8c80e modify normal file and largefile in repo b
1306 1306 :
1307 1307 o 6:4355d653f84f edit files yet again
1308 1308 |
1309 1309 o 5:9d5af5072dbd edit files again
1310 1310 |
1311 1311 o 4:74c02385b94c move files
1312 1312 |
1313 1313 ~
1314 1314 $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub/large4
1315 1315 8:a381d2c8c80e modify normal file and largefile in repo b
1316 1316 6:4355d653f84f edit files yet again
1317 1317 5:9d5af5072dbd edit files again
1318 1318 4:74c02385b94c move files
1319 1319 $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub/large4
1320 1320 o 8:a381d2c8c80e modify normal file and largefile in repo b
1321 1321 :
1322 1322 o 6:4355d653f84f edit files yet again
1323 1323 |
1324 1324 o 5:9d5af5072dbd edit files again
1325 1325 |
1326 1326 o 4:74c02385b94c move files
1327 1327 |
1328 1328 ~
1329 1329
1330 1330 - .hglf only matches largefiles, without .hglf it matches 9 bco sub/normal
1331 1331 $ hg log --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub
1332 1332 8:a381d2c8c80e modify normal file and largefile in repo b
1333 1333 6:4355d653f84f edit files yet again
1334 1334 5:9d5af5072dbd edit files again
1335 1335 4:74c02385b94c move files
1336 1336 1:ce8896473775 edit files
1337 1337 0:30d30fe6a5be add files
1338 1338 $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' .hglf/sub
1339 1339 o 8:a381d2c8c80e modify normal file and largefile in repo b
1340 1340 :
1341 1341 o 6:4355d653f84f edit files yet again
1342 1342 |
1343 1343 o 5:9d5af5072dbd edit files again
1344 1344 |
1345 1345 o 4:74c02385b94c move files
1346 1346 :
1347 1347 o 1:ce8896473775 edit files
1348 1348 |
1349 1349 o 0:30d30fe6a5be add files
1350 1350
1351 1351 $ hg log --template '{rev}:{node|short} {desc|firstline}\n' sub
1352 1352 9:598410d3eb9a modify normal file largefile in repo d
1353 1353 8:a381d2c8c80e modify normal file and largefile in repo b
1354 1354 6:4355d653f84f edit files yet again
1355 1355 5:9d5af5072dbd edit files again
1356 1356 4:74c02385b94c move files
1357 1357 1:ce8896473775 edit files
1358 1358 0:30d30fe6a5be add files
1359 1359 $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' sub
1360 1360 @ 9:598410d3eb9a modify normal file largefile in repo d
1361 1361 |
1362 1362 o 8:a381d2c8c80e modify normal file and largefile in repo b
1363 1363 :
1364 1364 o 6:4355d653f84f edit files yet again
1365 1365 |
1366 1366 o 5:9d5af5072dbd edit files again
1367 1367 |
1368 1368 o 4:74c02385b94c move files
1369 1369 :
1370 1370 o 1:ce8896473775 edit files
1371 1371 |
1372 1372 o 0:30d30fe6a5be add files
1373 1373
1374 1374 - globbing gives same result
1375 1375 $ hg log --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*'
1376 1376 9:598410d3eb9a modify normal file largefile in repo d
1377 1377 8:a381d2c8c80e modify normal file and largefile in repo b
1378 1378 6:4355d653f84f edit files yet again
1379 1379 5:9d5af5072dbd edit files again
1380 1380 4:74c02385b94c move files
1381 1381 1:ce8896473775 edit files
1382 1382 0:30d30fe6a5be add files
1383 1383 $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n' 'glob:sub/*'
1384 1384 @ 9:598410d3eb9a modify normal file largefile in repo d
1385 1385 |
1386 1386 o 8:a381d2c8c80e modify normal file and largefile in repo b
1387 1387 :
1388 1388 o 6:4355d653f84f edit files yet again
1389 1389 |
1390 1390 o 5:9d5af5072dbd edit files again
1391 1391 |
1392 1392 o 4:74c02385b94c move files
1393 1393 :
1394 1394 o 1:ce8896473775 edit files
1395 1395 |
1396 1396 o 0:30d30fe6a5be add files
1397 1397
1398 1398 Rollback on largefiles.
1399 1399
1400 1400 $ echo large4-modified-again > sub/large4
1401 1401 $ hg commit -m "Modify large4 again"
1402 1402 Invoking status precommit hook
1403 1403 M sub/large4
1404 1404 $ hg rollback
1405 1405 repository tip rolled back to revision 9 (undo commit)
1406 1406 working directory now based on revision 9
1407 1407 $ hg st
1408 1408 M sub/large4
1409 1409 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
1410 1410 9:598410d3eb9a modify normal file largefile in repo d
1411 1411 8:a381d2c8c80e modify normal file and largefile in repo b
1412 1412 7:daea875e9014 add/edit more largefiles
1413 1413 6:4355d653f84f edit files yet again
1414 1414 5:9d5af5072dbd edit files again
1415 1415 4:74c02385b94c move files
1416 1416 3:9e8fbc4bce62 copy files
1417 1417 2:51a0ae4d5864 remove files
1418 1418 1:ce8896473775 edit files
1419 1419 0:30d30fe6a5be add files
1420 1420 $ cat sub/large4
1421 1421 large4-modified-again
1422 1422
1423 1423 "update --check" refuses to update with uncommitted changes.
1424 1424 $ hg update --check 8
1425 1425 abort: uncommitted changes
1426 1426 [255]
1427 1427
1428 1428 "update --clean" leaves correct largefiles in working copy, even when there is
1429 1429 .orig files from revert in .hglf.
1430 1430
1431 1431 $ echo mistake > sub2/large7
1432 1432 $ hg revert sub2/large7
1433 1433 $ cat sub2/large7
1434 1434 large7
1435 1435 $ cat sub2/large7.orig
1436 1436 mistake
1437 1437 $ test ! -f .hglf/sub2/large7.orig
1438 1438
1439 1439 $ hg -q update --clean -r null
1440 1440 $ hg update --clean
1441 1441 getting changed largefiles
1442 1442 3 largefiles updated, 0 removed
1443 1443 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1444 1444 $ cat normal3
1445 1445 normal3-modified
1446 1446 $ cat sub/normal4
1447 1447 normal4-modified
1448 1448 $ cat sub/large4
1449 1449 large4-modified
1450 1450 $ cat sub2/large6
1451 1451 large6-modified
1452 1452 $ cat sub2/large7
1453 1453 large7
1454 1454 $ cat sub2/large7.orig
1455 1455 mistake
1456 1456 $ test ! -f .hglf/sub2/large7.orig
1457 1457
1458 1458 verify that largefile .orig file no longer is overwritten on every update -C:
1459 1459 $ hg update --clean
1460 1460 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1461 1461 $ cat sub2/large7.orig
1462 1462 mistake
1463 1463 $ rm sub2/large7.orig
1464 1464
1465 1465 Now "update check" is happy.
1466 1466 $ hg update --check 8
1467 1467 getting changed largefiles
1468 1468 1 largefiles updated, 0 removed
1469 1469 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1470 1470 $ hg update --check
1471 1471 getting changed largefiles
1472 1472 1 largefiles updated, 0 removed
1473 1473 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1474 1474
1475 1475 Test removing empty largefiles directories on update
1476 1476 $ test -d sub2 && echo "sub2 exists"
1477 1477 sub2 exists
1478 1478 $ hg update -q null
1479 1479 $ test -d sub2 && echo "error: sub2 should not exist anymore"
1480 1480 [1]
1481 1481 $ hg update -q
1482 1482
1483 1483 Test hg remove removes empty largefiles directories
1484 1484 $ test -d sub2 && echo "sub2 exists"
1485 1485 sub2 exists
1486 1486 $ hg remove sub2/*
1487 1487 $ test -d sub2 && echo "error: sub2 should not exist anymore"
1488 1488 [1]
1489 1489 $ hg revert sub2/large6 sub2/large7
1490 1490
1491 1491 "revert" works on largefiles (and normal files too).
1492 1492 $ echo hack3 >> normal3
1493 1493 $ echo hack4 >> sub/normal4
1494 1494 $ echo hack4 >> sub/large4
1495 1495 $ rm sub2/large6
1496 1496 $ hg revert sub2/large6
1497 1497 $ hg rm sub2/large6
1498 1498 $ echo new >> sub2/large8
1499 1499 $ hg add --large sub2/large8
1500 1500 # XXX we don't really want to report that we're reverting the standin;
1501 1501 # that's just an implementation detail. But I don't see an obvious fix. ;-(
1502 1502 $ hg revert sub
1503 1503 reverting .hglf/sub/large4
1504 1504 reverting sub/normal4
1505 1505 $ hg status
1506 1506 M normal3
1507 1507 A sub2/large8
1508 1508 R sub2/large6
1509 1509 ? sub/large4.orig
1510 1510 ? sub/normal4.orig
1511 1511 $ cat sub/normal4
1512 1512 normal4-modified
1513 1513 $ cat sub/large4
1514 1514 large4-modified
1515 1515 $ hg revert -a --no-backup
1516 1516 undeleting .hglf/sub2/large6
1517 1517 forgetting .hglf/sub2/large8
1518 1518 reverting normal3
1519 1519 $ hg status
1520 1520 ? sub/large4.orig
1521 1521 ? sub/normal4.orig
1522 1522 ? sub2/large8
1523 1523 $ cat normal3
1524 1524 normal3-modified
1525 1525 $ cat sub2/large6
1526 1526 large6-modified
1527 1527 $ rm sub/*.orig sub2/large8
1528 1528
1529 1529 revert some files to an older revision
1530 1530 $ hg revert --no-backup -r 8 sub2
1531 1531 reverting .hglf/sub2/large6
1532 1532 $ cat sub2/large6
1533 1533 large6
1534 1534 $ hg revert --no-backup -C -r '.^' sub2
1535 1535 $ hg revert --no-backup sub2
1536 1536 reverting .hglf/sub2/large6
1537 1537 $ hg status
1538 1538
1539 1539 "verify --large" actually verifies largefiles
1540 1540
1541 1541 - Where Do We Come From? What Are We? Where Are We Going?
1542 1542 $ pwd
1543 1543 $TESTTMP/e
1544 1544 $ hg paths
1545 1545 default = $TESTTMP/d
1546 1546
1547 1547 $ hg verify --large
1548 1548 checking changesets
1549 1549 checking manifests
1550 1550 crosschecking files in changesets and manifests
1551 1551 checking files
1552 1552 10 files, 10 changesets, 28 total revisions
1553 1553 searching 1 changesets for largefiles
1554 1554 verified existence of 3 revisions of 3 largefiles
1555 1555
1556 1556 - introduce missing blob in local store repo and remote store
1557 1557 and make sure that this is caught:
1558 1558
1559 1559 $ mv $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 .
1560 1560 $ rm .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928
1561 1561 $ hg verify --large
1562 1562 checking changesets
1563 1563 checking manifests
1564 1564 crosschecking files in changesets and manifests
1565 1565 checking files
1566 1566 10 files, 10 changesets, 28 total revisions
1567 1567 searching 1 changesets for largefiles
1568 1568 changeset 9:598410d3eb9a: sub/large4 references missing $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928
1569 1569 verified existence of 3 revisions of 3 largefiles
1570 1570 [1]
1571 1571
1572 1572 - introduce corruption and make sure that it is caught when checking content:
1573 1573 $ echo '5 cents' > $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928
1574 1574 $ hg verify -q --large --lfc
1575 1575 changeset 9:598410d3eb9a: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928
1576 1576 [1]
1577 1577
1578 1578 - cleanup
1579 1579 $ cp e166e74c7303192238d60af5a9c4ce9bef0b7928 $TESTTMP/d/.hg/largefiles/
1580 1580 $ mv e166e74c7303192238d60af5a9c4ce9bef0b7928 .hg/largefiles/
1581 1581
1582 1582 - verifying all revisions will fail because we didn't clone all largefiles to d:
1583 1583 $ echo 'T-shirt' > $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4
1584 1584 $ hg verify -q --lfa --lfc
1585 1585 changeset 0:30d30fe6a5be: large1 references missing $TESTTMP/d/.hg/largefiles/4669e532d5b2c093a78eca010077e708a071bb64
1586 1586 changeset 0:30d30fe6a5be: sub/large2 references missing $TESTTMP/d/.hg/largefiles/1deebade43c8c498a3c8daddac0244dc55d1331d
1587 1587 changeset 1:ce8896473775: large1 references missing $TESTTMP/d/.hg/largefiles/5f78770c0e77ba4287ad6ef3071c9bf9c379742f
1588 1588 changeset 1:ce8896473775: sub/large2 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4
1589 1589 changeset 3:9e8fbc4bce62: large1 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4
1590 1590 changeset 4:74c02385b94c: large3 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4
1591 1591 changeset 4:74c02385b94c: sub/large4 references corrupted $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4
1592 1592 changeset 5:9d5af5072dbd: large3 references missing $TESTTMP/d/.hg/largefiles/baaf12afde9d8d67f25dab6dced0d2bf77dba47c
1593 1593 changeset 5:9d5af5072dbd: sub/large4 references missing $TESTTMP/d/.hg/largefiles/aeb2210d19f02886dde00dac279729a48471e2f9
1594 1594 changeset 6:4355d653f84f: large3 references missing $TESTTMP/d/.hg/largefiles/7838695e10da2bb75ac1156565f40a2595fa2fa0
1595 1595 [1]
1596 1596
1597 1597 - cleanup
1598 1598 $ rm $TESTTMP/d/.hg/largefiles/eb7338044dc27f9bc59b8dd5a246b065ead7a9c4
1599 1599 $ rm -f .hglf/sub/*.orig
1600 1600
1601 1601 Update to revision with missing largefile - and make sure it really is missing
1602 1602
1603 1603 $ rm ${USERCACHE}/7838695e10da2bb75ac1156565f40a2595fa2fa0
1604 1604 $ hg up -r 6
1605 1605 getting changed largefiles
1606 1606 large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob)
1607 1607 1 largefiles updated, 2 removed
1608 1608 4 files updated, 0 files merged, 2 files removed, 0 files unresolved
1609 1609 $ rm normal3
1610 1610 $ echo >> sub/normal4
1611 1611 $ hg ci -m 'commit with missing files'
1612 1612 Invoking status precommit hook
1613 1613 M sub/normal4
1614 1614 ! large3
1615 1615 ! normal3
1616 1616 created new head
1617 1617 $ hg st
1618 1618 ! large3
1619 1619 ! normal3
1620 1620 $ hg up -r.
1621 1621 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1622 1622 $ hg st
1623 1623 ! large3
1624 1624 ! normal3
1625 1625 $ hg up -Cr.
1626 1626 getting changed largefiles
1627 1627 large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob)
1628 1628 0 largefiles updated, 0 removed
1629 1629 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1630 1630 $ hg st
1631 1631 ! large3
1632 1632 $ hg rollback
1633 1633 repository tip rolled back to revision 9 (undo commit)
1634 1634 working directory now based on revision 6
1635 1635
1636 1636 Merge with revision with missing largefile - and make sure it tries to fetch it.
1637 1637
1638 1638 $ hg up -Cqr null
1639 1639 $ echo f > f
1640 1640 $ hg ci -Am branch
1641 1641 adding f
1642 1642 Invoking status precommit hook
1643 1643 A f
1644 1644 created new head
1645 1645 $ hg merge -r 6
1646 1646 getting changed largefiles
1647 1647 large3: largefile 7838695e10da2bb75ac1156565f40a2595fa2fa0 not available from file:/*/$TESTTMP/d (glob)
1648 1648 1 largefiles updated, 0 removed
1649 1649 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
1650 1650 (branch merge, don't forget to commit)
1651 1651
1652 1652 $ hg rollback -q
1653 1653 $ hg up -Cq
1654 1654
1655 1655 Pulling 0 revisions with --all-largefiles should not fetch for all revisions
1656 1656
1657 1657 $ hg pull --all-largefiles
1658 1658 pulling from $TESTTMP/d
1659 1659 searching for changes
1660 1660 no changes found
1661 1661
1662 1662 Merging does not revert to old versions of largefiles and also check
1663 1663 that merging after having pulled from a non-default remote works
1664 1664 correctly.
1665 1665
1666 1666 $ cd ..
1667 1667 $ hg clone -r 7 e temp
1668 1668 adding changesets
1669 1669 adding manifests
1670 1670 adding file changes
1671 1671 added 8 changesets with 24 changes to 10 files
1672 1672 new changesets 30d30fe6a5be:daea875e9014
1673 1673 updating to branch default
1674 1674 getting changed largefiles
1675 1675 3 largefiles updated, 0 removed
1676 1676 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1677 1677 $ hg clone temp f
1678 1678 updating to branch default
1679 1679 getting changed largefiles
1680 1680 3 largefiles updated, 0 removed
1681 1681 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1682 1682 # Delete the largefiles in the largefiles system cache so that we have an
1683 1683 # opportunity to test that caching after a pull works.
1684 1684 $ rm "${USERCACHE}"/*
1685 1685 $ cd f
1686 1686 $ echo "large4-merge-test" > sub/large4
1687 1687 $ hg commit -m "Modify large4 to test merge"
1688 1688 Invoking status precommit hook
1689 1689 M sub/large4
1690 1690 # Test --cache-largefiles flag
1691 1691 $ hg pull --lfrev 'heads(pulled())' ../e
1692 1692 pulling from ../e
1693 1693 searching for changes
1694 1694 adding changesets
1695 1695 adding manifests
1696 1696 adding file changes
1697 1697 added 2 changesets with 4 changes to 4 files (+1 heads)
1698 1698 new changesets a381d2c8c80e:598410d3eb9a
1699 1699 (run 'hg heads' to see heads, 'hg merge' to merge)
1700 1700 2 largefiles cached
1701 1701 $ hg merge
1702 1702 largefile sub/large4 has a merge conflict
1703 1703 ancestor was 971fb41e78fea4f8e0ba5244784239371cb00591
1704 1704 keep (l)ocal d846f26643bfa8ec210be40cc93cc6b7ff1128ea or
1705 1705 take (o)ther e166e74c7303192238d60af5a9c4ce9bef0b7928? l
1706 1706 getting changed largefiles
1707 1707 1 largefiles updated, 0 removed
1708 1708 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
1709 1709 (branch merge, don't forget to commit)
1710 1710 $ hg commit -m "Merge repos e and f"
1711 1711 Invoking status precommit hook
1712 1712 M normal3
1713 1713 M sub/normal4
1714 1714 M sub2/large6
1715 1715 $ cat normal3
1716 1716 normal3-modified
1717 1717 $ cat sub/normal4
1718 1718 normal4-modified
1719 1719 $ cat sub/large4
1720 1720 large4-merge-test
1721 1721 $ cat sub2/large6
1722 1722 large6-modified
1723 1723 $ cat sub2/large7
1724 1724 large7
1725 1725
1726 1726 Test status after merging with a branch that introduces a new largefile:
1727 1727
1728 1728 $ echo large > large
1729 1729 $ hg add --large large
1730 1730 $ hg commit -m 'add largefile'
1731 1731 Invoking status precommit hook
1732 1732 A large
1733 1733 $ hg update -q ".^"
1734 1734 $ echo change >> normal3
1735 1735 $ hg commit -m 'some change'
1736 1736 Invoking status precommit hook
1737 1737 M normal3
1738 1738 created new head
1739 1739 $ hg merge
1740 1740 getting changed largefiles
1741 1741 1 largefiles updated, 0 removed
1742 1742 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1743 1743 (branch merge, don't forget to commit)
1744 1744 $ hg status
1745 1745 M large
1746 1746
1747 1747 - make sure update of merge with removed largefiles fails as expected
1748 1748 $ hg rm sub2/large6
1749 1749 $ hg up -r.
1750 1750 abort: outstanding uncommitted merge
1751 1751 [255]
1752 1752
1753 1753 - revert should be able to revert files introduced in a pending merge
1754 1754 $ hg revert --all -r .
1755 1755 removing .hglf/large
1756 1756 undeleting .hglf/sub2/large6
1757 1757
1758 1758 Test that a normal file and a largefile with the same name and path cannot
1759 1759 coexist.
1760 1760
1761 1761 $ rm sub2/large7
1762 1762 $ echo "largeasnormal" > sub2/large7
1763 1763 $ hg add sub2/large7
1764 1764 sub2/large7 already a largefile
1765 1765
1766 1766 Test that transplanting a largefile change works correctly.
1767 1767
1768 1768 $ cd ..
1769 1769 $ hg clone -r 8 d g
1770 1770 adding changesets
1771 1771 adding manifests
1772 1772 adding file changes
1773 1773 added 9 changesets with 26 changes to 10 files
1774 1774 new changesets 30d30fe6a5be:a381d2c8c80e
1775 1775 updating to branch default
1776 1776 getting changed largefiles
1777 1777 3 largefiles updated, 0 removed
1778 1778 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
1779 1779 $ cd g
1780 1780 $ hg transplant -s ../d 598410d3eb9a
1781 1781 searching for changes
1782 1782 searching for changes
1783 1783 adding changesets
1784 1784 adding manifests
1785 1785 adding file changes
1786 1786 added 1 changesets with 2 changes to 2 files
1787 1787 new changesets 598410d3eb9a
1788 1788 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
1789 1789 9:598410d3eb9a modify normal file largefile in repo d
1790 1790 8:a381d2c8c80e modify normal file and largefile in repo b
1791 1791 7:daea875e9014 add/edit more largefiles
1792 1792 6:4355d653f84f edit files yet again
1793 1793 5:9d5af5072dbd edit files again
1794 1794 4:74c02385b94c move files
1795 1795 3:9e8fbc4bce62 copy files
1796 1796 2:51a0ae4d5864 remove files
1797 1797 1:ce8896473775 edit files
1798 1798 0:30d30fe6a5be add files
1799 1799 $ cat normal3
1800 1800 normal3-modified
1801 1801 $ cat sub/normal4
1802 1802 normal4-modified
1803 1803 $ cat sub/large4
1804 1804 large4-modified
1805 1805 $ cat sub2/large6
1806 1806 large6-modified
1807 1807 $ cat sub2/large7
1808 1808 large7
1809 1809
1810 1810 Cat a largefile
1811 1811 $ hg cat normal3
1812 1812 normal3-modified
1813 1813 $ hg cat sub/large4
1814 1814 large4-modified
1815 1815 $ rm "${USERCACHE}"/*
1816 1816 $ hg cat -r a381d2c8c80e -o cat.out sub/large4
1817 1817 $ cat cat.out
1818 1818 large4-modified
1819 1819 $ rm cat.out
1820 1820 $ hg cat -r a381d2c8c80e normal3
1821 1821 normal3-modified
1822 1822 $ hg cat -r '.^' normal3
1823 1823 normal3-modified
1824 1824 $ hg cat -r '.^' sub/large4 doesntexist
1825 1825 large4-modified
1826 1826 doesntexist: no such file in rev a381d2c8c80e
1827 1827 $ hg --cwd sub cat -r '.^' large4
1828 1828 large4-modified
1829 1829 $ hg --cwd sub cat -r '.^' ../normal3
1830 1830 normal3-modified
1831 1831 Cat a standin
1832 1832 $ hg cat .hglf/sub/large4
1833 1833 e166e74c7303192238d60af5a9c4ce9bef0b7928
1834 1834 $ hg cat .hglf/normal3
1835 1835 .hglf/normal3: no such file in rev 598410d3eb9a
1836 1836 [1]
1837 1837
1838 1838 Test that renaming a largefile results in correct output for status
1839 1839
1840 1840 $ hg rename sub/large4 large4-renamed
1841 1841 $ hg commit -m "test rename output"
1842 1842 Invoking status precommit hook
1843 1843 A large4-renamed
1844 1844 R sub/large4
1845 1845 $ cat large4-renamed
1846 1846 large4-modified
1847 1847 $ cd sub2
1848 1848 $ hg rename large6 large6-renamed
1849 1849 $ hg st
1850 1850 A sub2/large6-renamed
1851 1851 R sub2/large6
1852 1852 $ cd ..
1853 1853
1854 1854 Test --normal flag
1855 1855
1856 1856 $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null
1857 1857 $ hg add --normal --large new-largefile
1858 1858 abort: --normal cannot be used with --large
1859 1859 [255]
1860 1860 $ hg add --normal new-largefile
1861 1861 new-largefile: up to 69 MB of RAM may be required to manage this file
1862 1862 (use 'hg revert new-largefile' to cancel the pending addition)
1863 1863
1864 1864 Test explicit commit of switch between normal and largefile - make sure both
1865 1865 the add and the remove is committed.
1866 1866
1867 1867 $ hg up -qC
1868 1868 $ hg forget normal3 large4-renamed
1869 1869 $ hg add --large normal3
1870 1870 $ hg add large4-renamed
1871 1871 $ hg commit -m 'swap' normal3 large4-renamed
1872 1872 Invoking status precommit hook
1873 1873 A large4-renamed
1874 1874 A normal3
1875 1875 ? new-largefile
1876 1876 ? sub2/large6-renamed
1877 1877 $ hg mani
1878 1878 .hglf/normal3
1879 1879 .hglf/sub2/large6
1880 1880 .hglf/sub2/large7
1881 1881 large4-renamed
1882 1882 sub/normal4
1883 1883
1884 1884 $ cd ..
1885 1885
1886 1886
1887 1887
General Comments 0
You need to be logged in to leave comments. Login now