##// END OF EJS Templates
tests: move test bundles in a bundles/ subdirectory
Nicolas Dumazet -
r14116:cd303243 default
parent child Browse files
Show More
1 NO CONTENT: file renamed from tests/darcs1.hg to tests/bundles/darcs1.hg
NO CONTENT: file renamed from tests/darcs1.hg to tests/bundles/darcs1.hg
1 NO CONTENT: file renamed from tests/legacy-encoding.hg to tests/bundles/legacy-encoding.hg
NO CONTENT: file renamed from tests/legacy-encoding.hg to tests/bundles/legacy-encoding.hg
1 NO CONTENT: file renamed from tests/tampered.hg to tests/bundles/tampered.hg
NO CONTENT: file renamed from tests/tampered.hg to tests/bundles/tampered.hg
1 NO CONTENT: file renamed from tests/test-keyword.hg to tests/bundles/test-keyword.hg
NO CONTENT: file renamed from tests/test-keyword.hg to tests/bundles/test-keyword.hg
1 NO CONTENT: file renamed from tests/test-manifest.hg to tests/bundles/test-manifest.hg
NO CONTENT: file renamed from tests/test-manifest.hg to tests/bundles/test-manifest.hg
1 NO CONTENT: file renamed from tests/test-merge-symlinks.hg to tests/bundles/test-merge-symlinks.hg
NO CONTENT: file renamed from tests/test-merge-symlinks.hg to tests/bundles/test-merge-symlinks.hg
1 NO CONTENT: file renamed from tests/test-no-symlinks.hg to tests/bundles/test-no-symlinks.hg
NO CONTENT: file renamed from tests/test-no-symlinks.hg to tests/bundles/test-no-symlinks.hg
@@ -1,82 +1,82 b''
1 $ hg init
1 $ hg init
2
2
3 should fail
3 should fail
4
4
5 $ hg add .hg/00changelog.i
5 $ hg add .hg/00changelog.i
6 abort: path contains illegal component: .hg/00changelog.i
6 abort: path contains illegal component: .hg/00changelog.i
7 [255]
7 [255]
8
8
9 $ mkdir a
9 $ mkdir a
10 $ echo a > a/a
10 $ echo a > a/a
11 $ hg ci -Ama
11 $ hg ci -Ama
12 adding a/a
12 adding a/a
13 $ ln -s a b
13 $ ln -s a b
14 $ echo b > a/b
14 $ echo b > a/b
15
15
16 should fail
16 should fail
17
17
18 $ hg add b/b
18 $ hg add b/b
19 abort: path 'b/b' traverses symbolic link 'b'
19 abort: path 'b/b' traverses symbolic link 'b'
20 [255]
20 [255]
21
21
22 should succeed
22 should succeed
23
23
24 $ hg add b
24 $ hg add b
25
25
26 should still fail - maybe
26 should still fail - maybe
27
27
28 $ hg add b/b
28 $ hg add b/b
29 abort: path 'b/b' traverses symbolic link 'b'
29 abort: path 'b/b' traverses symbolic link 'b'
30 [255]
30 [255]
31
31
32 unbundle tampered bundle
32 unbundle tampered bundle
33
33
34 $ hg init target
34 $ hg init target
35 $ cd target
35 $ cd target
36 $ hg unbundle $TESTDIR/tampered.hg
36 $ hg unbundle $TESTDIR/bundles/tampered.hg
37 adding changesets
37 adding changesets
38 adding manifests
38 adding manifests
39 adding file changes
39 adding file changes
40 added 5 changesets with 6 changes to 6 files (+4 heads)
40 added 5 changesets with 6 changes to 6 files (+4 heads)
41 (run 'hg heads' to see heads, 'hg merge' to merge)
41 (run 'hg heads' to see heads, 'hg merge' to merge)
42
42
43 attack .hg/test
43 attack .hg/test
44
44
45 $ hg manifest -r0
45 $ hg manifest -r0
46 .hg/test
46 .hg/test
47 $ hg update -Cr0
47 $ hg update -Cr0
48 abort: path contains illegal component: .hg/test
48 abort: path contains illegal component: .hg/test
49 [255]
49 [255]
50
50
51 attack foo/.hg/test
51 attack foo/.hg/test
52
52
53 $ hg manifest -r1
53 $ hg manifest -r1
54 foo/.hg/test
54 foo/.hg/test
55 $ hg update -Cr1
55 $ hg update -Cr1
56 abort: path 'foo/.hg/test' is inside nested repo 'foo'
56 abort: path 'foo/.hg/test' is inside nested repo 'foo'
57 [255]
57 [255]
58
58
59 attack back/test where back symlinks to ..
59 attack back/test where back symlinks to ..
60
60
61 $ hg manifest -r2
61 $ hg manifest -r2
62 back
62 back
63 back/test
63 back/test
64 $ hg update -Cr2
64 $ hg update -Cr2
65 abort: path 'back/test' traverses symbolic link 'back'
65 abort: path 'back/test' traverses symbolic link 'back'
66 [255]
66 [255]
67
67
68 attack ../test
68 attack ../test
69
69
70 $ hg manifest -r3
70 $ hg manifest -r3
71 ../test
71 ../test
72 $ hg update -Cr3
72 $ hg update -Cr3
73 abort: path contains illegal component: ../test
73 abort: path contains illegal component: ../test
74 [255]
74 [255]
75
75
76 attack /tmp/test
76 attack /tmp/test
77
77
78 $ hg manifest -r4
78 $ hg manifest -r4
79 /tmp/test
79 /tmp/test
80 $ hg update -Cr4
80 $ hg update -Cr4
81 abort: No such file or directory: $TESTTMP/target//tmp/test
81 abort: No such file or directory: $TESTTMP/target//tmp/test
82 [255]
82 [255]
@@ -1,143 +1,143 b''
1
1
2 $ "$TESTDIR/hghave" darcs || exit 80
2 $ "$TESTDIR/hghave" darcs || exit 80
3 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "[extensions]" >> $HGRCPATH
4 $ echo "convert=" >> $HGRCPATH
4 $ echo "convert=" >> $HGRCPATH
5 $ echo 'graphlog =' >> $HGRCPATH
5 $ echo 'graphlog =' >> $HGRCPATH
6 $ DARCS_EMAIL='test@example.org'; export DARCS_EMAIL
6 $ DARCS_EMAIL='test@example.org'; export DARCS_EMAIL
7
7
8 skip if we can't import elementtree
8 skip if we can't import elementtree
9
9
10 $ mkdir dummy
10 $ mkdir dummy
11 $ mkdir dummy/_darcs
11 $ mkdir dummy/_darcs
12 $ if hg convert dummy 2>&1 | grep ElementTree > /dev/null; then
12 $ if hg convert dummy 2>&1 | grep ElementTree > /dev/null; then
13 > echo 'skipped: missing feature: elementtree module'
13 > echo 'skipped: missing feature: elementtree module'
14 > exit 80
14 > exit 80
15 > fi
15 > fi
16
16
17 try converting darcs1 repository
17 try converting darcs1 repository
18
18
19 $ hg clone -q "$TESTDIR/darcs1.hg" darcs
19 $ hg clone -q "$TESTDIR/bundles/darcs1.hg" darcs
20 $ hg convert -s darcs darcs/darcs1 2>&1 | grep darcs-1.0
20 $ hg convert -s darcs darcs/darcs1 2>&1 | grep darcs-1.0
21 darcs-1.0 repository format is unsupported, please upgrade
21 darcs-1.0 repository format is unsupported, please upgrade
22
22
23 initialize darcs repo
23 initialize darcs repo
24
24
25 $ mkdir darcs-repo
25 $ mkdir darcs-repo
26 $ cd darcs-repo
26 $ cd darcs-repo
27 $ darcs init
27 $ darcs init
28 $ echo a > a
28 $ echo a > a
29 $ darcs record -a -l -m p0
29 $ darcs record -a -l -m p0
30 Finished recording patch 'p0'
30 Finished recording patch 'p0'
31 $ cd ..
31 $ cd ..
32
32
33 branch and update
33 branch and update
34
34
35 $ darcs get darcs-repo darcs-clone >/dev/null
35 $ darcs get darcs-repo darcs-clone >/dev/null
36 $ cd darcs-clone
36 $ cd darcs-clone
37 $ echo c >> a
37 $ echo c >> a
38 $ echo c > c
38 $ echo c > c
39 $ darcs record -a -l -m p1.1
39 $ darcs record -a -l -m p1.1
40 Finished recording patch 'p1.1'
40 Finished recording patch 'p1.1'
41 $ cd ..
41 $ cd ..
42
42
43 update source
43 update source
44
44
45 $ cd darcs-repo
45 $ cd darcs-repo
46 $ echo b >> a
46 $ echo b >> a
47 $ echo b > b
47 $ echo b > b
48 $ darcs record -a -l -m p1.2
48 $ darcs record -a -l -m p1.2
49 Finished recording patch 'p1.2'
49 Finished recording patch 'p1.2'
50
50
51 $ darcs pull -a ../darcs-clone
51 $ darcs pull -a ../darcs-clone
52 Backing up ./a(-darcs-backup0)
52 Backing up ./a(-darcs-backup0)
53 We have conflicts in the following files:
53 We have conflicts in the following files:
54 ./a
54 ./a
55 Finished pulling and applying.
55 Finished pulling and applying.
56 $ sleep 1
56 $ sleep 1
57 $ echo e > a
57 $ echo e > a
58 $ echo f > f
58 $ echo f > f
59 $ mkdir dir
59 $ mkdir dir
60 $ echo d > dir/d
60 $ echo d > dir/d
61 $ echo d > dir/d2
61 $ echo d > dir/d2
62 $ darcs record -a -l -m p2
62 $ darcs record -a -l -m p2
63 Finished recording patch 'p2'
63 Finished recording patch 'p2'
64
64
65 test file and directory move
65 test file and directory move
66
66
67 $ darcs mv f ff
67 $ darcs mv f ff
68
68
69 Test remove + move
69 Test remove + move
70
70
71 $ darcs remove dir/d2
71 $ darcs remove dir/d2
72 $ rm dir/d2
72 $ rm dir/d2
73 $ darcs mv dir dir2
73 $ darcs mv dir dir2
74 $ darcs record -a -l -m p3
74 $ darcs record -a -l -m p3
75 Finished recording patch 'p3'
75 Finished recording patch 'p3'
76
76
77 test utf-8 commit message and author
77 test utf-8 commit message and author
78
78
79 $ echo g > g
79 $ echo g > g
80
80
81 darcs is encoding agnostic, so it takes whatever bytes it's given
81 darcs is encoding agnostic, so it takes whatever bytes it's given
82
82
83 $ darcs record -a -l -m 'p4: desc Γ±' -A 'author Γ±'
83 $ darcs record -a -l -m 'p4: desc Γ±' -A 'author Γ±'
84 Finished recording patch 'p4: desc \xc3\xb1' (esc)
84 Finished recording patch 'p4: desc \xc3\xb1' (esc)
85
85
86 Test latin-1 commit message
86 Test latin-1 commit message
87
87
88 $ echo h > h
88 $ echo h > h
89 $ printf "p5: desc " > ../p5
89 $ printf "p5: desc " > ../p5
90 $ python -c 'print "".join([chr(i) for i in range(128, 256)])' >> ../p5
90 $ python -c 'print "".join([chr(i) for i in range(128, 256)])' >> ../p5
91 $ darcs record -a -l --logfile ../p5
91 $ darcs record -a -l --logfile ../p5
92 Finished recording patch 'p5: desc \x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff' (esc)
92 Finished recording patch 'p5: desc \x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff' (esc)
93
93
94 $ glog()
94 $ glog()
95 > {
95 > {
96 > HGENCODING=utf-8 hg glog --template '{rev} "{desc|firstline}" ({author}) files: {files}\n' "$@"
96 > HGENCODING=utf-8 hg glog --template '{rev} "{desc|firstline}" ({author}) files: {files}\n' "$@"
97 > }
97 > }
98 $ cd ..
98 $ cd ..
99 $ hg convert darcs-repo darcs-repo-hg
99 $ hg convert darcs-repo darcs-repo-hg
100 initializing destination darcs-repo-hg repository
100 initializing destination darcs-repo-hg repository
101 scanning source...
101 scanning source...
102 sorting...
102 sorting...
103 converting...
103 converting...
104 6 p0
104 6 p0
105 5 p1.2
105 5 p1.2
106 4 p1.1
106 4 p1.1
107 3 p2
107 3 p2
108 2 p3
108 2 p3
109 1 p4: desc ?
109 1 p4: desc ?
110 0 p5: desc ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
110 0 p5: desc ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
111
111
112 The converter does not currently handle patch conflicts very well.
112 The converter does not currently handle patch conflicts very well.
113 When they occur, it reverts *all* changes and moves forward,
113 When they occur, it reverts *all* changes and moves forward,
114 letting the conflict resolving patch fix collisions.
114 letting the conflict resolving patch fix collisions.
115 Unfortunately, non-conflicting changes, like the addition of the
115 Unfortunately, non-conflicting changes, like the addition of the
116 "c" file in p1.1 patch are reverted too.
116 "c" file in p1.1 patch are reverted too.
117 Just to say that manifest not listing "c" here is a bug.
117 Just to say that manifest not listing "c" here is a bug.
118
118
119 $ HGENCODING=latin-1 glog -R darcs-repo-hg -r 6
119 $ HGENCODING=latin-1 glog -R darcs-repo-hg -r 6
120 o 6 "p5: desc \xc2\x80\xc2\x81\xc2\x82\xc2\x83\xc2\x84\xc2\x85\xc2\x86\xc2\x87\xc2\x88\xc2\x89\xc2\x8a\xc2\x8b\xc2\x8c\xc2\x8d\xc2\x8e\xc2\x8f\xc2\x90\xc2\x91\xc2\x92\xc2\x93\xc2\x94\xc2\x95\xc2\x96\xc2\x97\xc2\x98\xc2\x99\xc2\x9a\xc2\x9b\xc2\x9c\xc2\x9d\xc2\x9e\xc2\x9f\xc2\xa0\xc2\xa1\xc2\xa2\xc2\xa3\xc2\xa4\xc2\xa5\xc2\xa6\xc2\xa7\xc2\xa8\xc2\xa9\xc2\xaa\xc2\xab\xc2\xac\xc2\xad\xc2\xae\xc2\xaf\xc2\xb0\xc2\xb1\xc2\xb2\xc2\xb3\xc2\xb4\xc2\xb5\xc2\xb6\xc2\xb7\xc2\xb8\xc2\xb9\xc2\xba\xc2\xbb\xc2\xbc\xc2\xbd\xc2\xbe\xc2\xbf\xc3\x80\xc3\x81\xc3\x82\xc3\x83\xc3\x84\xc3\x85\xc3\x86\xc3\x87\xc3\x88\xc3\x89\xc3\x8a\xc3\x8b\xc3\x8c\xc3\x8d\xc3\x8e\xc3\x8f\xc3\x90\xc3\x91\xc3\x92\xc3\x93\xc3\x94\xc3\x95\xc3\x96\xc3\x97\xc3\x98\xc3\x99\xc3\x9a\xc3\x9b\xc3\x9c\xc3\x9d\xc3\x9e\xc3\x9f\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4\xc3\xa5\xc3\xa6\xc3\xa7\xc3\xa8\xc3\xa9\xc3\xaa\xc3\xab\xc3\xac\xc3\xad\xc3\xae\xc3\xaf\xc3\xb0\xc3\xb1\xc3\xb2\xc3\xb3\xc3\xb4\xc3\xb5\xc3\xb6\xc3\xb7\xc3\xb8\xc3\xb9\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3\xbe\xc3\xbf" (test@example.org) files: h (esc)
120 o 6 "p5: desc \xc2\x80\xc2\x81\xc2\x82\xc2\x83\xc2\x84\xc2\x85\xc2\x86\xc2\x87\xc2\x88\xc2\x89\xc2\x8a\xc2\x8b\xc2\x8c\xc2\x8d\xc2\x8e\xc2\x8f\xc2\x90\xc2\x91\xc2\x92\xc2\x93\xc2\x94\xc2\x95\xc2\x96\xc2\x97\xc2\x98\xc2\x99\xc2\x9a\xc2\x9b\xc2\x9c\xc2\x9d\xc2\x9e\xc2\x9f\xc2\xa0\xc2\xa1\xc2\xa2\xc2\xa3\xc2\xa4\xc2\xa5\xc2\xa6\xc2\xa7\xc2\xa8\xc2\xa9\xc2\xaa\xc2\xab\xc2\xac\xc2\xad\xc2\xae\xc2\xaf\xc2\xb0\xc2\xb1\xc2\xb2\xc2\xb3\xc2\xb4\xc2\xb5\xc2\xb6\xc2\xb7\xc2\xb8\xc2\xb9\xc2\xba\xc2\xbb\xc2\xbc\xc2\xbd\xc2\xbe\xc2\xbf\xc3\x80\xc3\x81\xc3\x82\xc3\x83\xc3\x84\xc3\x85\xc3\x86\xc3\x87\xc3\x88\xc3\x89\xc3\x8a\xc3\x8b\xc3\x8c\xc3\x8d\xc3\x8e\xc3\x8f\xc3\x90\xc3\x91\xc3\x92\xc3\x93\xc3\x94\xc3\x95\xc3\x96\xc3\x97\xc3\x98\xc3\x99\xc3\x9a\xc3\x9b\xc3\x9c\xc3\x9d\xc3\x9e\xc3\x9f\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4\xc3\xa5\xc3\xa6\xc3\xa7\xc3\xa8\xc3\xa9\xc3\xaa\xc3\xab\xc3\xac\xc3\xad\xc3\xae\xc3\xaf\xc3\xb0\xc3\xb1\xc3\xb2\xc3\xb3\xc3\xb4\xc3\xb5\xc3\xb6\xc3\xb7\xc3\xb8\xc3\xb9\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3\xbe\xc3\xbf" (test@example.org) files: h (esc)
121 |
121 |
122 $ HGENCODING=utf-8 glog -R darcs-repo-hg -r 0:5
122 $ HGENCODING=utf-8 glog -R darcs-repo-hg -r 0:5
123 o 5 "p4: desc \xc3\xb1" (author \xc3\xb1) files: g (esc)
123 o 5 "p4: desc \xc3\xb1" (author \xc3\xb1) files: g (esc)
124 |
124 |
125 o 4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff
125 o 4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff
126 |
126 |
127 o 3 "p2" (test@example.org) files: a dir/d dir/d2 f
127 o 3 "p2" (test@example.org) files: a dir/d dir/d2 f
128 |
128 |
129 o 2 "p1.1" (test@example.org) files:
129 o 2 "p1.1" (test@example.org) files:
130 |
130 |
131 o 1 "p1.2" (test@example.org) files: a b
131 o 1 "p1.2" (test@example.org) files: a b
132 |
132 |
133 o 0 "p0" (test@example.org) files: a
133 o 0 "p0" (test@example.org) files: a
134
134
135
135
136 $ hg up -q -R darcs-repo-hg
136 $ hg up -q -R darcs-repo-hg
137 $ hg -R darcs-repo-hg manifest --debug
137 $ hg -R darcs-repo-hg manifest --debug
138 7225b30cdf38257d5cc7780772c051b6f33e6d6b 644 a
138 7225b30cdf38257d5cc7780772c051b6f33e6d6b 644 a
139 1e88685f5ddec574a34c70af492f95b6debc8741 644 b
139 1e88685f5ddec574a34c70af492f95b6debc8741 644 b
140 37406831adc447ec2385014019599dfec953c806 644 dir2/d
140 37406831adc447ec2385014019599dfec953c806 644 dir2/d
141 b783a337463792a5c7d548ad85a7d3253c16ba8c 644 ff
141 b783a337463792a5c7d548ad85a7d3253c16ba8c 644 ff
142 0973eb1b2ecc4de7fafe7447ce1b7462108b4848 644 g
142 0973eb1b2ecc4de7fafe7447ce1b7462108b4848 644 g
143 fe6f8b4f507fe3eb524c527192a84920a4288dac 644 h
143 fe6f8b4f507fe3eb524c527192a84920a4288dac 644 h
@@ -1,249 +1,249 b''
1 Test character encoding
1 Test character encoding
2
2
3 $ hg init t
3 $ hg init t
4 $ cd t
4 $ cd t
5
5
6 we need a repo with some legacy latin-1 changesets
6 we need a repo with some legacy latin-1 changesets
7
7
8 $ hg unbundle $TESTDIR/legacy-encoding.hg
8 $ hg unbundle $TESTDIR/bundles/legacy-encoding.hg
9 adding changesets
9 adding changesets
10 adding manifests
10 adding manifests
11 adding file changes
11 adding file changes
12 added 2 changesets with 2 changes to 1 files
12 added 2 changesets with 2 changes to 1 files
13 (run 'hg update' to get a working copy)
13 (run 'hg update' to get a working copy)
14 $ hg co
14 $ hg co
15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 $ python << EOF
16 $ python << EOF
17 > f = file('latin-1', 'w'); f.write("latin-1 e' encoded: \xe9"); f.close()
17 > f = file('latin-1', 'w'); f.write("latin-1 e' encoded: \xe9"); f.close()
18 > f = file('utf-8', 'w'); f.write("utf-8 e' encoded: \xc3\xa9"); f.close()
18 > f = file('utf-8', 'w'); f.write("utf-8 e' encoded: \xc3\xa9"); f.close()
19 > f = file('latin-1-tag', 'w'); f.write("\xe9"); f.close()
19 > f = file('latin-1-tag', 'w'); f.write("\xe9"); f.close()
20 > EOF
20 > EOF
21
21
22 should fail with encoding error
22 should fail with encoding error
23
23
24 $ echo "plain old ascii" > a
24 $ echo "plain old ascii" > a
25 $ hg st
25 $ hg st
26 M a
26 M a
27 ? latin-1
27 ? latin-1
28 ? latin-1-tag
28 ? latin-1-tag
29 ? utf-8
29 ? utf-8
30 $ HGENCODING=ascii hg ci -l latin-1
30 $ HGENCODING=ascii hg ci -l latin-1
31 transaction abort!
31 transaction abort!
32 rollback completed
32 rollback completed
33 abort: decoding near ' encoded: \xe9': 'ascii' codec can't decode byte 0xe9 in position 20: ordinal not in range(128)! (esc)
33 abort: decoding near ' encoded: \xe9': 'ascii' codec can't decode byte 0xe9 in position 20: ordinal not in range(128)! (esc)
34 [255]
34 [255]
35
35
36 these should work
36 these should work
37
37
38 $ echo "latin-1" > a
38 $ echo "latin-1" > a
39 $ HGENCODING=latin-1 hg ci -l latin-1
39 $ HGENCODING=latin-1 hg ci -l latin-1
40 $ echo "utf-8" > a
40 $ echo "utf-8" > a
41 $ HGENCODING=utf-8 hg ci -l utf-8
41 $ HGENCODING=utf-8 hg ci -l utf-8
42 $ HGENCODING=latin-1 hg tag `cat latin-1-tag`
42 $ HGENCODING=latin-1 hg tag `cat latin-1-tag`
43 $ HGENCODING=latin-1 hg branch `cat latin-1-tag`
43 $ HGENCODING=latin-1 hg branch `cat latin-1-tag`
44 marked working directory as branch \xe9 (esc)
44 marked working directory as branch \xe9 (esc)
45 $ HGENCODING=latin-1 hg ci -m 'latin1 branch'
45 $ HGENCODING=latin-1 hg ci -m 'latin1 branch'
46 $ rm .hg/branch
46 $ rm .hg/branch
47
47
48 hg log (ascii)
48 hg log (ascii)
49
49
50 $ hg --encoding ascii log
50 $ hg --encoding ascii log
51 changeset: 5:093c6077d1c8
51 changeset: 5:093c6077d1c8
52 branch: ?
52 branch: ?
53 tag: tip
53 tag: tip
54 user: test
54 user: test
55 date: Thu Jan 01 00:00:00 1970 +0000
55 date: Thu Jan 01 00:00:00 1970 +0000
56 summary: latin1 branch
56 summary: latin1 branch
57
57
58 changeset: 4:94db611b4196
58 changeset: 4:94db611b4196
59 user: test
59 user: test
60 date: Thu Jan 01 00:00:00 1970 +0000
60 date: Thu Jan 01 00:00:00 1970 +0000
61 summary: Added tag ? for changeset ca661e7520de
61 summary: Added tag ? for changeset ca661e7520de
62
62
63 changeset: 3:ca661e7520de
63 changeset: 3:ca661e7520de
64 tag: ?
64 tag: ?
65 user: test
65 user: test
66 date: Thu Jan 01 00:00:00 1970 +0000
66 date: Thu Jan 01 00:00:00 1970 +0000
67 summary: utf-8 e' encoded: ?
67 summary: utf-8 e' encoded: ?
68
68
69 changeset: 2:650c6f3d55dd
69 changeset: 2:650c6f3d55dd
70 user: test
70 user: test
71 date: Thu Jan 01 00:00:00 1970 +0000
71 date: Thu Jan 01 00:00:00 1970 +0000
72 summary: latin-1 e' encoded: ?
72 summary: latin-1 e' encoded: ?
73
73
74 changeset: 1:0e5b7e3f9c4a
74 changeset: 1:0e5b7e3f9c4a
75 user: test
75 user: test
76 date: Mon Jan 12 13:46:40 1970 +0000
76 date: Mon Jan 12 13:46:40 1970 +0000
77 summary: koi8-r: ????? = u'\u0440\u0442\u0443\u0442\u044c'
77 summary: koi8-r: ????? = u'\u0440\u0442\u0443\u0442\u044c'
78
78
79 changeset: 0:1e78a93102a3
79 changeset: 0:1e78a93102a3
80 user: test
80 user: test
81 date: Mon Jan 12 13:46:40 1970 +0000
81 date: Mon Jan 12 13:46:40 1970 +0000
82 summary: latin-1 e': ? = u'\xe9'
82 summary: latin-1 e': ? = u'\xe9'
83
83
84
84
85 hg log (latin-1)
85 hg log (latin-1)
86
86
87 $ hg --encoding latin-1 log
87 $ hg --encoding latin-1 log
88 changeset: 5:093c6077d1c8
88 changeset: 5:093c6077d1c8
89 branch: \xe9 (esc)
89 branch: \xe9 (esc)
90 tag: tip
90 tag: tip
91 user: test
91 user: test
92 date: Thu Jan 01 00:00:00 1970 +0000
92 date: Thu Jan 01 00:00:00 1970 +0000
93 summary: latin1 branch
93 summary: latin1 branch
94
94
95 changeset: 4:94db611b4196
95 changeset: 4:94db611b4196
96 user: test
96 user: test
97 date: Thu Jan 01 00:00:00 1970 +0000
97 date: Thu Jan 01 00:00:00 1970 +0000
98 summary: Added tag \xe9 for changeset ca661e7520de (esc)
98 summary: Added tag \xe9 for changeset ca661e7520de (esc)
99
99
100 changeset: 3:ca661e7520de
100 changeset: 3:ca661e7520de
101 tag: \xe9 (esc)
101 tag: \xe9 (esc)
102 user: test
102 user: test
103 date: Thu Jan 01 00:00:00 1970 +0000
103 date: Thu Jan 01 00:00:00 1970 +0000
104 summary: utf-8 e' encoded: \xe9 (esc)
104 summary: utf-8 e' encoded: \xe9 (esc)
105
105
106 changeset: 2:650c6f3d55dd
106 changeset: 2:650c6f3d55dd
107 user: test
107 user: test
108 date: Thu Jan 01 00:00:00 1970 +0000
108 date: Thu Jan 01 00:00:00 1970 +0000
109 summary: latin-1 e' encoded: \xe9 (esc)
109 summary: latin-1 e' encoded: \xe9 (esc)
110
110
111 changeset: 1:0e5b7e3f9c4a
111 changeset: 1:0e5b7e3f9c4a
112 user: test
112 user: test
113 date: Mon Jan 12 13:46:40 1970 +0000
113 date: Mon Jan 12 13:46:40 1970 +0000
114 summary: koi8-r: \xd2\xd4\xd5\xd4\xd8 = u'\\u0440\\u0442\\u0443\\u0442\\u044c' (esc)
114 summary: koi8-r: \xd2\xd4\xd5\xd4\xd8 = u'\\u0440\\u0442\\u0443\\u0442\\u044c' (esc)
115
115
116 changeset: 0:1e78a93102a3
116 changeset: 0:1e78a93102a3
117 user: test
117 user: test
118 date: Mon Jan 12 13:46:40 1970 +0000
118 date: Mon Jan 12 13:46:40 1970 +0000
119 summary: latin-1 e': \xe9 = u'\\xe9' (esc)
119 summary: latin-1 e': \xe9 = u'\\xe9' (esc)
120
120
121
121
122 hg log (utf-8)
122 hg log (utf-8)
123
123
124 $ hg --encoding utf-8 log
124 $ hg --encoding utf-8 log
125 changeset: 5:093c6077d1c8
125 changeset: 5:093c6077d1c8
126 branch: \xc3\xa9 (esc)
126 branch: \xc3\xa9 (esc)
127 tag: tip
127 tag: tip
128 user: test
128 user: test
129 date: Thu Jan 01 00:00:00 1970 +0000
129 date: Thu Jan 01 00:00:00 1970 +0000
130 summary: latin1 branch
130 summary: latin1 branch
131
131
132 changeset: 4:94db611b4196
132 changeset: 4:94db611b4196
133 user: test
133 user: test
134 date: Thu Jan 01 00:00:00 1970 +0000
134 date: Thu Jan 01 00:00:00 1970 +0000
135 summary: Added tag \xc3\xa9 for changeset ca661e7520de (esc)
135 summary: Added tag \xc3\xa9 for changeset ca661e7520de (esc)
136
136
137 changeset: 3:ca661e7520de
137 changeset: 3:ca661e7520de
138 tag: \xc3\xa9 (esc)
138 tag: \xc3\xa9 (esc)
139 user: test
139 user: test
140 date: Thu Jan 01 00:00:00 1970 +0000
140 date: Thu Jan 01 00:00:00 1970 +0000
141 summary: utf-8 e' encoded: \xc3\xa9 (esc)
141 summary: utf-8 e' encoded: \xc3\xa9 (esc)
142
142
143 changeset: 2:650c6f3d55dd
143 changeset: 2:650c6f3d55dd
144 user: test
144 user: test
145 date: Thu Jan 01 00:00:00 1970 +0000
145 date: Thu Jan 01 00:00:00 1970 +0000
146 summary: latin-1 e' encoded: \xc3\xa9 (esc)
146 summary: latin-1 e' encoded: \xc3\xa9 (esc)
147
147
148 changeset: 1:0e5b7e3f9c4a
148 changeset: 1:0e5b7e3f9c4a
149 user: test
149 user: test
150 date: Mon Jan 12 13:46:40 1970 +0000
150 date: Mon Jan 12 13:46:40 1970 +0000
151 summary: koi8-r: \xc3\x92\xc3\x94\xc3\x95\xc3\x94\xc3\x98 = u'\\u0440\\u0442\\u0443\\u0442\\u044c' (esc)
151 summary: koi8-r: \xc3\x92\xc3\x94\xc3\x95\xc3\x94\xc3\x98 = u'\\u0440\\u0442\\u0443\\u0442\\u044c' (esc)
152
152
153 changeset: 0:1e78a93102a3
153 changeset: 0:1e78a93102a3
154 user: test
154 user: test
155 date: Mon Jan 12 13:46:40 1970 +0000
155 date: Mon Jan 12 13:46:40 1970 +0000
156 summary: latin-1 e': \xc3\xa9 = u'\\xe9' (esc)
156 summary: latin-1 e': \xc3\xa9 = u'\\xe9' (esc)
157
157
158
158
159 hg tags (ascii)
159 hg tags (ascii)
160
160
161 $ HGENCODING=ascii hg tags
161 $ HGENCODING=ascii hg tags
162 tip 5:093c6077d1c8
162 tip 5:093c6077d1c8
163 ? 3:ca661e7520de
163 ? 3:ca661e7520de
164
164
165 hg tags (latin-1)
165 hg tags (latin-1)
166
166
167 $ HGENCODING=latin-1 hg tags
167 $ HGENCODING=latin-1 hg tags
168 tip 5:093c6077d1c8
168 tip 5:093c6077d1c8
169 \xe9 3:ca661e7520de (esc)
169 \xe9 3:ca661e7520de (esc)
170
170
171 hg tags (utf-8)
171 hg tags (utf-8)
172
172
173 $ HGENCODING=utf-8 hg tags
173 $ HGENCODING=utf-8 hg tags
174 tip 5:093c6077d1c8
174 tip 5:093c6077d1c8
175 \xc3\xa9 3:ca661e7520de (esc)
175 \xc3\xa9 3:ca661e7520de (esc)
176
176
177 hg branches (ascii)
177 hg branches (ascii)
178
178
179 $ HGENCODING=ascii hg branches
179 $ HGENCODING=ascii hg branches
180 ? 5:093c6077d1c8
180 ? 5:093c6077d1c8
181 default 4:94db611b4196 (inactive)
181 default 4:94db611b4196 (inactive)
182
182
183 hg branches (latin-1)
183 hg branches (latin-1)
184
184
185 $ HGENCODING=latin-1 hg branches
185 $ HGENCODING=latin-1 hg branches
186 \xe9 5:093c6077d1c8 (esc)
186 \xe9 5:093c6077d1c8 (esc)
187 default 4:94db611b4196 (inactive)
187 default 4:94db611b4196 (inactive)
188
188
189 hg branches (utf-8)
189 hg branches (utf-8)
190
190
191 $ HGENCODING=utf-8 hg branches
191 $ HGENCODING=utf-8 hg branches
192 \xc3\xa9 5:093c6077d1c8 (esc)
192 \xc3\xa9 5:093c6077d1c8 (esc)
193 default 4:94db611b4196 (inactive)
193 default 4:94db611b4196 (inactive)
194 $ echo '[ui]' >> .hg/hgrc
194 $ echo '[ui]' >> .hg/hgrc
195 $ echo 'fallbackencoding = koi8-r' >> .hg/hgrc
195 $ echo 'fallbackencoding = koi8-r' >> .hg/hgrc
196
196
197 hg log (utf-8)
197 hg log (utf-8)
198
198
199 $ HGENCODING=utf-8 hg log
199 $ HGENCODING=utf-8 hg log
200 changeset: 5:093c6077d1c8
200 changeset: 5:093c6077d1c8
201 branch: \xc3\xa9 (esc)
201 branch: \xc3\xa9 (esc)
202 tag: tip
202 tag: tip
203 user: test
203 user: test
204 date: Thu Jan 01 00:00:00 1970 +0000
204 date: Thu Jan 01 00:00:00 1970 +0000
205 summary: latin1 branch
205 summary: latin1 branch
206
206
207 changeset: 4:94db611b4196
207 changeset: 4:94db611b4196
208 user: test
208 user: test
209 date: Thu Jan 01 00:00:00 1970 +0000
209 date: Thu Jan 01 00:00:00 1970 +0000
210 summary: Added tag \xc3\xa9 for changeset ca661e7520de (esc)
210 summary: Added tag \xc3\xa9 for changeset ca661e7520de (esc)
211
211
212 changeset: 3:ca661e7520de
212 changeset: 3:ca661e7520de
213 tag: \xc3\xa9 (esc)
213 tag: \xc3\xa9 (esc)
214 user: test
214 user: test
215 date: Thu Jan 01 00:00:00 1970 +0000
215 date: Thu Jan 01 00:00:00 1970 +0000
216 summary: utf-8 e' encoded: \xc3\xa9 (esc)
216 summary: utf-8 e' encoded: \xc3\xa9 (esc)
217
217
218 changeset: 2:650c6f3d55dd
218 changeset: 2:650c6f3d55dd
219 user: test
219 user: test
220 date: Thu Jan 01 00:00:00 1970 +0000
220 date: Thu Jan 01 00:00:00 1970 +0000
221 summary: latin-1 e' encoded: \xc3\xa9 (esc)
221 summary: latin-1 e' encoded: \xc3\xa9 (esc)
222
222
223 changeset: 1:0e5b7e3f9c4a
223 changeset: 1:0e5b7e3f9c4a
224 user: test
224 user: test
225 date: Mon Jan 12 13:46:40 1970 +0000
225 date: Mon Jan 12 13:46:40 1970 +0000
226 summary: koi8-r: \xd1\x80\xd1\x82\xd1\x83\xd1\x82\xd1\x8c = u'\\u0440\\u0442\\u0443\\u0442\\u044c' (esc)
226 summary: koi8-r: \xd1\x80\xd1\x82\xd1\x83\xd1\x82\xd1\x8c = u'\\u0440\\u0442\\u0443\\u0442\\u044c' (esc)
227
227
228 changeset: 0:1e78a93102a3
228 changeset: 0:1e78a93102a3
229 user: test
229 user: test
230 date: Mon Jan 12 13:46:40 1970 +0000
230 date: Mon Jan 12 13:46:40 1970 +0000
231 summary: latin-1 e': \xd0\x98 = u'\\xe9' (esc)
231 summary: latin-1 e': \xd0\x98 = u'\\xe9' (esc)
232
232
233
233
234 hg log (dolphin)
234 hg log (dolphin)
235
235
236 $ HGENCODING=dolphin hg log
236 $ HGENCODING=dolphin hg log
237 abort: unknown encoding: dolphin, please check your locale settings
237 abort: unknown encoding: dolphin, please check your locale settings
238 [255]
238 [255]
239 $ HGENCODING=ascii hg branch `cat latin-1-tag`
239 $ HGENCODING=ascii hg branch `cat latin-1-tag`
240 abort: decoding near '\xe9': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)! (esc)
240 abort: decoding near '\xe9': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)! (esc)
241 [255]
241 [255]
242 $ cp latin-1-tag .hg/branch
242 $ cp latin-1-tag .hg/branch
243 $ HGENCODING=latin-1 hg ci -m 'auto-promote legacy name'
243 $ HGENCODING=latin-1 hg ci -m 'auto-promote legacy name'
244
244
245 Test roundtrip encoding of lookup tables when not using UTF-8 (issue2763)
245 Test roundtrip encoding of lookup tables when not using UTF-8 (issue2763)
246
246
247 $ HGENCODING=latin-1 hg up `cat latin-1-tag`
247 $ HGENCODING=latin-1 hg up `cat latin-1-tag`
248 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
248 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
249
249
@@ -1,1074 +1,1074 b''
1 $ cat <<EOF >> $HGRCPATH
1 $ cat <<EOF >> $HGRCPATH
2 > [extensions]
2 > [extensions]
3 > keyword =
3 > keyword =
4 > mq =
4 > mq =
5 > notify =
5 > notify =
6 > record =
6 > record =
7 > transplant =
7 > transplant =
8 > [ui]
8 > [ui]
9 > interactive = true
9 > interactive = true
10 > EOF
10 > EOF
11
11
12 Run kwdemo before [keyword] files are set up
12 Run kwdemo before [keyword] files are set up
13 as it would succeed without uisetup otherwise
13 as it would succeed without uisetup otherwise
14
14
15 $ hg --quiet kwdemo
15 $ hg --quiet kwdemo
16 [extensions]
16 [extensions]
17 keyword =
17 keyword =
18 [keyword]
18 [keyword]
19 demo.txt =
19 demo.txt =
20 [keywordset]
20 [keywordset]
21 svn = False
21 svn = False
22 [keywordmaps]
22 [keywordmaps]
23 Author = {author|user}
23 Author = {author|user}
24 Date = {date|utcdate}
24 Date = {date|utcdate}
25 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
25 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
26 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
26 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
27 RCSFile = {file|basename},v
27 RCSFile = {file|basename},v
28 RCSfile = {file|basename},v
28 RCSfile = {file|basename},v
29 Revision = {node|short}
29 Revision = {node|short}
30 Source = {root}/{file},v
30 Source = {root}/{file},v
31 $Author: test $
31 $Author: test $
32 $Date: ????/??/?? ??:??:?? $ (glob)
32 $Date: ????/??/?? ??:??:?? $ (glob)
33 $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
33 $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
34 $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
34 $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
35 $RCSFile: demo.txt,v $
35 $RCSFile: demo.txt,v $
36 $RCSfile: demo.txt,v $
36 $RCSfile: demo.txt,v $
37 $Revision: ???????????? $ (glob)
37 $Revision: ???????????? $ (glob)
38 $Source: */demo.txt,v $ (glob)
38 $Source: */demo.txt,v $ (glob)
39
39
40 $ hg --quiet kwdemo "Branch = {branches}"
40 $ hg --quiet kwdemo "Branch = {branches}"
41 [extensions]
41 [extensions]
42 keyword =
42 keyword =
43 [keyword]
43 [keyword]
44 demo.txt =
44 demo.txt =
45 [keywordset]
45 [keywordset]
46 svn = False
46 svn = False
47 [keywordmaps]
47 [keywordmaps]
48 Branch = {branches}
48 Branch = {branches}
49 $Branch: demobranch $
49 $Branch: demobranch $
50
50
51 $ cat <<EOF >> $HGRCPATH
51 $ cat <<EOF >> $HGRCPATH
52 > [keyword]
52 > [keyword]
53 > ** =
53 > ** =
54 > b = ignore
54 > b = ignore
55 > i = ignore
55 > i = ignore
56 > [hooks]
56 > [hooks]
57 > EOF
57 > EOF
58 $ cp $HGRCPATH $HGRCPATH.nohooks
58 $ cp $HGRCPATH $HGRCPATH.nohooks
59 > cat <<EOF >> $HGRCPATH
59 > cat <<EOF >> $HGRCPATH
60 > commit=
60 > commit=
61 > commit.test=cp a hooktest
61 > commit.test=cp a hooktest
62 > EOF
62 > EOF
63
63
64 $ hg init Test-bndl
64 $ hg init Test-bndl
65 $ cd Test-bndl
65 $ cd Test-bndl
66
66
67 kwshrink should exit silently in empty/invalid repo
67 kwshrink should exit silently in empty/invalid repo
68
68
69 $ hg kwshrink
69 $ hg kwshrink
70
70
71 Symlinks cannot be created on Windows.
71 Symlinks cannot be created on Windows.
72 A bundle to test this was made with:
72 A bundle to test this was made with:
73 hg init t
73 hg init t
74 cd t
74 cd t
75 echo a > a
75 echo a > a
76 ln -s a sym
76 ln -s a sym
77 hg add sym
77 hg add sym
78 hg ci -m addsym -u mercurial
78 hg ci -m addsym -u mercurial
79 hg bundle --base null ../test-keyword.hg
79 hg bundle --base null ../test-keyword.hg
80
80
81 $ hg pull -u "$TESTDIR"/test-keyword.hg
81 $ hg pull -u "$TESTDIR"/bundles/test-keyword.hg
82 pulling from *test-keyword.hg (glob)
82 pulling from *test-keyword.hg (glob)
83 requesting all changes
83 requesting all changes
84 adding changesets
84 adding changesets
85 adding manifests
85 adding manifests
86 adding file changes
86 adding file changes
87 added 1 changesets with 1 changes to 1 files
87 added 1 changesets with 1 changes to 1 files
88 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
88 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
89
89
90 $ echo 'expand $Id$' > a
90 $ echo 'expand $Id$' > a
91 $ echo 'do not process $Id:' >> a
91 $ echo 'do not process $Id:' >> a
92 $ echo 'xxx $' >> a
92 $ echo 'xxx $' >> a
93 $ echo 'ignore $Id$' > b
93 $ echo 'ignore $Id$' > b
94
94
95 Output files as they were created
95 Output files as they were created
96
96
97 $ cat a b
97 $ cat a b
98 expand $Id$
98 expand $Id$
99 do not process $Id:
99 do not process $Id:
100 xxx $
100 xxx $
101 ignore $Id$
101 ignore $Id$
102
102
103 no kwfiles
103 no kwfiles
104
104
105 $ hg kwfiles
105 $ hg kwfiles
106
106
107 untracked candidates
107 untracked candidates
108
108
109 $ hg -v kwfiles --unknown
109 $ hg -v kwfiles --unknown
110 k a
110 k a
111
111
112 Add files and check status
112 Add files and check status
113
113
114 $ hg addremove
114 $ hg addremove
115 adding a
115 adding a
116 adding b
116 adding b
117 $ hg status
117 $ hg status
118 A a
118 A a
119 A b
119 A b
120
120
121
121
122 Default keyword expansion including commit hook
122 Default keyword expansion including commit hook
123 Interrupted commit should not change state or run commit hook
123 Interrupted commit should not change state or run commit hook
124
124
125 $ hg --debug commit
125 $ hg --debug commit
126 abort: empty commit message
126 abort: empty commit message
127 [255]
127 [255]
128 $ hg status
128 $ hg status
129 A a
129 A a
130 A b
130 A b
131
131
132 Commit with several checks
132 Commit with several checks
133
133
134 $ hg --debug commit -mabsym -u 'User Name <user@example.com>'
134 $ hg --debug commit -mabsym -u 'User Name <user@example.com>'
135 a
135 a
136 b
136 b
137 overwriting a expanding keywords
137 overwriting a expanding keywords
138 running hook commit.test: cp a hooktest
138 running hook commit.test: cp a hooktest
139 committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
139 committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
140 $ hg status
140 $ hg status
141 ? hooktest
141 ? hooktest
142 $ hg debugrebuildstate
142 $ hg debugrebuildstate
143 $ hg --quiet identify
143 $ hg --quiet identify
144 ef63ca68695b
144 ef63ca68695b
145
145
146 cat files in working directory with keywords expanded
146 cat files in working directory with keywords expanded
147
147
148 $ cat a b
148 $ cat a b
149 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
149 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
150 do not process $Id:
150 do not process $Id:
151 xxx $
151 xxx $
152 ignore $Id$
152 ignore $Id$
153
153
154 hg cat files and symlink, no expansion
154 hg cat files and symlink, no expansion
155
155
156 $ hg cat sym a b && echo
156 $ hg cat sym a b && echo
157 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
157 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
158 do not process $Id:
158 do not process $Id:
159 xxx $
159 xxx $
160 ignore $Id$
160 ignore $Id$
161 a
161 a
162
162
163 Test hook execution
163 Test hook execution
164
164
165 $ diff a hooktest
165 $ diff a hooktest
166
166
167 $ cp $HGRCPATH.nohooks $HGRCPATH
167 $ cp $HGRCPATH.nohooks $HGRCPATH
168 $ rm hooktest
168 $ rm hooktest
169
169
170 bundle
170 bundle
171
171
172 $ hg bundle --base null ../kw.hg
172 $ hg bundle --base null ../kw.hg
173 2 changesets found
173 2 changesets found
174 $ cd ..
174 $ cd ..
175 $ hg init Test
175 $ hg init Test
176 $ cd Test
176 $ cd Test
177
177
178 Notify on pull to check whether keywords stay as is in email
178 Notify on pull to check whether keywords stay as is in email
179 ie. if patch.diff wrapper acts as it should
179 ie. if patch.diff wrapper acts as it should
180
180
181 $ cat <<EOF >> $HGRCPATH
181 $ cat <<EOF >> $HGRCPATH
182 > [hooks]
182 > [hooks]
183 > incoming.notify = python:hgext.notify.hook
183 > incoming.notify = python:hgext.notify.hook
184 > [notify]
184 > [notify]
185 > sources = pull
185 > sources = pull
186 > diffstat = False
186 > diffstat = False
187 > maxsubject = 15
187 > maxsubject = 15
188 > [reposubs]
188 > [reposubs]
189 > * = Test
189 > * = Test
190 > EOF
190 > EOF
191
191
192 Pull from bundle and trigger notify
192 Pull from bundle and trigger notify
193
193
194 $ hg pull -u ../kw.hg
194 $ hg pull -u ../kw.hg
195 pulling from ../kw.hg
195 pulling from ../kw.hg
196 requesting all changes
196 requesting all changes
197 adding changesets
197 adding changesets
198 adding manifests
198 adding manifests
199 adding file changes
199 adding file changes
200 added 2 changesets with 3 changes to 3 files
200 added 2 changesets with 3 changes to 3 files
201 Content-Type: text/plain; charset="us-ascii"
201 Content-Type: text/plain; charset="us-ascii"
202 MIME-Version: 1.0
202 MIME-Version: 1.0
203 Content-Transfer-Encoding: 7bit
203 Content-Transfer-Encoding: 7bit
204 Date: * (glob)
204 Date: * (glob)
205 Subject: changeset in...
205 Subject: changeset in...
206 From: mercurial
206 From: mercurial
207 X-Hg-Notification: changeset a2392c293916
207 X-Hg-Notification: changeset a2392c293916
208 Message-Id: <hg.a2392c293916*> (glob)
208 Message-Id: <hg.a2392c293916*> (glob)
209 To: Test
209 To: Test
210
210
211 changeset a2392c293916 in $TESTTMP/Test
211 changeset a2392c293916 in $TESTTMP/Test
212 details: $TESTTMP/Test?cmd=changeset;node=a2392c293916
212 details: $TESTTMP/Test?cmd=changeset;node=a2392c293916
213 description:
213 description:
214 addsym
214 addsym
215
215
216 diffs (6 lines):
216 diffs (6 lines):
217
217
218 diff -r 000000000000 -r a2392c293916 sym
218 diff -r 000000000000 -r a2392c293916 sym
219 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
219 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
220 +++ b/sym Sat Feb 09 20:25:47 2008 +0100
220 +++ b/sym Sat Feb 09 20:25:47 2008 +0100
221 @@ -0,0 +1,1 @@
221 @@ -0,0 +1,1 @@
222 +a
222 +a
223 \ No newline at end of file
223 \ No newline at end of file
224 Content-Type: text/plain; charset="us-ascii"
224 Content-Type: text/plain; charset="us-ascii"
225 MIME-Version: 1.0
225 MIME-Version: 1.0
226 Content-Transfer-Encoding: 7bit
226 Content-Transfer-Encoding: 7bit
227 Date:* (glob)
227 Date:* (glob)
228 Subject: changeset in...
228 Subject: changeset in...
229 From: User Name <user@example.com>
229 From: User Name <user@example.com>
230 X-Hg-Notification: changeset ef63ca68695b
230 X-Hg-Notification: changeset ef63ca68695b
231 Message-Id: <hg.ef63ca68695b*> (glob)
231 Message-Id: <hg.ef63ca68695b*> (glob)
232 To: Test
232 To: Test
233
233
234 changeset ef63ca68695b in $TESTTMP/Test
234 changeset ef63ca68695b in $TESTTMP/Test
235 details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b
235 details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b
236 description:
236 description:
237 absym
237 absym
238
238
239 diffs (12 lines):
239 diffs (12 lines):
240
240
241 diff -r a2392c293916 -r ef63ca68695b a
241 diff -r a2392c293916 -r ef63ca68695b a
242 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
242 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
243 +++ b/a Thu Jan 01 00:00:00 1970 +0000
243 +++ b/a Thu Jan 01 00:00:00 1970 +0000
244 @@ -0,0 +1,3 @@
244 @@ -0,0 +1,3 @@
245 +expand $Id$
245 +expand $Id$
246 +do not process $Id:
246 +do not process $Id:
247 +xxx $
247 +xxx $
248 diff -r a2392c293916 -r ef63ca68695b b
248 diff -r a2392c293916 -r ef63ca68695b b
249 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
249 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
250 +++ b/b Thu Jan 01 00:00:00 1970 +0000
250 +++ b/b Thu Jan 01 00:00:00 1970 +0000
251 @@ -0,0 +1,1 @@
251 @@ -0,0 +1,1 @@
252 +ignore $Id$
252 +ignore $Id$
253 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
253 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
254
254
255 $ cp $HGRCPATH.nohooks $HGRCPATH
255 $ cp $HGRCPATH.nohooks $HGRCPATH
256
256
257 Touch files and check with status
257 Touch files and check with status
258
258
259 $ touch a b
259 $ touch a b
260 $ hg status
260 $ hg status
261
261
262 Update and expand
262 Update and expand
263
263
264 $ rm sym a b
264 $ rm sym a b
265 $ hg update -C
265 $ hg update -C
266 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
266 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
267 $ cat a b
267 $ cat a b
268 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
268 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
269 do not process $Id:
269 do not process $Id:
270 xxx $
270 xxx $
271 ignore $Id$
271 ignore $Id$
272
272
273 Check whether expansion is filewise
273 Check whether expansion is filewise
274
274
275 $ echo '$Id$' > c
275 $ echo '$Id$' > c
276 $ echo 'tests for different changenodes' >> c
276 $ echo 'tests for different changenodes' >> c
277
277
278 commit file c
278 commit file c
279
279
280 $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
280 $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
281 adding c
281 adding c
282
282
283 force expansion
283 force expansion
284
284
285 $ hg -v kwexpand
285 $ hg -v kwexpand
286 overwriting a expanding keywords
286 overwriting a expanding keywords
287 overwriting c expanding keywords
287 overwriting c expanding keywords
288
288
289 compare changenodes in a and c
289 compare changenodes in a and c
290
290
291 $ cat a c
291 $ cat a c
292 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
292 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
293 do not process $Id:
293 do not process $Id:
294 xxx $
294 xxx $
295 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
295 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
296 tests for different changenodes
296 tests for different changenodes
297
297
298 record
298 record
299
299
300 $ echo '$Id$' > r
300 $ echo '$Id$' > r
301 $ hg add r
301 $ hg add r
302
302
303 record chunk
303 record chunk
304
304
305 $ python -c \
305 $ python -c \
306 > 'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);'
306 > 'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);'
307 $ hg record -d '1 10' -m rectest a<<EOF
307 $ hg record -d '1 10' -m rectest a<<EOF
308 > y
308 > y
309 > y
309 > y
310 > n
310 > n
311 > EOF
311 > EOF
312 diff --git a/a b/a
312 diff --git a/a b/a
313 2 hunks, 2 lines changed
313 2 hunks, 2 lines changed
314 examine changes to 'a'? [Ynsfdaq?]
314 examine changes to 'a'? [Ynsfdaq?]
315 @@ -1,3 +1,4 @@
315 @@ -1,3 +1,4 @@
316 expand $Id$
316 expand $Id$
317 +foo
317 +foo
318 do not process $Id:
318 do not process $Id:
319 xxx $
319 xxx $
320 record change 1/2 to 'a'? [Ynsfdaq?]
320 record change 1/2 to 'a'? [Ynsfdaq?]
321 @@ -2,2 +3,3 @@
321 @@ -2,2 +3,3 @@
322 do not process $Id:
322 do not process $Id:
323 xxx $
323 xxx $
324 +bar
324 +bar
325 record change 2/2 to 'a'? [Ynsfdaq?]
325 record change 2/2 to 'a'? [Ynsfdaq?]
326
326
327 $ hg identify
327 $ hg identify
328 d17e03c92c97+ tip
328 d17e03c92c97+ tip
329 $ hg status
329 $ hg status
330 M a
330 M a
331 A r
331 A r
332
332
333 Cat modified file a
333 Cat modified file a
334
334
335 $ cat a
335 $ cat a
336 expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $
336 expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $
337 foo
337 foo
338 do not process $Id:
338 do not process $Id:
339 xxx $
339 xxx $
340 bar
340 bar
341
341
342 Diff remaining chunk
342 Diff remaining chunk
343
343
344 $ hg diff a
344 $ hg diff a
345 diff -r d17e03c92c97 a
345 diff -r d17e03c92c97 a
346 --- a/a Wed Dec 31 23:59:51 1969 -0000
346 --- a/a Wed Dec 31 23:59:51 1969 -0000
347 +++ b/a * (glob)
347 +++ b/a * (glob)
348 @@ -2,3 +2,4 @@
348 @@ -2,3 +2,4 @@
349 foo
349 foo
350 do not process $Id:
350 do not process $Id:
351 xxx $
351 xxx $
352 +bar
352 +bar
353
353
354 $ hg rollback
354 $ hg rollback
355 repository tip rolled back to revision 2 (undo commit)
355 repository tip rolled back to revision 2 (undo commit)
356 working directory now based on revision 2
356 working directory now based on revision 2
357
357
358 Record all chunks in file a
358 Record all chunks in file a
359
359
360 $ echo foo > msg
360 $ echo foo > msg
361
361
362 - do not use "hg record -m" here!
362 - do not use "hg record -m" here!
363
363
364 $ hg record -l msg -d '1 11' a<<EOF
364 $ hg record -l msg -d '1 11' a<<EOF
365 > y
365 > y
366 > y
366 > y
367 > y
367 > y
368 > EOF
368 > EOF
369 diff --git a/a b/a
369 diff --git a/a b/a
370 2 hunks, 2 lines changed
370 2 hunks, 2 lines changed
371 examine changes to 'a'? [Ynsfdaq?]
371 examine changes to 'a'? [Ynsfdaq?]
372 @@ -1,3 +1,4 @@
372 @@ -1,3 +1,4 @@
373 expand $Id$
373 expand $Id$
374 +foo
374 +foo
375 do not process $Id:
375 do not process $Id:
376 xxx $
376 xxx $
377 record change 1/2 to 'a'? [Ynsfdaq?]
377 record change 1/2 to 'a'? [Ynsfdaq?]
378 @@ -2,2 +3,3 @@
378 @@ -2,2 +3,3 @@
379 do not process $Id:
379 do not process $Id:
380 xxx $
380 xxx $
381 +bar
381 +bar
382 record change 2/2 to 'a'? [Ynsfdaq?]
382 record change 2/2 to 'a'? [Ynsfdaq?]
383
383
384 File a should be clean
384 File a should be clean
385
385
386 $ hg status -A a
386 $ hg status -A a
387 C a
387 C a
388
388
389 rollback and revert expansion
389 rollback and revert expansion
390
390
391 $ cat a
391 $ cat a
392 expand $Id: a,v 59f969a3b52c 1970/01/01 00:00:01 test $
392 expand $Id: a,v 59f969a3b52c 1970/01/01 00:00:01 test $
393 foo
393 foo
394 do not process $Id:
394 do not process $Id:
395 xxx $
395 xxx $
396 bar
396 bar
397 $ hg --verbose rollback
397 $ hg --verbose rollback
398 repository tip rolled back to revision 2 (undo commit)
398 repository tip rolled back to revision 2 (undo commit)
399 working directory now based on revision 2
399 working directory now based on revision 2
400 overwriting a expanding keywords
400 overwriting a expanding keywords
401 $ hg status a
401 $ hg status a
402 M a
402 M a
403 $ cat a
403 $ cat a
404 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
404 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
405 foo
405 foo
406 do not process $Id:
406 do not process $Id:
407 xxx $
407 xxx $
408 bar
408 bar
409 $ echo '$Id$' > y
409 $ echo '$Id$' > y
410 $ echo '$Id$' > z
410 $ echo '$Id$' > z
411 $ hg add y
411 $ hg add y
412 $ hg commit -Am "rollback only" z
412 $ hg commit -Am "rollback only" z
413 $ cat z
413 $ cat z
414 $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $
414 $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $
415 $ hg --verbose rollback
415 $ hg --verbose rollback
416 repository tip rolled back to revision 2 (undo commit)
416 repository tip rolled back to revision 2 (undo commit)
417 working directory now based on revision 2
417 working directory now based on revision 2
418 overwriting z shrinking keywords
418 overwriting z shrinking keywords
419
419
420 Only z should be overwritten
420 Only z should be overwritten
421
421
422 $ hg status a y z
422 $ hg status a y z
423 M a
423 M a
424 A y
424 A y
425 A z
425 A z
426 $ cat z
426 $ cat z
427 $Id$
427 $Id$
428 $ hg forget y z
428 $ hg forget y z
429 $ rm y z
429 $ rm y z
430
430
431 record added file alone
431 record added file alone
432
432
433 $ hg -v record -l msg -d '1 12' r<<EOF
433 $ hg -v record -l msg -d '1 12' r<<EOF
434 > y
434 > y
435 > EOF
435 > EOF
436 diff --git a/r b/r
436 diff --git a/r b/r
437 new file mode 100644
437 new file mode 100644
438 examine changes to 'r'? [Ynsfdaq?]
438 examine changes to 'r'? [Ynsfdaq?]
439 r
439 r
440 committed changeset 3:899491280810
440 committed changeset 3:899491280810
441 overwriting r expanding keywords
441 overwriting r expanding keywords
442 $ hg --verbose rollback
442 $ hg --verbose rollback
443 repository tip rolled back to revision 2 (undo commit)
443 repository tip rolled back to revision 2 (undo commit)
444 working directory now based on revision 2
444 working directory now based on revision 2
445 overwriting r shrinking keywords
445 overwriting r shrinking keywords
446 $ hg forget r
446 $ hg forget r
447 $ rm msg r
447 $ rm msg r
448 $ hg update -C
448 $ hg update -C
449 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
449 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
450
450
451 record added keyword ignored file
451 record added keyword ignored file
452
452
453 $ echo '$Id$' > i
453 $ echo '$Id$' > i
454 $ hg add i
454 $ hg add i
455 $ hg --verbose record -d '1 13' -m recignored<<EOF
455 $ hg --verbose record -d '1 13' -m recignored<<EOF
456 > y
456 > y
457 > EOF
457 > EOF
458 diff --git a/i b/i
458 diff --git a/i b/i
459 new file mode 100644
459 new file mode 100644
460 examine changes to 'i'? [Ynsfdaq?]
460 examine changes to 'i'? [Ynsfdaq?]
461 i
461 i
462 committed changeset 3:5f40fe93bbdc
462 committed changeset 3:5f40fe93bbdc
463 $ cat i
463 $ cat i
464 $Id$
464 $Id$
465 $ hg -q rollback
465 $ hg -q rollback
466 $ hg forget i
466 $ hg forget i
467 $ rm i
467 $ rm i
468
468
469 Test patch queue repo
469 Test patch queue repo
470
470
471 $ hg init --mq
471 $ hg init --mq
472 $ hg qimport -r tip -n mqtest.diff
472 $ hg qimport -r tip -n mqtest.diff
473 $ hg commit --mq -m mqtest
473 $ hg commit --mq -m mqtest
474
474
475 Keywords should not be expanded in patch
475 Keywords should not be expanded in patch
476
476
477 $ cat .hg/patches/mqtest.diff
477 $ cat .hg/patches/mqtest.diff
478 # HG changeset patch
478 # HG changeset patch
479 # User User Name <user@example.com>
479 # User User Name <user@example.com>
480 # Date 1 0
480 # Date 1 0
481 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
481 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
482 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
482 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
483 cndiff
483 cndiff
484
484
485 diff -r ef63ca68695b -r 40a904bbbe4c c
485 diff -r ef63ca68695b -r 40a904bbbe4c c
486 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
486 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
487 +++ b/c Thu Jan 01 00:00:01 1970 +0000
487 +++ b/c Thu Jan 01 00:00:01 1970 +0000
488 @@ -0,0 +1,2 @@
488 @@ -0,0 +1,2 @@
489 +$Id$
489 +$Id$
490 +tests for different changenodes
490 +tests for different changenodes
491
491
492 $ hg qpop
492 $ hg qpop
493 popping mqtest.diff
493 popping mqtest.diff
494 patch queue now empty
494 patch queue now empty
495
495
496 qgoto, implying qpush, should expand
496 qgoto, implying qpush, should expand
497
497
498 $ hg qgoto mqtest.diff
498 $ hg qgoto mqtest.diff
499 applying mqtest.diff
499 applying mqtest.diff
500 now at: mqtest.diff
500 now at: mqtest.diff
501 $ cat c
501 $ cat c
502 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
502 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
503 tests for different changenodes
503 tests for different changenodes
504 $ hg cat c
504 $ hg cat c
505 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
505 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
506 tests for different changenodes
506 tests for different changenodes
507
507
508 Keywords should not be expanded in filelog
508 Keywords should not be expanded in filelog
509
509
510 $ hg --config 'extensions.keyword=!' cat c
510 $ hg --config 'extensions.keyword=!' cat c
511 $Id$
511 $Id$
512 tests for different changenodes
512 tests for different changenodes
513
513
514 qpop and move on
514 qpop and move on
515
515
516 $ hg qpop
516 $ hg qpop
517 popping mqtest.diff
517 popping mqtest.diff
518 patch queue now empty
518 patch queue now empty
519
519
520 Copy and show added kwfiles
520 Copy and show added kwfiles
521
521
522 $ hg cp a c
522 $ hg cp a c
523 $ hg kwfiles
523 $ hg kwfiles
524 a
524 a
525 c
525 c
526
526
527 Commit and show expansion in original and copy
527 Commit and show expansion in original and copy
528
528
529 $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
529 $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
530 c
530 c
531 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
531 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
532 overwriting c expanding keywords
532 overwriting c expanding keywords
533 committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
533 committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
534 $ cat a c
534 $ cat a c
535 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
535 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
536 do not process $Id:
536 do not process $Id:
537 xxx $
537 xxx $
538 expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $
538 expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $
539 do not process $Id:
539 do not process $Id:
540 xxx $
540 xxx $
541
541
542 Touch copied c and check its status
542 Touch copied c and check its status
543
543
544 $ touch c
544 $ touch c
545 $ hg status
545 $ hg status
546
546
547 Copy kwfile to keyword ignored file unexpanding keywords
547 Copy kwfile to keyword ignored file unexpanding keywords
548
548
549 $ hg --verbose copy a i
549 $ hg --verbose copy a i
550 copying a to i
550 copying a to i
551 overwriting i shrinking keywords
551 overwriting i shrinking keywords
552 $ head -n 1 i
552 $ head -n 1 i
553 expand $Id$
553 expand $Id$
554 $ hg forget i
554 $ hg forget i
555 $ rm i
555 $ rm i
556
556
557 Copy ignored file to ignored file: no overwriting
557 Copy ignored file to ignored file: no overwriting
558
558
559 $ hg --verbose copy b i
559 $ hg --verbose copy b i
560 copying b to i
560 copying b to i
561 $ hg forget i
561 $ hg forget i
562 $ rm i
562 $ rm i
563
563
564 cp symlink file; hg cp -A symlink file (part1)
564 cp symlink file; hg cp -A symlink file (part1)
565 - copied symlink points to kwfile: overwrite
565 - copied symlink points to kwfile: overwrite
566
566
567 $ cp sym i
567 $ cp sym i
568 $ ls -l i
568 $ ls -l i
569 -rw-r--r--* (glob)
569 -rw-r--r--* (glob)
570 $ head -1 i
570 $ head -1 i
571 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
571 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
572 $ hg copy --after --verbose sym i
572 $ hg copy --after --verbose sym i
573 copying sym to i
573 copying sym to i
574 overwriting i shrinking keywords
574 overwriting i shrinking keywords
575 $ head -1 i
575 $ head -1 i
576 expand $Id$
576 expand $Id$
577 $ hg forget i
577 $ hg forget i
578 $ rm i
578 $ rm i
579
579
580 Test different options of hg kwfiles
580 Test different options of hg kwfiles
581
581
582 $ hg kwfiles
582 $ hg kwfiles
583 a
583 a
584 c
584 c
585 $ hg -v kwfiles --ignore
585 $ hg -v kwfiles --ignore
586 I b
586 I b
587 I sym
587 I sym
588 $ hg kwfiles --all
588 $ hg kwfiles --all
589 K a
589 K a
590 K c
590 K c
591 I b
591 I b
592 I sym
592 I sym
593
593
594 Diff specific revision
594 Diff specific revision
595
595
596 $ hg diff --rev 1
596 $ hg diff --rev 1
597 diff -r ef63ca68695b c
597 diff -r ef63ca68695b c
598 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
598 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
599 +++ b/c * (glob)
599 +++ b/c * (glob)
600 @@ -0,0 +1,3 @@
600 @@ -0,0 +1,3 @@
601 +expand $Id$
601 +expand $Id$
602 +do not process $Id:
602 +do not process $Id:
603 +xxx $
603 +xxx $
604
604
605 Status after rollback:
605 Status after rollback:
606
606
607 $ hg rollback
607 $ hg rollback
608 repository tip rolled back to revision 1 (undo commit)
608 repository tip rolled back to revision 1 (undo commit)
609 working directory now based on revision 1
609 working directory now based on revision 1
610 $ hg status
610 $ hg status
611 A c
611 A c
612 $ hg update --clean
612 $ hg update --clean
613 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
613 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
614
614
615 cp symlink file; hg cp -A symlink file (part2)
615 cp symlink file; hg cp -A symlink file (part2)
616 - copied symlink points to kw ignored file: do not overwrite
616 - copied symlink points to kw ignored file: do not overwrite
617
617
618 $ cat a > i
618 $ cat a > i
619 $ ln -s i symignored
619 $ ln -s i symignored
620 $ hg commit -Am 'fake expansion in ignored and symlink' i symignored
620 $ hg commit -Am 'fake expansion in ignored and symlink' i symignored
621 $ cp symignored x
621 $ cp symignored x
622 $ hg copy --after --verbose symignored x
622 $ hg copy --after --verbose symignored x
623 copying symignored to x
623 copying symignored to x
624 $ head -n 1 x
624 $ head -n 1 x
625 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
625 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
626 $ hg forget x
626 $ hg forget x
627 $ rm x
627 $ rm x
628
628
629 $ hg rollback
629 $ hg rollback
630 repository tip rolled back to revision 1 (undo commit)
630 repository tip rolled back to revision 1 (undo commit)
631 working directory now based on revision 1
631 working directory now based on revision 1
632 $ hg update --clean
632 $ hg update --clean
633 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
633 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
634 $ rm i symignored
634 $ rm i symignored
635
635
636 Custom keywordmaps as argument to kwdemo
636 Custom keywordmaps as argument to kwdemo
637
637
638 $ hg --quiet kwdemo "Xinfo = {author}: {desc}"
638 $ hg --quiet kwdemo "Xinfo = {author}: {desc}"
639 [extensions]
639 [extensions]
640 keyword =
640 keyword =
641 [keyword]
641 [keyword]
642 ** =
642 ** =
643 b = ignore
643 b = ignore
644 demo.txt =
644 demo.txt =
645 i = ignore
645 i = ignore
646 [keywordset]
646 [keywordset]
647 svn = False
647 svn = False
648 [keywordmaps]
648 [keywordmaps]
649 Xinfo = {author}: {desc}
649 Xinfo = {author}: {desc}
650 $Xinfo: test: hg keyword configuration and expansion example $
650 $Xinfo: test: hg keyword configuration and expansion example $
651
651
652 Configure custom keywordmaps
652 Configure custom keywordmaps
653
653
654 $ cat <<EOF >>$HGRCPATH
654 $ cat <<EOF >>$HGRCPATH
655 > [keywordmaps]
655 > [keywordmaps]
656 > Id = {file} {node|short} {date|rfc822date} {author|user}
656 > Id = {file} {node|short} {date|rfc822date} {author|user}
657 > Xinfo = {author}: {desc}
657 > Xinfo = {author}: {desc}
658 > EOF
658 > EOF
659
659
660 Cat and hg cat files before custom expansion
660 Cat and hg cat files before custom expansion
661
661
662 $ cat a b
662 $ cat a b
663 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
663 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
664 do not process $Id:
664 do not process $Id:
665 xxx $
665 xxx $
666 ignore $Id$
666 ignore $Id$
667 $ hg cat sym a b && echo
667 $ hg cat sym a b && echo
668 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
668 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
669 do not process $Id:
669 do not process $Id:
670 xxx $
670 xxx $
671 ignore $Id$
671 ignore $Id$
672 a
672 a
673
673
674 Write custom keyword and prepare multiline commit message
674 Write custom keyword and prepare multiline commit message
675
675
676 $ echo '$Xinfo$' >> a
676 $ echo '$Xinfo$' >> a
677 $ cat <<EOF >> log
677 $ cat <<EOF >> log
678 > firstline
678 > firstline
679 > secondline
679 > secondline
680 > EOF
680 > EOF
681
681
682 Interrupted commit should not change state
682 Interrupted commit should not change state
683
683
684 $ hg commit
684 $ hg commit
685 abort: empty commit message
685 abort: empty commit message
686 [255]
686 [255]
687 $ hg status
687 $ hg status
688 M a
688 M a
689 ? c
689 ? c
690 ? log
690 ? log
691
691
692 Commit with multiline message and custom expansion
692 Commit with multiline message and custom expansion
693
693
694 $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
694 $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
695 a
695 a
696 overwriting a expanding keywords
696 overwriting a expanding keywords
697 committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
697 committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
698 $ rm log
698 $ rm log
699
699
700 Stat, verify and show custom expansion (firstline)
700 Stat, verify and show custom expansion (firstline)
701
701
702 $ hg status
702 $ hg status
703 ? c
703 ? c
704 $ hg verify
704 $ hg verify
705 checking changesets
705 checking changesets
706 checking manifests
706 checking manifests
707 crosschecking files in changesets and manifests
707 crosschecking files in changesets and manifests
708 checking files
708 checking files
709 3 files, 3 changesets, 4 total revisions
709 3 files, 3 changesets, 4 total revisions
710 $ cat a b
710 $ cat a b
711 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
711 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
712 do not process $Id:
712 do not process $Id:
713 xxx $
713 xxx $
714 $Xinfo: User Name <user@example.com>: firstline $
714 $Xinfo: User Name <user@example.com>: firstline $
715 ignore $Id$
715 ignore $Id$
716 $ hg cat sym a b && echo
716 $ hg cat sym a b && echo
717 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
717 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
718 do not process $Id:
718 do not process $Id:
719 xxx $
719 xxx $
720 $Xinfo: User Name <user@example.com>: firstline $
720 $Xinfo: User Name <user@example.com>: firstline $
721 ignore $Id$
721 ignore $Id$
722 a
722 a
723
723
724 annotate
724 annotate
725
725
726 $ hg annotate a
726 $ hg annotate a
727 1: expand $Id$
727 1: expand $Id$
728 1: do not process $Id:
728 1: do not process $Id:
729 1: xxx $
729 1: xxx $
730 2: $Xinfo$
730 2: $Xinfo$
731
731
732 remove with status checks
732 remove with status checks
733
733
734 $ hg debugrebuildstate
734 $ hg debugrebuildstate
735 $ hg remove a
735 $ hg remove a
736 $ hg --debug commit -m rma
736 $ hg --debug commit -m rma
737 committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
737 committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
738 $ hg status
738 $ hg status
739 ? c
739 ? c
740
740
741 Rollback, revert, and check expansion
741 Rollback, revert, and check expansion
742
742
743 $ hg rollback
743 $ hg rollback
744 repository tip rolled back to revision 2 (undo commit)
744 repository tip rolled back to revision 2 (undo commit)
745 working directory now based on revision 2
745 working directory now based on revision 2
746 $ hg status
746 $ hg status
747 R a
747 R a
748 ? c
748 ? c
749 $ hg revert --no-backup --rev tip a
749 $ hg revert --no-backup --rev tip a
750 $ cat a
750 $ cat a
751 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
751 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
752 do not process $Id:
752 do not process $Id:
753 xxx $
753 xxx $
754 $Xinfo: User Name <user@example.com>: firstline $
754 $Xinfo: User Name <user@example.com>: firstline $
755
755
756 Clone to test global and local configurations
756 Clone to test global and local configurations
757
757
758 $ cd ..
758 $ cd ..
759
759
760 Expansion in destinaton with global configuration
760 Expansion in destinaton with global configuration
761
761
762 $ hg --quiet clone Test globalconf
762 $ hg --quiet clone Test globalconf
763 $ cat globalconf/a
763 $ cat globalconf/a
764 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
764 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
765 do not process $Id:
765 do not process $Id:
766 xxx $
766 xxx $
767 $Xinfo: User Name <user@example.com>: firstline $
767 $Xinfo: User Name <user@example.com>: firstline $
768
768
769 No expansion in destination with local configuration in origin only
769 No expansion in destination with local configuration in origin only
770
770
771 $ hg --quiet --config 'keyword.**=ignore' clone Test localconf
771 $ hg --quiet --config 'keyword.**=ignore' clone Test localconf
772 $ cat localconf/a
772 $ cat localconf/a
773 expand $Id$
773 expand $Id$
774 do not process $Id:
774 do not process $Id:
775 xxx $
775 xxx $
776 $Xinfo$
776 $Xinfo$
777
777
778 Clone to test incoming
778 Clone to test incoming
779
779
780 $ hg clone -r1 Test Test-a
780 $ hg clone -r1 Test Test-a
781 adding changesets
781 adding changesets
782 adding manifests
782 adding manifests
783 adding file changes
783 adding file changes
784 added 2 changesets with 3 changes to 3 files
784 added 2 changesets with 3 changes to 3 files
785 updating to branch default
785 updating to branch default
786 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
786 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
787 $ cd Test-a
787 $ cd Test-a
788 $ cat <<EOF >> .hg/hgrc
788 $ cat <<EOF >> .hg/hgrc
789 > [paths]
789 > [paths]
790 > default = ../Test
790 > default = ../Test
791 > EOF
791 > EOF
792 $ hg incoming
792 $ hg incoming
793 comparing with $TESTTMP/Test
793 comparing with $TESTTMP/Test
794 searching for changes
794 searching for changes
795 changeset: 2:bb948857c743
795 changeset: 2:bb948857c743
796 tag: tip
796 tag: tip
797 user: User Name <user@example.com>
797 user: User Name <user@example.com>
798 date: Thu Jan 01 00:00:02 1970 +0000
798 date: Thu Jan 01 00:00:02 1970 +0000
799 summary: firstline
799 summary: firstline
800
800
801 Imported patch should not be rejected
801 Imported patch should not be rejected
802
802
803 $ python -c \
803 $ python -c \
804 > 'import re; s=re.sub("(Id.*)","\\1 rejecttest",open("a").read()); open("a","wb").write(s);'
804 > 'import re; s=re.sub("(Id.*)","\\1 rejecttest",open("a").read()); open("a","wb").write(s);'
805 $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
805 $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
806 a
806 a
807 overwriting a expanding keywords
807 overwriting a expanding keywords
808 committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
808 committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
809 $ hg export -o ../rejecttest.diff tip
809 $ hg export -o ../rejecttest.diff tip
810 $ cd ../Test
810 $ cd ../Test
811 $ hg import ../rejecttest.diff
811 $ hg import ../rejecttest.diff
812 applying ../rejecttest.diff
812 applying ../rejecttest.diff
813 $ cat a b
813 $ cat a b
814 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
814 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
815 do not process $Id: rejecttest
815 do not process $Id: rejecttest
816 xxx $
816 xxx $
817 $Xinfo: User Name <user@example.com>: rejects? $
817 $Xinfo: User Name <user@example.com>: rejects? $
818 ignore $Id$
818 ignore $Id$
819
819
820 $ hg rollback
820 $ hg rollback
821 repository tip rolled back to revision 2 (undo commit)
821 repository tip rolled back to revision 2 (undo commit)
822 working directory now based on revision 2
822 working directory now based on revision 2
823 $ hg update --clean
823 $ hg update --clean
824 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
824 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
825
825
826 kwexpand/kwshrink on selected files
826 kwexpand/kwshrink on selected files
827
827
828 $ mkdir x
828 $ mkdir x
829 $ hg copy a x/a
829 $ hg copy a x/a
830 $ hg --verbose kwshrink a
830 $ hg --verbose kwshrink a
831 overwriting a shrinking keywords
831 overwriting a shrinking keywords
832 $ hg status a
832 $ hg status a
833 $ hg --verbose kwexpand a
833 $ hg --verbose kwexpand a
834 overwriting a expanding keywords
834 overwriting a expanding keywords
835 $ hg status a
835 $ hg status a
836
836
837 kwexpand x/a should abort
837 kwexpand x/a should abort
838
838
839 $ hg --verbose kwexpand x/a
839 $ hg --verbose kwexpand x/a
840 abort: outstanding uncommitted changes
840 abort: outstanding uncommitted changes
841 [255]
841 [255]
842 $ cd x
842 $ cd x
843 $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
843 $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
844 x/a
844 x/a
845 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
845 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
846 overwriting x/a expanding keywords
846 overwriting x/a expanding keywords
847 committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
847 committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
848 $ cat a
848 $ cat a
849 expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $
849 expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $
850 do not process $Id:
850 do not process $Id:
851 xxx $
851 xxx $
852 $Xinfo: User Name <user@example.com>: xa $
852 $Xinfo: User Name <user@example.com>: xa $
853
853
854 kwshrink a inside directory x
854 kwshrink a inside directory x
855
855
856 $ hg --verbose kwshrink a
856 $ hg --verbose kwshrink a
857 overwriting x/a shrinking keywords
857 overwriting x/a shrinking keywords
858 $ cat a
858 $ cat a
859 expand $Id$
859 expand $Id$
860 do not process $Id:
860 do not process $Id:
861 xxx $
861 xxx $
862 $Xinfo$
862 $Xinfo$
863 $ cd ..
863 $ cd ..
864
864
865 kwexpand nonexistent
865 kwexpand nonexistent
866
866
867 $ hg kwexpand nonexistent
867 $ hg kwexpand nonexistent
868 nonexistent:* (glob)
868 nonexistent:* (glob)
869
869
870
870
871 hg serve
871 hg serve
872 - expand with hgweb file
872 - expand with hgweb file
873 - no expansion with hgweb annotate/changeset/filediff
873 - no expansion with hgweb annotate/changeset/filediff
874 - check errors
874 - check errors
875
875
876 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
876 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
877 $ cat hg.pid >> $DAEMON_PIDS
877 $ cat hg.pid >> $DAEMON_PIDS
878 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/file/tip/a/?style=raw'
878 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/file/tip/a/?style=raw'
879 200 Script output follows
879 200 Script output follows
880
880
881 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
881 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
882 do not process $Id:
882 do not process $Id:
883 xxx $
883 xxx $
884 $Xinfo: User Name <user@example.com>: firstline $
884 $Xinfo: User Name <user@example.com>: firstline $
885 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/annotate/tip/a/?style=raw'
885 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/annotate/tip/a/?style=raw'
886 200 Script output follows
886 200 Script output follows
887
887
888
888
889 user@1: expand $Id$
889 user@1: expand $Id$
890 user@1: do not process $Id:
890 user@1: do not process $Id:
891 user@1: xxx $
891 user@1: xxx $
892 user@2: $Xinfo$
892 user@2: $Xinfo$
893
893
894
894
895
895
896
896
897 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/rev/tip/?style=raw'
897 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/rev/tip/?style=raw'
898 200 Script output follows
898 200 Script output follows
899
899
900
900
901 # HG changeset patch
901 # HG changeset patch
902 # User User Name <user@example.com>
902 # User User Name <user@example.com>
903 # Date 3 0
903 # Date 3 0
904 # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4
904 # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4
905 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
905 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
906 xa
906 xa
907
907
908 diff -r bb948857c743 -r b4560182a3f9 x/a
908 diff -r bb948857c743 -r b4560182a3f9 x/a
909 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
909 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
910 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
910 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
911 @@ -0,0 +1,4 @@
911 @@ -0,0 +1,4 @@
912 +expand $Id$
912 +expand $Id$
913 +do not process $Id:
913 +do not process $Id:
914 +xxx $
914 +xxx $
915 +$Xinfo$
915 +$Xinfo$
916
916
917 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/diff/bb948857c743/a?style=raw'
917 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/diff/bb948857c743/a?style=raw'
918 200 Script output follows
918 200 Script output follows
919
919
920
920
921 diff -r ef63ca68695b -r bb948857c743 a
921 diff -r ef63ca68695b -r bb948857c743 a
922 --- a/a Thu Jan 01 00:00:00 1970 +0000
922 --- a/a Thu Jan 01 00:00:00 1970 +0000
923 +++ b/a Thu Jan 01 00:00:02 1970 +0000
923 +++ b/a Thu Jan 01 00:00:02 1970 +0000
924 @@ -1,3 +1,4 @@
924 @@ -1,3 +1,4 @@
925 expand $Id$
925 expand $Id$
926 do not process $Id:
926 do not process $Id:
927 xxx $
927 xxx $
928 +$Xinfo$
928 +$Xinfo$
929
929
930
930
931
931
932
932
933 $ cat errors.log
933 $ cat errors.log
934
934
935 Prepare merge and resolve tests
935 Prepare merge and resolve tests
936
936
937 $ echo '$Id$' > m
937 $ echo '$Id$' > m
938 $ hg add m
938 $ hg add m
939 $ hg commit -m 4kw
939 $ hg commit -m 4kw
940 $ echo foo >> m
940 $ echo foo >> m
941 $ hg commit -m 5foo
941 $ hg commit -m 5foo
942
942
943 simplemerge
943 simplemerge
944
944
945 $ hg update 4
945 $ hg update 4
946 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
946 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
947 $ echo foo >> m
947 $ echo foo >> m
948 $ hg commit -m 6foo
948 $ hg commit -m 6foo
949 created new head
949 created new head
950 $ hg merge
950 $ hg merge
951 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
951 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
952 (branch merge, don't forget to commit)
952 (branch merge, don't forget to commit)
953 $ hg commit -m simplemerge
953 $ hg commit -m simplemerge
954 $ cat m
954 $ cat m
955 $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $
955 $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $
956 foo
956 foo
957
957
958 conflict: keyword should stay outside conflict zone
958 conflict: keyword should stay outside conflict zone
959
959
960 $ hg update 4
960 $ hg update 4
961 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
961 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
962 $ echo bar >> m
962 $ echo bar >> m
963 $ hg commit -m 8bar
963 $ hg commit -m 8bar
964 created new head
964 created new head
965 $ hg merge
965 $ hg merge
966 merging m
966 merging m
967 warning: conflicts during merge.
967 warning: conflicts during merge.
968 merging m failed!
968 merging m failed!
969 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
969 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
970 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
970 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
971 [1]
971 [1]
972 $ cat m
972 $ cat m
973 $Id$
973 $Id$
974 <<<<<<< local
974 <<<<<<< local
975 bar
975 bar
976 =======
976 =======
977 foo
977 foo
978 >>>>>>> other
978 >>>>>>> other
979
979
980 resolve to local
980 resolve to local
981
981
982 $ HGMERGE=internal:local hg resolve -a
982 $ HGMERGE=internal:local hg resolve -a
983 $ hg commit -m localresolve
983 $ hg commit -m localresolve
984 $ cat m
984 $ cat m
985 $Id: m 41efa6d38e9b Thu, 01 Jan 1970 00:00:00 +0000 test $
985 $Id: m 41efa6d38e9b Thu, 01 Jan 1970 00:00:00 +0000 test $
986 bar
986 bar
987
987
988 Test restricted mode with transplant -b
988 Test restricted mode with transplant -b
989
989
990 $ hg update 6
990 $ hg update 6
991 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
991 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
992 $ hg branch foo
992 $ hg branch foo
993 marked working directory as branch foo
993 marked working directory as branch foo
994 $ mv a a.bak
994 $ mv a a.bak
995 $ echo foobranch > a
995 $ echo foobranch > a
996 $ cat a.bak >> a
996 $ cat a.bak >> a
997 $ rm a.bak
997 $ rm a.bak
998 $ hg commit -m 9foobranch
998 $ hg commit -m 9foobranch
999 $ hg update default
999 $ hg update default
1000 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1000 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1001 $ hg -y transplant -b foo tip
1001 $ hg -y transplant -b foo tip
1002 applying 4aa30d025d50
1002 applying 4aa30d025d50
1003 4aa30d025d50 transplanted to 5a4da427c162
1003 4aa30d025d50 transplanted to 5a4da427c162
1004
1004
1005 Expansion in changeset but not in file
1005 Expansion in changeset but not in file
1006
1006
1007 $ hg tip -p
1007 $ hg tip -p
1008 changeset: 11:5a4da427c162
1008 changeset: 11:5a4da427c162
1009 tag: tip
1009 tag: tip
1010 parent: 9:41efa6d38e9b
1010 parent: 9:41efa6d38e9b
1011 user: test
1011 user: test
1012 date: Thu Jan 01 00:00:00 1970 +0000
1012 date: Thu Jan 01 00:00:00 1970 +0000
1013 summary: 9foobranch
1013 summary: 9foobranch
1014
1014
1015 diff -r 41efa6d38e9b -r 5a4da427c162 a
1015 diff -r 41efa6d38e9b -r 5a4da427c162 a
1016 --- a/a Thu Jan 01 00:00:00 1970 +0000
1016 --- a/a Thu Jan 01 00:00:00 1970 +0000
1017 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1017 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1018 @@ -1,3 +1,4 @@
1018 @@ -1,3 +1,4 @@
1019 +foobranch
1019 +foobranch
1020 expand $Id$
1020 expand $Id$
1021 do not process $Id:
1021 do not process $Id:
1022 xxx $
1022 xxx $
1023
1023
1024 $ head -n 2 a
1024 $ head -n 2 a
1025 foobranch
1025 foobranch
1026 expand $Id: a 5a4da427c162 Thu, 01 Jan 1970 00:00:00 +0000 test $
1026 expand $Id: a 5a4da427c162 Thu, 01 Jan 1970 00:00:00 +0000 test $
1027
1027
1028 Turn off expansion
1028 Turn off expansion
1029
1029
1030 $ hg -q rollback
1030 $ hg -q rollback
1031 $ hg -q update -C
1031 $ hg -q update -C
1032
1032
1033 kwshrink with unknown file u
1033 kwshrink with unknown file u
1034
1034
1035 $ cp a u
1035 $ cp a u
1036 $ hg --verbose kwshrink
1036 $ hg --verbose kwshrink
1037 overwriting a shrinking keywords
1037 overwriting a shrinking keywords
1038 overwriting m shrinking keywords
1038 overwriting m shrinking keywords
1039 overwriting x/a shrinking keywords
1039 overwriting x/a shrinking keywords
1040
1040
1041 Keywords shrunk in working directory, but not yet disabled
1041 Keywords shrunk in working directory, but not yet disabled
1042 - cat shows unexpanded keywords
1042 - cat shows unexpanded keywords
1043 - hg cat shows expanded keywords
1043 - hg cat shows expanded keywords
1044
1044
1045 $ cat a b
1045 $ cat a b
1046 expand $Id$
1046 expand $Id$
1047 do not process $Id:
1047 do not process $Id:
1048 xxx $
1048 xxx $
1049 $Xinfo$
1049 $Xinfo$
1050 ignore $Id$
1050 ignore $Id$
1051 $ hg cat sym a b && echo
1051 $ hg cat sym a b && echo
1052 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
1052 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
1053 do not process $Id:
1053 do not process $Id:
1054 xxx $
1054 xxx $
1055 $Xinfo: User Name <user@example.com>: firstline $
1055 $Xinfo: User Name <user@example.com>: firstline $
1056 ignore $Id$
1056 ignore $Id$
1057 a
1057 a
1058
1058
1059 Now disable keyword expansion
1059 Now disable keyword expansion
1060
1060
1061 $ rm "$HGRCPATH"
1061 $ rm "$HGRCPATH"
1062 $ cat a b
1062 $ cat a b
1063 expand $Id$
1063 expand $Id$
1064 do not process $Id:
1064 do not process $Id:
1065 xxx $
1065 xxx $
1066 $Xinfo$
1066 $Xinfo$
1067 ignore $Id$
1067 ignore $Id$
1068 $ hg cat sym a b && echo
1068 $ hg cat sym a b && echo
1069 expand $Id$
1069 expand $Id$
1070 do not process $Id:
1070 do not process $Id:
1071 xxx $
1071 xxx $
1072 $Xinfo$
1072 $Xinfo$
1073 ignore $Id$
1073 ignore $Id$
1074 a
1074 a
@@ -1,65 +1,65 b''
1 Source bundle was generated with the following script:
1 Source bundle was generated with the following script:
2
2
3 # hg init
3 # hg init
4 # echo a > a
4 # echo a > a
5 # ln -s a l
5 # ln -s a l
6 # hg ci -Ama -d'0 0'
6 # hg ci -Ama -d'0 0'
7 # mkdir b
7 # mkdir b
8 # echo a > b/a
8 # echo a > b/a
9 # chmod +x b/a
9 # chmod +x b/a
10 # hg ci -Amb -d'1 0'
10 # hg ci -Amb -d'1 0'
11
11
12 $ hg init
12 $ hg init
13 $ hg -q pull "$TESTDIR/test-manifest.hg"
13 $ hg -q pull "$TESTDIR/bundles/test-manifest.hg"
14
14
15 The next call is expected to return nothing:
15 The next call is expected to return nothing:
16
16
17 $ hg manifest
17 $ hg manifest
18
18
19 $ hg co
19 $ hg co
20 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
20 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
21
21
22 $ hg manifest
22 $ hg manifest
23 a
23 a
24 b/a
24 b/a
25 l
25 l
26
26
27 $ hg manifest -v
27 $ hg manifest -v
28 644 a
28 644 a
29 755 * b/a
29 755 * b/a
30 644 @ l
30 644 @ l
31
31
32 $ hg manifest --debug
32 $ hg manifest --debug
33 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a
33 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a
34 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 755 * b/a
34 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 755 * b/a
35 047b75c6d7a3ef6a2243bd0e99f94f6ea6683597 644 @ l
35 047b75c6d7a3ef6a2243bd0e99f94f6ea6683597 644 @ l
36
36
37 $ hg manifest -r 0
37 $ hg manifest -r 0
38 a
38 a
39 l
39 l
40
40
41 $ hg manifest -r 1
41 $ hg manifest -r 1
42 a
42 a
43 b/a
43 b/a
44 l
44 l
45
45
46 $ hg manifest -r tip
46 $ hg manifest -r tip
47 a
47 a
48 b/a
48 b/a
49 l
49 l
50
50
51 $ hg manifest tip
51 $ hg manifest tip
52 a
52 a
53 b/a
53 b/a
54 l
54 l
55
55
56
56
57 The next two calls are expected to abort:
57 The next two calls are expected to abort:
58
58
59 $ hg manifest -r 2
59 $ hg manifest -r 2
60 abort: unknown revision '2'!
60 abort: unknown revision '2'!
61 [255]
61 [255]
62
62
63 $ hg manifest -r tip tip
63 $ hg manifest -r tip tip
64 abort: please specify just one revision
64 abort: please specify just one revision
65 [255]
65 [255]
@@ -1,62 +1,62 b''
1
1
2 $ cat > echo.py <<EOF
2 $ cat > echo.py <<EOF
3 > #!/usr/bin/env python
3 > #!/usr/bin/env python
4 > import os, sys
4 > import os, sys
5 > try:
5 > try:
6 > import msvcrt
6 > import msvcrt
7 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
7 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
8 > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
8 > msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
9 > except ImportError:
9 > except ImportError:
10 > pass
10 > pass
11 >
11 >
12 > for k in ('HG_FILE', 'HG_MY_ISLINK', 'HG_OTHER_ISLINK', 'HG_BASE_ISLINK'):
12 > for k in ('HG_FILE', 'HG_MY_ISLINK', 'HG_OTHER_ISLINK', 'HG_BASE_ISLINK'):
13 > print k, os.environ[k]
13 > print k, os.environ[k]
14 > EOF
14 > EOF
15
15
16 Create 2 heads containing the same file, once as
16 Create 2 heads containing the same file, once as
17 a file, once as a link. Bundle was generated with:
17 a file, once as a link. Bundle was generated with:
18
18
19 # hg init t
19 # hg init t
20 # cd t
20 # cd t
21 # echo a > a
21 # echo a > a
22 # hg ci -qAm t0 -d '0 0'
22 # hg ci -qAm t0 -d '0 0'
23 # echo l > l
23 # echo l > l
24 # hg ci -qAm t1 -d '1 0'
24 # hg ci -qAm t1 -d '1 0'
25 # hg up -C 0
25 # hg up -C 0
26 # ln -s a l
26 # ln -s a l
27 # hg ci -qAm t2 -d '2 0'
27 # hg ci -qAm t2 -d '2 0'
28 # echo l2 > l2
28 # echo l2 > l2
29 # hg ci -qAm t3 -d '3 0'
29 # hg ci -qAm t3 -d '3 0'
30
30
31 $ hg init t
31 $ hg init t
32 $ cd t
32 $ cd t
33 $ hg -q pull "$TESTDIR/test-merge-symlinks.hg"
33 $ hg -q pull "$TESTDIR/bundles/test-merge-symlinks.hg"
34 $ hg up -C 3
34 $ hg up -C 3
35 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
35 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
36
36
37 Merge them and display *_ISLINK vars
37 Merge them and display *_ISLINK vars
38 merge heads
38 merge heads
39
39
40 $ hg merge --tool="python ../echo.py"
40 $ hg merge --tool="python ../echo.py"
41 merging l
41 merging l
42 HG_FILE l
42 HG_FILE l
43 HG_MY_ISLINK 1
43 HG_MY_ISLINK 1
44 HG_OTHER_ISLINK 0
44 HG_OTHER_ISLINK 0
45 HG_BASE_ISLINK 0
45 HG_BASE_ISLINK 0
46 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
46 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
47 (branch merge, don't forget to commit)
47 (branch merge, don't forget to commit)
48
48
49 Test working directory symlink bit calculation wrt copies,
49 Test working directory symlink bit calculation wrt copies,
50 especially on non-supporting systems.
50 especially on non-supporting systems.
51 merge working directory
51 merge working directory
52
52
53 $ hg up -C 2
53 $ hg up -C 2
54 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
54 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
55 $ hg copy l l2
55 $ hg copy l l2
56 $ HGMERGE="python ../echo.py" hg up 3
56 $ HGMERGE="python ../echo.py" hg up 3
57 merging l2
57 merging l2
58 HG_FILE l2
58 HG_FILE l2
59 HG_MY_ISLINK 1
59 HG_MY_ISLINK 1
60 HG_OTHER_ISLINK 0
60 HG_OTHER_ISLINK 0
61 HG_BASE_ISLINK 0
61 HG_BASE_ISLINK 0
62 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
62 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
@@ -1,59 +1,59 b''
1 $ "$TESTDIR/hghave" no-symlink || exit 80
1 $ "$TESTDIR/hghave" no-symlink || exit 80
2
2
3 # The following script was used to create the bundle:
3 # The following script was used to create the bundle:
4 #
4 #
5 # hg init symlinks
5 # hg init symlinks
6 # cd symlinks
6 # cd symlinks
7 # echo a > a
7 # echo a > a
8 # mkdir d
8 # mkdir d
9 # echo b > d/b
9 # echo b > d/b
10 # ln -s a a.lnk
10 # ln -s a a.lnk
11 # ln -s d/b d/b.lnk
11 # ln -s d/b d/b.lnk
12 # hg ci -Am t
12 # hg ci -Am t
13 # hg bundle --base null ../test-no-symlinks.hg
13 # hg bundle --base null ../test-no-symlinks.hg
14
14
15 Extract a symlink on a platform not supporting them
15 Extract a symlink on a platform not supporting them
16
16
17 $ hg init t
17 $ hg init t
18 $ cd t
18 $ cd t
19 $ hg pull -q "$TESTDIR/test-no-symlinks.hg"
19 $ hg pull -q "$TESTDIR/bundles/test-no-symlinks.hg"
20 $ hg update
20 $ hg update
21 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
21 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
22 $ cat a.lnk && echo
22 $ cat a.lnk && echo
23 a
23 a
24 $ cat d/b.lnk && echo
24 $ cat d/b.lnk && echo
25 d/b
25 d/b
26
26
27 Copy a symlink and move another
27 Copy a symlink and move another
28
28
29 $ hg copy a.lnk d/a2.lnk
29 $ hg copy a.lnk d/a2.lnk
30 $ hg mv d/b.lnk b2.lnk
30 $ hg mv d/b.lnk b2.lnk
31 $ hg ci -Am copy
31 $ hg ci -Am copy
32 $ cat d/a2.lnk && echo
32 $ cat d/a2.lnk && echo
33 a
33 a
34 $ cat b2.lnk && echo
34 $ cat b2.lnk && echo
35 d/b
35 d/b
36
36
37 Bundle and extract again
37 Bundle and extract again
38
38
39 $ hg bundle --base null ../symlinks.hg
39 $ hg bundle --base null ../symlinks.hg
40 2 changesets found
40 2 changesets found
41 $ cd ..
41 $ cd ..
42 $ hg init t2
42 $ hg init t2
43 $ cd t2
43 $ cd t2
44 $ hg pull ../symlinks.hg
44 $ hg pull ../symlinks.hg
45 pulling from ../symlinks.hg
45 pulling from ../symlinks.hg
46 requesting all changes
46 requesting all changes
47 adding changesets
47 adding changesets
48 adding manifests
48 adding manifests
49 adding file changes
49 adding file changes
50 added 2 changesets with 6 changes to 6 files
50 added 2 changesets with 6 changes to 6 files
51 (run 'hg update' to get a working copy)
51 (run 'hg update' to get a working copy)
52 $ hg update
52 $ hg update
53 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
53 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
54 $ cat a.lnk && echo
54 $ cat a.lnk && echo
55 a
55 a
56 $ cat d/a2.lnk && echo
56 $ cat d/a2.lnk && echo
57 a
57 a
58 $ cat b2.lnk && echo
58 $ cat b2.lnk && echo
59 d/b
59 d/b
General Comments 0
You need to be logged in to leave comments. Login now