##// END OF EJS Templates
tests: convert some 'hghave symlink' to #if...
Mads Kiilerich -
r16908:6a997aac default
parent child Browse files
Show More
@@ -1,28 +1,24 b''
1 $ "$TESTDIR/hghave" symlink || exit 80
2
3 $ hg init
1 $ hg init
4
2
5 should fail
3 audit of .hg
6
4
7 $ hg add .hg/00changelog.i
5 $ hg add .hg/00changelog.i
8 abort: path contains illegal component: .hg/00changelog.i (glob)
6 abort: path contains illegal component: .hg/00changelog.i (glob)
9 [255]
7 [255]
10
8
9 #if symlink
10
11 Symlinks
12
11 $ mkdir a
13 $ mkdir a
12 $ echo a > a/a
14 $ echo a > a/a
13 $ hg ci -Ama
15 $ hg ci -Ama
14 adding a/a
16 adding a/a
15 $ ln -s a b
17 $ ln -s a b
16 $ echo b > a/b
18 $ echo b > a/b
17
18 should fail
19
20 $ hg add b/b
19 $ hg add b/b
21 abort: path 'b/b' traverses symbolic link 'b' (glob)
20 abort: path 'b/b' traverses symbolic link 'b' (glob)
22 [255]
21 [255]
23
24 should succeed
25
26 $ hg add b
22 $ hg add b
27
23
28 should still fail - maybe
24 should still fail - maybe
@@ -31,6 +27,9 b' should still fail - maybe'
31 abort: path 'b/b' traverses symbolic link 'b' (glob)
27 abort: path 'b/b' traverses symbolic link 'b' (glob)
32 [255]
28 [255]
33
29
30 #endif
31
32
34 unbundle tampered bundle
33 unbundle tampered bundle
35
34
36 $ hg init target
35 $ hg init target
@@ -47,7 +46,7 b' attack .hg/test'
47 $ hg manifest -r0
46 $ hg manifest -r0
48 .hg/test
47 .hg/test
49 $ hg update -Cr0
48 $ hg update -Cr0
50 abort: path contains illegal component: .hg/test
49 abort: path contains illegal component: .hg/test (glob)
51 [255]
50 [255]
52
51
53 attack foo/.hg/test
52 attack foo/.hg/test
@@ -55,7 +54,7 b' attack foo/.hg/test'
55 $ hg manifest -r1
54 $ hg manifest -r1
56 foo/.hg/test
55 foo/.hg/test
57 $ hg update -Cr1
56 $ hg update -Cr1
58 abort: path 'foo/.hg/test' is inside nested repo 'foo'
57 abort: path 'foo/.hg/test' is inside nested repo 'foo' (glob)
59 [255]
58 [255]
60
59
61 attack back/test where back symlinks to ..
60 attack back/test where back symlinks to ..
@@ -63,16 +62,23 b' attack back/test where back symlinks to '
63 $ hg manifest -r2
62 $ hg manifest -r2
64 back
63 back
65 back/test
64 back/test
65 #if symlink
66 $ hg update -Cr2
66 $ hg update -Cr2
67 abort: path 'back/test' traverses symbolic link 'back'
67 abort: path 'back/test' traverses symbolic link 'back'
68 [255]
68 [255]
69 #else
70 ('back' will be a file and cause some other system specific error)
71 $ hg update -Cr2
72 abort: * (glob)
73 [255]
74 #endif
69
75
70 attack ../test
76 attack ../test
71
77
72 $ hg manifest -r3
78 $ hg manifest -r3
73 ../test
79 ../test
74 $ hg update -Cr3
80 $ hg update -Cr3
75 abort: path contains illegal component: ../test
81 abort: path contains illegal component: ../test (glob)
76 [255]
82 [255]
77
83
78 attack /tmp/test
84 attack /tmp/test
@@ -1,4 +1,4 b''
1 $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80
1 $ "$TESTDIR/hghave" unix-permissions serve || exit 80
2
2
3 $ cat <<EOF >> $HGRCPATH
3 $ cat <<EOF >> $HGRCPATH
4 > [extensions]
4 > [extensions]
@@ -658,6 +658,8 b' Status after rollback:'
658 $ hg update --clean
658 $ hg update --clean
659 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
659 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
660
660
661 #if symlink
662
661 cp symlink file; hg cp -A symlink file (part2)
663 cp symlink file; hg cp -A symlink file (part2)
662 - copied symlink points to kw ignored file: do not overwrite
664 - copied symlink points to kw ignored file: do not overwrite
663
665
@@ -679,6 +681,8 b' cp symlink file; hg cp -A symlink file ('
679 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
681 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
680 $ rm i symignored
682 $ rm i symignored
681
683
684 #endif
685
682 Custom keywordmaps as argument to kwdemo
686 Custom keywordmaps as argument to kwdemo
683
687
684 $ hg --quiet kwdemo "Xinfo = {author}: {desc}"
688 $ hg --quiet kwdemo "Xinfo = {author}: {desc}"
@@ -1,4 +1,4 b''
1 $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80
1 $ "$TESTDIR/hghave" unix-permissions serve || exit 80
2 $ USERCACHE=`pwd`/cache; export USERCACHE
2 $ USERCACHE=`pwd`/cache; export USERCACHE
3 $ mkdir -p ${USERCACHE}
3 $ mkdir -p ${USERCACHE}
4 $ cat >> $HGRCPATH <<EOF
4 $ cat >> $HGRCPATH <<EOF
@@ -1051,6 +1051,8 b' We have to simulate that here by setting'
1051 $ chmod -R u+w alice/pubrepo
1051 $ chmod -R u+w alice/pubrepo
1052 $ HOME="$ORIGHOME"
1052 $ HOME="$ORIGHOME"
1053
1053
1054 #if symlink
1055
1054 Symlink to a large largefile should behave the same as a symlink to a normal file
1056 Symlink to a large largefile should behave the same as a symlink to a normal file
1055 $ hg init largesymlink
1057 $ hg init largesymlink
1056 $ cd largesymlink
1058 $ cd largesymlink
@@ -1076,6 +1078,8 b' Symlink to a large largefile should beha'
1076 $ test -L largelink
1078 $ test -L largelink
1077 $ cd ..
1079 $ cd ..
1078
1080
1081 #endif
1082
1079 test for pattern matching on 'hg status':
1083 test for pattern matching on 'hg status':
1080 to boost performance, largefiles checks whether specified patterns are
1084 to boost performance, largefiles checks whether specified patterns are
1081 related to largefiles in working directory (NOT to STANDIN) or not.
1085 related to largefiles in working directory (NOT to STANDIN) or not.
@@ -1,5 +1,3 b''
1 $ "$TESTDIR/hghave" symlink || exit 80
2
3 $ cat >> $HGRCPATH <<EOF
1 $ cat >> $HGRCPATH <<EOF
4 > [extensions]
2 > [extensions]
5 > largefiles =
3 > largefiles =
@@ -33,6 +31,7 b''
33 adding sub/normal2
31 adding sub/normal2
34 $ hg commit -m"add large, normal1" large normal1
32 $ hg commit -m"add large, normal1" large normal1
35 $ hg commit -m"add sub/*" sub
33 $ hg commit -m"add sub/*" sub
34
36 Test tag parsing
35 Test tag parsing
37 $ cat >> .hgtags <<EOF
36 $ cat >> .hgtags <<EOF
38 > IncorrectlyFormattedTag!
37 > IncorrectlyFormattedTag!
@@ -41,10 +40,8 b' Test tag parsing'
41 > EOF
40 > EOF
42 $ hg add .hgtags
41 $ hg add .hgtags
43 $ hg commit -m"add large2" large2 .hgtags
42 $ hg commit -m"add large2" large2 .hgtags
44 $ hg rename large2 large3
43
45 Test link+rename largefile codepath
44 Test link+rename largefile codepath
46 $ ln -sf large large3
47 $ hg commit -m"make large2 a symlink" large2 large3
48 $ [ -d .hg/largefiles ] && echo fail || echo pass
45 $ [ -d .hg/largefiles ] && echo fail || echo pass
49 pass
46 pass
50 $ cd ..
47 $ cd ..
@@ -53,13 +50,24 b' Test link+rename largefile codepath'
53 skipping incorrectly formatted tag IncorrectlyFormattedTag!
50 skipping incorrectly formatted tag IncorrectlyFormattedTag!
54 skipping incorrectly formatted id invalidhash
51 skipping incorrectly formatted id invalidhash
55 no mapping for id 0123456789abcdef
52 no mapping for id 0123456789abcdef
53 #if symlink
54 $ hg --cwd bigfile-repo rename large2 large3
55 $ ln -sf large bigfile-repo/large3
56 $ hg --cwd bigfile-repo commit -m"make large2 a symlink" large2 large3
57 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo-symlink
58 initializing destination largefiles-repo-symlink
59 skipping incorrectly formatted tag IncorrectlyFormattedTag!
60 skipping incorrectly formatted id invalidhash
61 no mapping for id 0123456789abcdef
56 abort: renamed/copied largefile large3 becomes symlink
62 abort: renamed/copied largefile large3 becomes symlink
57 [255]
63 [255]
64 #endif
58 $ cd bigfile-repo
65 $ cd bigfile-repo
59 $ hg strip --no-backup 2
66 $ hg strip --no-backup 2
60 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
67 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
61 $ cd ..
68 $ cd ..
62 $ rm -rf largefiles-repo
69 $ rm -rf largefiles-repo largefiles-repo-symlink
70
63 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
71 $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
64 initializing destination largefiles-repo
72 initializing destination largefiles-repo
65
73
General Comments 0
You need to be logged in to leave comments. Login now