Show More
@@ -1,5 +1,4 b'' | |||||
1 | $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80 |
|
1 | $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80 | |
2 |
|
||||
3 | $ USERCACHE=`pwd`/cache; export USERCACHE |
|
2 | $ USERCACHE=`pwd`/cache; export USERCACHE | |
4 | $ mkdir -p ${USERCACHE} |
|
3 | $ mkdir -p ${USERCACHE} | |
5 | $ cat >> $HGRCPATH <<EOF |
|
4 | $ cat >> $HGRCPATH <<EOF | |
@@ -14,6 +13,8 b'' | |||||
14 | > minsize=2 |
|
13 | > minsize=2 | |
15 | > patterns=glob:**.dat |
|
14 | > patterns=glob:**.dat | |
16 | > usercache=${USERCACHE} |
|
15 | > usercache=${USERCACHE} | |
|
16 | > [hooks] | |||
|
17 | > precommit=echo "Invoking status precommit hook"; hg status | |||
17 |
|
|
18 | > EOF | |
18 |
|
19 | |||
19 | Create the repo with a couple of revisions of both large and normal |
|
20 | Create the repo with a couple of revisions of both large and normal | |
@@ -30,22 +31,21 b' is correct.' | |||||
30 | $ hg add normal1 sub/normal2 |
|
31 | $ hg add normal1 sub/normal2 | |
31 | $ hg add --large large1 sub/large2 |
|
32 | $ hg add --large large1 sub/large2 | |
32 | $ hg commit -m "add files" |
|
33 | $ hg commit -m "add files" | |
|
34 | Invoking status precommit hook | |||
|
35 | A large1 | |||
|
36 | A normal1 | |||
|
37 | A sub/large2 | |||
|
38 | A sub/normal2 | |||
33 |
$ |
|
39 | $ echo normal11 > normal1 | |
34 | $ echo normal22 > sub/normal2 |
|
40 | $ echo normal22 > sub/normal2 | |
35 | $ echo large11 > large1 |
|
41 | $ echo large11 > large1 | |
36 | $ echo large22 > sub/large2 |
|
42 | $ echo large22 > sub/large2 | |
37 | $ hg st |
|
43 | $ hg commit -m "edit files" | |
|
44 | Invoking status precommit hook | |||
38 | M large1 |
|
45 | M large1 | |
39 | M normal1 |
|
46 | M normal1 | |
40 | M sub/large2 |
|
47 | M sub/large2 | |
41 | M sub/normal2 |
|
48 | M sub/normal2 | |
42 | $ hg sum |
|
|||
43 | parent: 0:30d30fe6a5be tip |
|
|||
44 | add files |
|
|||
45 | branch: default |
|
|||
46 | commit: 4 modified |
|
|||
47 | update: (current) |
|
|||
48 | $ hg commit -m "edit files" |
|
|||
49 |
$ |
|
49 | $ hg sum --large | |
50 | parent: 1:ce8896473775 tip |
|
50 | parent: 1:ce8896473775 tip | |
51 | edit files |
|
51 | edit files | |
@@ -69,6 +69,9 b' Remove both largefiles and normal files.' | |||||
69 |
|
69 | |||
70 | $ hg remove normal1 large1 |
|
70 | $ hg remove normal1 large1 | |
71 | $ hg commit -m "remove files" |
|
71 | $ hg commit -m "remove files" | |
|
72 | Invoking status precommit hook | |||
|
73 | R large1 | |||
|
74 | R normal1 | |||
72 |
$ |
|
75 | $ ls | |
73 | sub |
|
76 | sub | |
74 | $ echo "testlargefile" > large1-test |
|
77 | $ echo "testlargefile" > large1-test | |
@@ -88,10 +91,10 b' Copy both largefiles and normal files (t' | |||||
88 |
|
91 | |||
89 | $ hg cp sub/normal2 normal1 |
|
92 | $ hg cp sub/normal2 normal1 | |
90 | $ hg cp sub/large2 large1 |
|
93 | $ hg cp sub/large2 large1 | |
91 | $ hg st |
|
94 | $ hg commit -m "copy files" | |
|
95 | Invoking status precommit hook | |||
92 | A large1 |
|
96 | A large1 | |
93 | A normal1 |
|
97 | A normal1 | |
94 | $ hg commit -m "copy files" |
|
|||
95 |
$ |
|
98 | $ cat normal1 | |
96 | normal22 |
|
99 | normal22 | |
97 | $ cat large1 |
|
100 | $ cat large1 | |
@@ -104,6 +107,15 b' Test moving largefiles and verify that n' | |||||
104 | $ hg mv sub/normal2 sub/normal4 |
|
107 | $ hg mv sub/normal2 sub/normal4 | |
105 | $ hg mv sub/large2 sub/large4 |
|
108 | $ hg mv sub/large2 sub/large4 | |
106 | $ hg commit -m "move files" |
|
109 | $ hg commit -m "move files" | |
|
110 | Invoking status precommit hook | |||
|
111 | A large3 | |||
|
112 | A normal3 | |||
|
113 | A sub/large4 | |||
|
114 | A sub/normal4 | |||
|
115 | R large1 | |||
|
116 | R normal1 | |||
|
117 | R sub/large2 | |||
|
118 | R sub/normal2 | |||
107 |
$ |
|
119 | $ cat normal3 | |
108 | normal22 |
|
120 | normal22 | |
109 | $ cat large3 |
|
121 | $ cat large3 | |
@@ -173,6 +185,11 b' Commit corner case: specify files to com' | |||||
173 | $ echo normal4 > sub/normal4 |
|
185 | $ echo normal4 > sub/normal4 | |
174 | $ echo large4 > sub/large4 |
|
186 | $ echo large4 > sub/large4 | |
175 | $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again" |
|
187 | $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again" | |
|
188 | Invoking status precommit hook | |||
|
189 | M large3 | |||
|
190 | M normal3 | |||
|
191 | M sub/large4 | |||
|
192 | M sub/normal4 | |||
176 |
$ |
|
193 | $ cat normal3 | |
177 | normal3 |
|
194 | normal3 | |
178 | $ cat large3 |
|
195 | $ cat large3 | |
@@ -191,6 +208,11 b' One more commit corner case: commit from' | |||||
191 | $ echo large44 > sub/large4 |
|
208 | $ echo large44 > sub/large4 | |
192 | $ cd sub |
|
209 | $ cd sub | |
193 | $ hg commit -m "edit files yet again" |
|
210 | $ hg commit -m "edit files yet again" | |
|
211 | Invoking status precommit hook | |||
|
212 | M large3 | |||
|
213 | M normal3 | |||
|
214 | M sub/large4 | |||
|
215 | M sub/normal4 | |||
194 |
$ |
|
216 | $ cat ../normal3 | |
195 | normal33 |
|
217 | normal33 | |
196 | $ cat ../large3 |
|
218 | $ cat ../large3 | |
@@ -255,7 +277,8 b' also tests that --lfsize overrides large' | |||||
255 | Test forget on largefiles. |
|
277 | Test forget on largefiles. | |
256 |
|
278 | |||
257 | $ hg forget large3 large5 test.dat reallylarge ratherlarge medium |
|
279 | $ hg forget large3 large5 test.dat reallylarge ratherlarge medium | |
258 | $ hg st |
|
280 | $ hg commit -m "add/edit more largefiles" | |
|
281 | Invoking status precommit hook | |||
259 | A sub2/large6 |
|
282 | A sub2/large6 | |
260 | A sub2/large7 |
|
283 | A sub2/large7 | |
261 | R large3 |
|
284 | R large3 | |
@@ -265,7 +288,6 b' Test forget on largefiles.' | |||||
265 | ? ratherlarge |
|
288 | ? ratherlarge | |
266 | ? reallylarge |
|
289 | ? reallylarge | |
267 | ? test.dat |
|
290 | ? test.dat | |
268 | $ hg commit -m "add/edit more largefiles" |
|
|||
269 | $ hg st |
|
291 | $ hg st | |
270 | ? large3 |
|
292 | ? large3 | |
271 | ? large5 |
|
293 | ? large5 | |
@@ -377,10 +399,16 b' revisions (this was a very bad bug that ' | |||||
377 | $ echo large4-modified > sub/large4 |
|
399 | $ echo large4-modified > sub/large4 | |
378 | $ echo normal3-modified > normal3 |
|
400 | $ echo normal3-modified > normal3 | |
379 | $ hg commit -m "modify normal file and largefile in repo b" |
|
401 | $ hg commit -m "modify normal file and largefile in repo b" | |
|
402 | Invoking status precommit hook | |||
|
403 | M normal3 | |||
|
404 | M sub/large4 | |||
380 | $ cd ../d |
|
405 | $ cd ../d | |
381 | $ echo large6-modified > sub2/large6 |
|
406 | $ echo large6-modified > sub2/large6 | |
382 | $ echo normal4-modified > sub/normal4 |
|
407 | $ echo normal4-modified > sub/normal4 | |
383 | $ hg commit -m "modify normal file largefile in repo d" |
|
408 | $ hg commit -m "modify normal file largefile in repo d" | |
|
409 | Invoking status precommit hook | |||
|
410 | M sub/normal4 | |||
|
411 | M sub2/large6 | |||
384 | $ cd .. |
|
412 | $ cd .. | |
385 | $ hg clone d e |
|
413 | $ hg clone d e | |
386 | updating to branch default |
|
414 | updating to branch default | |
@@ -397,7 +425,10 b' revisions (this was a very bad bug that ' | |||||
397 | added 1 changesets with 2 changes to 2 files (+1 heads) |
|
425 | added 1 changesets with 2 changes to 2 files (+1 heads) | |
398 | getting changed largefiles |
|
426 | getting changed largefiles | |
399 | 1 largefiles updated, 0 removed |
|
427 | 1 largefiles updated, 0 removed | |
400 | saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob) |
|
428 | Invoking status precommit hook | |
|
429 | M sub/normal4 | |||
|
430 | M sub2/large6 | |||
|
431 | saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg | |||
401 | nothing to rebase |
|
432 | nothing to rebase | |
402 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
433 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
403 | 9:598410d3eb9a modify normal file largefile in repo d |
|
434 | 9:598410d3eb9a modify normal file largefile in repo d | |
@@ -432,7 +463,10 b' revisions (this was a very bad bug that ' | |||||
432 | $ hg rebase |
|
463 | $ hg rebase | |
433 | getting changed largefiles |
|
464 | getting changed largefiles | |
434 | 1 largefiles updated, 0 removed |
|
465 | 1 largefiles updated, 0 removed | |
435 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob) |
|
466 | Invoking status precommit hook | |
|
467 | M sub/normal4 | |||
|
468 | M sub2/large6 | |||
|
469 | saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg | |||
436 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' |
|
470 | $ hg log --template '{rev}:{node|short} {desc|firstline}\n' | |
437 | 9:598410d3eb9a modify normal file largefile in repo d |
|
471 | 9:598410d3eb9a modify normal file largefile in repo d | |
438 | 8:a381d2c8c80e modify normal file and largefile in repo b |
|
472 | 8:a381d2c8c80e modify normal file and largefile in repo b | |
@@ -459,6 +493,8 b' Rollback on largefiles.' | |||||
459 |
|
493 | |||
460 | $ echo large4-modified-again > sub/large4 |
|
494 | $ echo large4-modified-again > sub/large4 | |
461 | $ hg commit -m "Modify large4 again" |
|
495 | $ hg commit -m "Modify large4 again" | |
|
496 | Invoking status precommit hook | |||
|
497 | M sub/large4 | |||
462 | $ hg rollback |
|
498 | $ hg rollback | |
463 | repository tip rolled back to revision 9 (undo commit) |
|
499 | repository tip rolled back to revision 9 (undo commit) | |
464 | working directory now based on revision 9 |
|
500 | working directory now based on revision 9 | |
@@ -582,6 +618,8 b' been very problematic).' | |||||
582 | $ cd f |
|
618 | $ cd f | |
583 | $ echo "large4-merge-test" > sub/large4 |
|
619 | $ echo "large4-merge-test" > sub/large4 | |
584 | $ hg commit -m "Modify large4 to test merge" |
|
620 | $ hg commit -m "Modify large4 to test merge" | |
|
621 | Invoking status precommit hook | |||
|
622 | M sub/large4 | |||
585 | $ hg pull ../e |
|
623 | $ hg pull ../e | |
586 | pulling from ../e |
|
624 | pulling from ../e | |
587 | searching for changes |
|
625 | searching for changes | |
@@ -599,6 +637,10 b' been very problematic).' | |||||
599 | getting changed largefiles |
|
637 | getting changed largefiles | |
600 | 1 largefiles updated, 0 removed |
|
638 | 1 largefiles updated, 0 removed | |
601 | $ hg commit -m "Merge repos e and f" |
|
639 | $ hg commit -m "Merge repos e and f" | |
|
640 | Invoking status precommit hook | |||
|
641 | M normal3 | |||
|
642 | M sub/normal4 | |||
|
643 | M sub2/large6 | |||
602 | $ cat normal3 |
|
644 | $ cat normal3 | |
603 | normal3-modified |
|
645 | normal3-modified | |
604 | $ cat sub/normal4 |
|
646 | $ cat sub/normal4 | |
@@ -615,9 +657,13 b' Test status after merging with a branch ' | |||||
615 | $ echo large > large |
|
657 | $ echo large > large | |
616 | $ hg add --large large |
|
658 | $ hg add --large large | |
617 | $ hg commit -m 'add largefile' |
|
659 | $ hg commit -m 'add largefile' | |
|
660 | Invoking status precommit hook | |||
|
661 | A large | |||
618 | $ hg update -q ".^" |
|
662 | $ hg update -q ".^" | |
619 | $ echo change >> normal3 |
|
663 | $ echo change >> normal3 | |
620 | $ hg commit -m 'some change' |
|
664 | $ hg commit -m 'some change' | |
|
665 | Invoking status precommit hook | |||
|
666 | M normal3 | |||
621 | created new head |
|
667 | created new head | |
622 | $ hg merge |
|
668 | $ hg merge | |
623 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
669 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
@@ -682,10 +728,10 b' Test that transplanting a largefile chan' | |||||
682 | Test that renaming a largefile results in correct output for status |
|
728 | Test that renaming a largefile results in correct output for status | |
683 |
|
729 | |||
684 | $ hg rename sub/large4 large4-renamed |
|
730 | $ hg rename sub/large4 large4-renamed | |
685 | $ hg st |
|
731 | $ hg commit -m "test rename output" | |
|
732 | Invoking status precommit hook | |||
686 | A large4-renamed |
|
733 | A large4-renamed | |
687 | R sub/large4 |
|
734 | R sub/large4 | |
688 | $ hg commit -m "test rename output" |
|
|||
689 | $ cat large4-renamed |
|
735 | $ cat large4-renamed | |
690 | large4-modified |
|
736 | large4-modified | |
691 | $ cd sub2 |
|
737 | $ cd sub2 | |
@@ -701,7 +747,9 b' vanilla clients not locked out from larg' | |||||
701 | $ hg init |
|
747 | $ hg init | |
702 | $ echo c1 > f1 |
|
748 | $ echo c1 > f1 | |
703 | $ hg add f1 |
|
749 | $ hg add f1 | |
704 | $ hg com -m "m1" |
|
750 | $ hg commit -m "m1" | |
|
751 | Invoking status precommit hook | |||
|
752 | A f1 | |||
705 | $ cd .. |
|
753 | $ cd .. | |
706 | $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid |
|
754 | $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid | |
707 | $ cat hg.pid >> $DAEMON_PIDS |
|
755 | $ cat hg.pid >> $DAEMON_PIDS | |
@@ -732,7 +780,9 b' vanilla clients locked out from largefil' | |||||
732 | $ hg init |
|
780 | $ hg init | |
733 | $ echo c1 > f1 |
|
781 | $ echo c1 > f1 | |
734 | $ hg add --large f1 |
|
782 | $ hg add --large f1 | |
735 | $ hg com -m "m1" |
|
783 | $ hg commit -m "m1" | |
|
784 | Invoking status precommit hook | |||
|
785 | A f1 | |||
736 | $ cd .. |
|
786 | $ cd .. | |
737 | $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid |
|
787 | $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid | |
738 | $ cat hg.pid >> $DAEMON_PIDS |
|
788 | $ cat hg.pid >> $DAEMON_PIDS | |
@@ -762,7 +812,9 b' largefiles clients refuse to push largef' | |||||
762 | $ hg init |
|
812 | $ hg init | |
763 | $ echo c1 > f1 |
|
813 | $ echo c1 > f1 | |
764 | $ hg add f1 |
|
814 | $ hg add f1 | |
765 | $ hg com -m "m1" |
|
815 | $ hg commit -m "m1" | |
|
816 | Invoking status precommit hook | |||
|
817 | A f1 | |||
766 | $ cat >> .hg/hgrc <<! |
|
818 | $ cat >> .hg/hgrc <<! | |
767 | > [web] |
|
819 | > [web] | |
768 | > push_ssl = false |
|
820 | > push_ssl = false | |
@@ -775,7 +827,9 b' largefiles clients refuse to push largef' | |||||
775 | $ cd r7 |
|
827 | $ cd r7 | |
776 | $ echo c2 > f2 |
|
828 | $ echo c2 > f2 | |
777 | $ hg add --large f2 |
|
829 | $ hg add --large f2 | |
778 | $ hg com -m "m2" |
|
830 | $ hg commit -m "m2" | |
|
831 | Invoking status precommit hook | |||
|
832 | A f2 | |||
779 | $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid |
|
833 | $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid | |
780 | $ cat ../hg.pid >> $DAEMON_PIDS |
|
834 | $ cat ../hg.pid >> $DAEMON_PIDS | |
781 | $ hg push http://localhost:$HGPORT |
|
835 | $ hg push http://localhost:$HGPORT | |
@@ -811,6 +865,8 b' We have to simulate that here by setting' | |||||
811 | $ dd if=/dev/urandom bs=1k count=11k > a-large-file 2> /dev/null |
|
865 | $ dd if=/dev/urandom bs=1k count=11k > a-large-file 2> /dev/null | |
812 | $ hg add --large a-large-file |
|
866 | $ hg add --large a-large-file | |
813 | $ hg commit -m "Add a large file" |
|
867 | $ hg commit -m "Add a large file" | |
|
868 | Invoking status precommit hook | |||
|
869 | A a-large-file | |||
814 | $ cd .. |
|
870 | $ cd .. | |
815 | $ chmod -R a-w pubrepo |
|
871 | $ chmod -R a-w pubrepo | |
816 | $ cd .. |
|
872 | $ cd .. | |
@@ -837,9 +893,13 b' Symlink to a large largefile should beha' | |||||
837 | $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null |
|
893 | $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null | |
838 | $ hg add --large largefile |
|
894 | $ hg add --large largefile | |
839 | $ hg commit -m "commit a large file" |
|
895 | $ hg commit -m "commit a large file" | |
|
896 | Invoking status precommit hook | |||
|
897 | A largefile | |||
840 | $ ln -s largefile largelink |
|
898 | $ ln -s largefile largelink | |
841 | $ hg add largelink |
|
899 | $ hg add largelink | |
842 | $ hg commit -m "commit a large symlink" |
|
900 | $ hg commit -m "commit a large symlink" | |
|
901 | Invoking status precommit hook | |||
|
902 | A largelink | |||
843 | $ rm -f largelink |
|
903 | $ rm -f largelink | |
844 | $ hg up >/dev/null |
|
904 | $ hg up >/dev/null | |
845 | $ test -f largelink |
|
905 | $ test -f largelink |
General Comments 0
You need to be logged in to leave comments.
Login now