##// END OF EJS Templates
largefiles: add tests for uncovered codepaths (issue3092)...
Levi Bard -
r15810:3d11da21 default
parent child Browse files
Show More
@@ -3,6 +3,7 b''
3 > largefiles =
3 > largefiles =
4 > share =
4 > share =
5 > graphlog =
5 > graphlog =
6 > mq =
6 > [largefiles]
7 > [largefiles]
7 > minsize = 0.5
8 > minsize = 0.5
8 > patterns = **.other
9 > patterns = **.other
@@ -18,21 +19,47 b''
18 > EOF
19 > EOF
19 $ mkdir sub
20 $ mkdir sub
20 $ dd if=/dev/zero bs=1k count=256 > large 2> /dev/null
21 $ dd if=/dev/zero bs=1k count=256 > large 2> /dev/null
22 $ dd if=/dev/zero bs=1k count=256 > large2 2> /dev/null
21 $ echo normal > normal1
23 $ echo normal > normal1
22 $ echo alsonormal > sub/normal2
24 $ echo alsonormal > sub/normal2
23 $ dd if=/dev/zero bs=1k count=10 > sub/maybelarge.dat 2> /dev/null
25 $ dd if=/dev/zero bs=1k count=10 > sub/maybelarge.dat 2> /dev/null
24 $ hg addremove
26 $ hg addremove
25 adding large
27 adding large
28 adding large2
26 adding normal1
29 adding normal1
27 adding sub/maybelarge.dat
30 adding sub/maybelarge.dat
28 adding sub/normal2
31 adding sub/normal2
29 $ hg commit -m"add large, normal1" large normal1
32 $ hg commit -m"add large, normal1" large normal1
30 $ hg commit -m"add sub/*" sub
33 $ hg commit -m"add sub/*" sub
34 Test tag parsing
35 $ cat >> .hgtags <<EOF
36 > IncorrectlyFormattedTag!
37 > invalidhash sometag
38 > 0123456789abcdef anothertag
39 > EOF
40 $ hg add .hgtags
41 $ hg commit -m"add large2" large2 .hgtags
42 $ hg rename large2 large3
43 Test link+rename largefile codepath
44 $ ln -sf large large3
45 $ hg commit -m"make large2 a symlink" large2 large3
31 $ [ -d .hg/largefiles ] && echo fail || echo pass
46 $ [ -d .hg/largefiles ] && echo fail || echo pass
32 pass
47 pass
33 $ cd ..
48 $ cd ..
34 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
49 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
35 initializing destination largefiles-repo
50 initializing destination largefiles-repo
51 skipping incorrectly formatted tag IncorrectlyFormattedTag!
52 skipping incorrectly formatted id invalidhash
53 no mapping for id 0123456789abcdef
54 abort: renamed/copied largefile large3 becomes symlink
55 [255]
56 $ cd bigfile-repo
57 $ hg strip --no-backup 2
58 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
59 $ cd ..
60 $ rm -rf largefiles-repo
61 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
62 initializing destination largefiles-repo
36
63
37 "lfconvert" converts content correctly
64 "lfconvert" converts content correctly
38 $ cd largefiles-repo
65 $ cd largefiles-repo
General Comments 0
You need to be logged in to leave comments. Login now