Show More
@@ -1,399 +1,399 b'' | |||||
1 | #require mtn |
|
1 | #require mtn | |
2 |
|
2 | |||
3 | Monotone directory is called .monotone on *nix and monotone |
|
3 | Monotone directory is called .monotone on *nix and monotone | |
4 | on Windows. |
|
4 | on Windows. | |
5 |
|
5 | |||
6 | #if windows |
|
6 | #if windows | |
7 |
|
7 | |||
8 | $ mtndir=monotone |
|
8 | $ mtndir=monotone | |
9 |
|
9 | |||
10 | #else |
|
10 | #else | |
11 |
|
11 | |||
12 | $ mtndir=.monotone |
|
12 | $ mtndir=.monotone | |
13 |
|
13 | |||
14 | #endif |
|
14 | #endif | |
15 |
|
15 | |||
16 | $ echo "[extensions]" >> $HGRCPATH |
|
16 | $ echo "[extensions]" >> $HGRCPATH | |
17 | $ echo "convert=" >> $HGRCPATH |
|
17 | $ echo "convert=" >> $HGRCPATH | |
18 |
|
18 | |||
19 | Windows version of monotone home |
|
19 | Windows version of monotone home | |
20 |
|
20 | |||
21 | $ APPDATA=$HOME; export APPDATA |
|
21 | $ APPDATA=$HOME; export APPDATA | |
22 |
|
22 | |||
23 | tedious monotone keys configuration |
|
23 | tedious monotone keys configuration | |
24 | The /dev/null redirection is necessary under Windows, or |
|
24 | The /dev/null redirection is necessary under Windows, or | |
25 | it complains about home directory permissions |
|
25 | it complains about home directory permissions | |
26 |
|
26 | |||
27 | $ mtn --quiet genkey test@selenic.com 1>/dev/null 2>&1 <<EOF |
|
27 | $ mtn --quiet genkey test@selenic.com 1>/dev/null 2>&1 <<EOF | |
28 | > passphrase |
|
28 | > passphrase | |
29 | > passphrase |
|
29 | > passphrase | |
30 | > EOF |
|
30 | > EOF | |
31 | $ cat >> $HOME/$mtndir/monotonerc <<EOF |
|
31 | $ cat >> $HOME/$mtndir/monotonerc <<EOF | |
32 | > function get_passphrase(keypair_id) |
|
32 | > function get_passphrase(keypair_id) | |
33 | > return "passphrase" |
|
33 | > return "passphrase" | |
34 | > end |
|
34 | > end | |
35 | > EOF |
|
35 | > EOF | |
36 |
|
36 | |||
37 | create monotone repository |
|
37 | create monotone repository | |
38 |
|
38 | |||
39 | $ mtn db init --db=repo.mtn |
|
39 | $ mtn db init --db=repo.mtn | |
40 | $ mtn --db=repo.mtn --branch=com.selenic.test setup workingdir |
|
40 | $ mtn --db=repo.mtn --branch=com.selenic.test setup workingdir | |
41 | $ cd workingdir |
|
41 | $ cd workingdir | |
42 | $ echo a > a |
|
42 | $ echo a > a | |
43 | $ mkdir dir |
|
43 | $ mkdir dir | |
44 | $ echo b > dir/b |
|
44 | $ echo b > dir/b | |
45 | $ echo d > dir/d |
|
45 | $ echo d > dir/d | |
46 | $ $PYTHON -c 'open("bin", "wb").write(b"a\\x00b")' |
|
46 | $ $PYTHON -c 'open("bin", "wb").write(b"a\\x00b") and None' | |
47 | $ echo c > c |
|
47 | $ echo c > c | |
48 | $ mtn add a dir/b dir/d c bin |
|
48 | $ mtn add a dir/b dir/d c bin | |
49 | mtn: adding 'a' to workspace manifest |
|
49 | mtn: adding 'a' to workspace manifest | |
50 | mtn: adding 'bin' to workspace manifest |
|
50 | mtn: adding 'bin' to workspace manifest | |
51 | mtn: adding 'c' to workspace manifest |
|
51 | mtn: adding 'c' to workspace manifest | |
52 | mtn: adding 'dir' to workspace manifest |
|
52 | mtn: adding 'dir' to workspace manifest | |
53 | mtn: adding 'dir/b' to workspace manifest |
|
53 | mtn: adding 'dir/b' to workspace manifest | |
54 | mtn: adding 'dir/d' to workspace manifest |
|
54 | mtn: adding 'dir/d' to workspace manifest | |
55 | $ mtn ci -m initialize |
|
55 | $ mtn ci -m initialize | |
56 | mtn: beginning commit on branch 'com.selenic.test' |
|
56 | mtn: beginning commit on branch 'com.selenic.test' | |
57 | mtn: committed revision 0f6e5e4f2e7d2a8ef312408f57618abf026afd90 |
|
57 | mtn: committed revision 0f6e5e4f2e7d2a8ef312408f57618abf026afd90 | |
58 |
|
58 | |||
59 | update monotone working directory |
|
59 | update monotone working directory | |
60 |
|
60 | |||
61 | $ mtn mv a dir/a |
|
61 | $ mtn mv a dir/a | |
62 | mtn: skipping 'dir', already accounted for in workspace |
|
62 | mtn: skipping 'dir', already accounted for in workspace | |
63 | mtn: renaming 'a' to 'dir/a' in workspace manifest |
|
63 | mtn: renaming 'a' to 'dir/a' in workspace manifest | |
64 | $ echo a >> dir/a |
|
64 | $ echo a >> dir/a | |
65 | $ echo b >> dir/b |
|
65 | $ echo b >> dir/b | |
66 | $ mtn drop c |
|
66 | $ mtn drop c | |
67 | mtn: dropping 'c' from workspace manifest |
|
67 | mtn: dropping 'c' from workspace manifest | |
68 | $ $PYTHON -c 'open("bin", "wb").write(b"b\\x00c")' |
|
68 | $ $PYTHON -c 'open("bin", "wb").write(b"b\\x00c") and None' | |
69 | $ mtn ci -m update1 |
|
69 | $ mtn ci -m update1 | |
70 | mtn: beginning commit on branch 'com.selenic.test' |
|
70 | mtn: beginning commit on branch 'com.selenic.test' | |
71 | mtn: committed revision 51d0a982464573a2a2cf5ee2c9219c652aaebeff |
|
71 | mtn: committed revision 51d0a982464573a2a2cf5ee2c9219c652aaebeff | |
72 | $ cd .. |
|
72 | $ cd .. | |
73 |
|
73 | |||
74 | convert once |
|
74 | convert once | |
75 |
|
75 | |||
76 | $ hg convert -s mtn repo.mtn |
|
76 | $ hg convert -s mtn repo.mtn | |
77 | assuming destination repo.mtn-hg |
|
77 | assuming destination repo.mtn-hg | |
78 | initializing destination repo.mtn-hg repository |
|
78 | initializing destination repo.mtn-hg repository | |
79 | scanning source... |
|
79 | scanning source... | |
80 | sorting... |
|
80 | sorting... | |
81 | converting... |
|
81 | converting... | |
82 | 1 initialize |
|
82 | 1 initialize | |
83 | 0 update1 |
|
83 | 0 update1 | |
84 | $ cd workingdir |
|
84 | $ cd workingdir | |
85 | $ echo e > e |
|
85 | $ echo e > e | |
86 | $ mtn add e |
|
86 | $ mtn add e | |
87 | mtn: adding 'e' to workspace manifest |
|
87 | mtn: adding 'e' to workspace manifest | |
88 | $ mtn drop dir/b |
|
88 | $ mtn drop dir/b | |
89 | mtn: dropping 'dir/b' from workspace manifest |
|
89 | mtn: dropping 'dir/b' from workspace manifest | |
90 | $ mtn mv bin bin2 |
|
90 | $ mtn mv bin bin2 | |
91 | mtn: renaming 'bin' to 'bin2' in workspace manifest |
|
91 | mtn: renaming 'bin' to 'bin2' in workspace manifest | |
92 | $ mtn ci -m 'update2 "with" quotes' |
|
92 | $ mtn ci -m 'update2 "with" quotes' | |
93 | mtn: beginning commit on branch 'com.selenic.test' |
|
93 | mtn: beginning commit on branch 'com.selenic.test' | |
94 | mtn: committed revision ebe58335d85d8cb176b6d0a12be04f5314b998da |
|
94 | mtn: committed revision ebe58335d85d8cb176b6d0a12be04f5314b998da | |
95 |
|
95 | |||
96 | test directory move |
|
96 | test directory move | |
97 |
|
97 | |||
98 | $ mkdir -p dir1/subdir1 |
|
98 | $ mkdir -p dir1/subdir1 | |
99 | $ mkdir -p dir1/subdir2_other |
|
99 | $ mkdir -p dir1/subdir2_other | |
100 | $ echo file1 > dir1/subdir1/file1 |
|
100 | $ echo file1 > dir1/subdir1/file1 | |
101 | $ echo file2 > dir1/subdir2_other/file1 |
|
101 | $ echo file2 > dir1/subdir2_other/file1 | |
102 | $ mtn add dir1/subdir1/file1 dir1/subdir2_other/file1 |
|
102 | $ mtn add dir1/subdir1/file1 dir1/subdir2_other/file1 | |
103 | mtn: adding 'dir1' to workspace manifest |
|
103 | mtn: adding 'dir1' to workspace manifest | |
104 | mtn: adding 'dir1/subdir1' to workspace manifest |
|
104 | mtn: adding 'dir1/subdir1' to workspace manifest | |
105 | mtn: adding 'dir1/subdir1/file1' to workspace manifest |
|
105 | mtn: adding 'dir1/subdir1/file1' to workspace manifest | |
106 | mtn: adding 'dir1/subdir2_other' to workspace manifest |
|
106 | mtn: adding 'dir1/subdir2_other' to workspace manifest | |
107 | mtn: adding 'dir1/subdir2_other/file1' to workspace manifest |
|
107 | mtn: adding 'dir1/subdir2_other/file1' to workspace manifest | |
108 | $ mtn ci -m createdir1 |
|
108 | $ mtn ci -m createdir1 | |
109 | mtn: beginning commit on branch 'com.selenic.test' |
|
109 | mtn: beginning commit on branch 'com.selenic.test' | |
110 | mtn: committed revision a8d62bc04fee4d2936d28e98bbcc81686dd74306 |
|
110 | mtn: committed revision a8d62bc04fee4d2936d28e98bbcc81686dd74306 | |
111 | $ mtn rename dir1/subdir1 dir1/subdir2 |
|
111 | $ mtn rename dir1/subdir1 dir1/subdir2 | |
112 | mtn: skipping 'dir1', already accounted for in workspace |
|
112 | mtn: skipping 'dir1', already accounted for in workspace | |
113 | mtn: renaming 'dir1/subdir1' to 'dir1/subdir2' in workspace manifest |
|
113 | mtn: renaming 'dir1/subdir1' to 'dir1/subdir2' in workspace manifest | |
114 | $ mtn ci -m movedir1 |
|
114 | $ mtn ci -m movedir1 | |
115 | mtn: beginning commit on branch 'com.selenic.test' |
|
115 | mtn: beginning commit on branch 'com.selenic.test' | |
116 | mtn: committed revision 2c3d241bbbfe538b1b51d910f5676407e3f4d3a6 |
|
116 | mtn: committed revision 2c3d241bbbfe538b1b51d910f5676407e3f4d3a6 | |
117 |
|
117 | |||
118 | test subdirectory move |
|
118 | test subdirectory move | |
119 |
|
119 | |||
120 | $ mtn mv dir dir2 |
|
120 | $ mtn mv dir dir2 | |
121 | mtn: renaming 'dir' to 'dir2' in workspace manifest |
|
121 | mtn: renaming 'dir' to 'dir2' in workspace manifest | |
122 | $ echo newfile > dir2/newfile |
|
122 | $ echo newfile > dir2/newfile | |
123 | $ mtn drop dir2/d |
|
123 | $ mtn drop dir2/d | |
124 | mtn: dropping 'dir2/d' from workspace manifest |
|
124 | mtn: dropping 'dir2/d' from workspace manifest | |
125 | $ mtn add dir2/newfile |
|
125 | $ mtn add dir2/newfile | |
126 | mtn: adding 'dir2/newfile' to workspace manifest |
|
126 | mtn: adding 'dir2/newfile' to workspace manifest | |
127 | $ mtn ci -m movedir |
|
127 | $ mtn ci -m movedir | |
128 | mtn: beginning commit on branch 'com.selenic.test' |
|
128 | mtn: beginning commit on branch 'com.selenic.test' | |
129 | mtn: committed revision fdb5a02dae8bfce3a79b3393680af471016e1b4c |
|
129 | mtn: committed revision fdb5a02dae8bfce3a79b3393680af471016e1b4c | |
130 |
|
130 | |||
131 | Test directory removal with empty directory |
|
131 | Test directory removal with empty directory | |
132 |
|
132 | |||
133 | $ mkdir dir2/dir |
|
133 | $ mkdir dir2/dir | |
134 | $ mkdir dir2/dir/subdir |
|
134 | $ mkdir dir2/dir/subdir | |
135 | $ echo f > dir2/dir/subdir/f |
|
135 | $ echo f > dir2/dir/subdir/f | |
136 | $ mkdir dir2/dir/emptydir |
|
136 | $ mkdir dir2/dir/emptydir | |
137 | $ mtn add --quiet -R dir2/dir |
|
137 | $ mtn add --quiet -R dir2/dir | |
138 | $ mtn ci -m emptydir |
|
138 | $ mtn ci -m emptydir | |
139 | mtn: beginning commit on branch 'com.selenic.test' |
|
139 | mtn: beginning commit on branch 'com.selenic.test' | |
140 | mtn: committed revision 8bbf76d717001d24964e4604739fdcd0f539fc88 |
|
140 | mtn: committed revision 8bbf76d717001d24964e4604739fdcd0f539fc88 | |
141 | $ mtn drop -R dir2/dir |
|
141 | $ mtn drop -R dir2/dir | |
142 | mtn: dropping 'dir2/dir/subdir/f' from workspace manifest |
|
142 | mtn: dropping 'dir2/dir/subdir/f' from workspace manifest | |
143 | mtn: dropping 'dir2/dir/subdir' from workspace manifest |
|
143 | mtn: dropping 'dir2/dir/subdir' from workspace manifest | |
144 | mtn: dropping 'dir2/dir/emptydir' from workspace manifest |
|
144 | mtn: dropping 'dir2/dir/emptydir' from workspace manifest | |
145 | mtn: dropping 'dir2/dir' from workspace manifest |
|
145 | mtn: dropping 'dir2/dir' from workspace manifest | |
146 | $ mtn ci -m dropdirectory |
|
146 | $ mtn ci -m dropdirectory | |
147 | mtn: beginning commit on branch 'com.selenic.test' |
|
147 | mtn: beginning commit on branch 'com.selenic.test' | |
148 | mtn: committed revision 2323d4bc324e6c82628dc04d47a9fd32ad24e322 |
|
148 | mtn: committed revision 2323d4bc324e6c82628dc04d47a9fd32ad24e322 | |
149 |
|
149 | |||
150 | test directory and file move |
|
150 | test directory and file move | |
151 |
|
151 | |||
152 | $ mkdir -p dir3/d1 |
|
152 | $ mkdir -p dir3/d1 | |
153 | $ echo a > dir3/a |
|
153 | $ echo a > dir3/a | |
154 | $ mtn add dir3/a dir3/d1 |
|
154 | $ mtn add dir3/a dir3/d1 | |
155 | mtn: adding 'dir3' to workspace manifest |
|
155 | mtn: adding 'dir3' to workspace manifest | |
156 | mtn: adding 'dir3/a' to workspace manifest |
|
156 | mtn: adding 'dir3/a' to workspace manifest | |
157 | mtn: adding 'dir3/d1' to workspace manifest |
|
157 | mtn: adding 'dir3/d1' to workspace manifest | |
158 | $ mtn ci -m dirfilemove |
|
158 | $ mtn ci -m dirfilemove | |
159 | mtn: beginning commit on branch 'com.selenic.test' |
|
159 | mtn: beginning commit on branch 'com.selenic.test' | |
160 | mtn: committed revision 47b192f720faa622f48c68d1eb075b26d405aa8b |
|
160 | mtn: committed revision 47b192f720faa622f48c68d1eb075b26d405aa8b | |
161 | $ mtn mv dir3/a dir3/d1/a |
|
161 | $ mtn mv dir3/a dir3/d1/a | |
162 | mtn: skipping 'dir3/d1', already accounted for in workspace |
|
162 | mtn: skipping 'dir3/d1', already accounted for in workspace | |
163 | mtn: renaming 'dir3/a' to 'dir3/d1/a' in workspace manifest |
|
163 | mtn: renaming 'dir3/a' to 'dir3/d1/a' in workspace manifest | |
164 | $ mtn mv dir3/d1 dir3/d2 |
|
164 | $ mtn mv dir3/d1 dir3/d2 | |
165 | mtn: skipping 'dir3', already accounted for in workspace |
|
165 | mtn: skipping 'dir3', already accounted for in workspace | |
166 | mtn: renaming 'dir3/d1' to 'dir3/d2' in workspace manifest |
|
166 | mtn: renaming 'dir3/d1' to 'dir3/d2' in workspace manifest | |
167 | $ mtn ci -m dirfilemove2 |
|
167 | $ mtn ci -m dirfilemove2 | |
168 | mtn: beginning commit on branch 'com.selenic.test' |
|
168 | mtn: beginning commit on branch 'com.selenic.test' | |
169 | mtn: committed revision 8b543a400d3ee7f6d4bb1835b9b9e3747c8cb632 |
|
169 | mtn: committed revision 8b543a400d3ee7f6d4bb1835b9b9e3747c8cb632 | |
170 |
|
170 | |||
171 | test directory move into another directory move |
|
171 | test directory move into another directory move | |
172 |
|
172 | |||
173 | $ mkdir dir4 |
|
173 | $ mkdir dir4 | |
174 | $ mkdir dir5 |
|
174 | $ mkdir dir5 | |
175 | $ echo a > dir4/a |
|
175 | $ echo a > dir4/a | |
176 | $ mtn add dir4/a dir5 |
|
176 | $ mtn add dir4/a dir5 | |
177 | mtn: adding 'dir4' to workspace manifest |
|
177 | mtn: adding 'dir4' to workspace manifest | |
178 | mtn: adding 'dir4/a' to workspace manifest |
|
178 | mtn: adding 'dir4/a' to workspace manifest | |
179 | mtn: adding 'dir5' to workspace manifest |
|
179 | mtn: adding 'dir5' to workspace manifest | |
180 | $ mtn ci -m dirdirmove |
|
180 | $ mtn ci -m dirdirmove | |
181 | mtn: beginning commit on branch 'com.selenic.test' |
|
181 | mtn: beginning commit on branch 'com.selenic.test' | |
182 | mtn: committed revision 466e0b2afc7a55aa2b4ab2f57cb240bb6cd66fc7 |
|
182 | mtn: committed revision 466e0b2afc7a55aa2b4ab2f57cb240bb6cd66fc7 | |
183 | $ mtn mv dir5 dir6 |
|
183 | $ mtn mv dir5 dir6 | |
184 | mtn: renaming 'dir5' to 'dir6' in workspace manifest |
|
184 | mtn: renaming 'dir5' to 'dir6' in workspace manifest | |
185 | $ mtn mv dir4 dir6/dir4 |
|
185 | $ mtn mv dir4 dir6/dir4 | |
186 | mtn: skipping 'dir6', already accounted for in workspace |
|
186 | mtn: skipping 'dir6', already accounted for in workspace | |
187 | mtn: renaming 'dir4' to 'dir6/dir4' in workspace manifest |
|
187 | mtn: renaming 'dir4' to 'dir6/dir4' in workspace manifest | |
188 | $ mtn ci -m dirdirmove2 |
|
188 | $ mtn ci -m dirdirmove2 | |
189 | mtn: beginning commit on branch 'com.selenic.test' |
|
189 | mtn: beginning commit on branch 'com.selenic.test' | |
190 | mtn: committed revision 3d1f77ebad0c23a5d14911be3b670f990991b749 |
|
190 | mtn: committed revision 3d1f77ebad0c23a5d14911be3b670f990991b749 | |
191 |
|
191 | |||
192 | test diverging directory moves |
|
192 | test diverging directory moves | |
193 |
|
193 | |||
194 | $ mkdir -p dir7/dir9/dir8 |
|
194 | $ mkdir -p dir7/dir9/dir8 | |
195 | $ echo a > dir7/dir9/dir8/a |
|
195 | $ echo a > dir7/dir9/dir8/a | |
196 | $ echo b > dir7/dir9/b |
|
196 | $ echo b > dir7/dir9/b | |
197 | $ echo c > dir7/c |
|
197 | $ echo c > dir7/c | |
198 | $ mtn add -R dir7 |
|
198 | $ mtn add -R dir7 | |
199 | mtn: adding 'dir7' to workspace manifest |
|
199 | mtn: adding 'dir7' to workspace manifest | |
200 | mtn: adding 'dir7/c' to workspace manifest |
|
200 | mtn: adding 'dir7/c' to workspace manifest | |
201 | mtn: adding 'dir7/dir9' to workspace manifest |
|
201 | mtn: adding 'dir7/dir9' to workspace manifest | |
202 | mtn: adding 'dir7/dir9/b' to workspace manifest |
|
202 | mtn: adding 'dir7/dir9/b' to workspace manifest | |
203 | mtn: adding 'dir7/dir9/dir8' to workspace manifest |
|
203 | mtn: adding 'dir7/dir9/dir8' to workspace manifest | |
204 | mtn: adding 'dir7/dir9/dir8/a' to workspace manifest |
|
204 | mtn: adding 'dir7/dir9/dir8/a' to workspace manifest | |
205 | $ mtn ci -m divergentdirmove |
|
205 | $ mtn ci -m divergentdirmove | |
206 | mtn: beginning commit on branch 'com.selenic.test' |
|
206 | mtn: beginning commit on branch 'com.selenic.test' | |
207 | mtn: committed revision 08a08511f18b428d840199b062de90d0396bc2ed |
|
207 | mtn: committed revision 08a08511f18b428d840199b062de90d0396bc2ed | |
208 | $ mtn mv dir7 dir7-2 |
|
208 | $ mtn mv dir7 dir7-2 | |
209 | mtn: renaming 'dir7' to 'dir7-2' in workspace manifest |
|
209 | mtn: renaming 'dir7' to 'dir7-2' in workspace manifest | |
210 | $ mtn mv dir7-2/dir9 dir9-2 |
|
210 | $ mtn mv dir7-2/dir9 dir9-2 | |
211 | mtn: renaming 'dir7-2/dir9' to 'dir9-2' in workspace manifest |
|
211 | mtn: renaming 'dir7-2/dir9' to 'dir9-2' in workspace manifest | |
212 | $ mtn mv dir9-2/dir8 dir8-2 |
|
212 | $ mtn mv dir9-2/dir8 dir8-2 | |
213 | mtn: renaming 'dir9-2/dir8' to 'dir8-2' in workspace manifest |
|
213 | mtn: renaming 'dir9-2/dir8' to 'dir8-2' in workspace manifest | |
214 | $ mtn ci -m divergentdirmove2 |
|
214 | $ mtn ci -m divergentdirmove2 | |
215 | mtn: beginning commit on branch 'com.selenic.test' |
|
215 | mtn: beginning commit on branch 'com.selenic.test' | |
216 | mtn: committed revision 4a736634505795f17786fffdf2c9cbf5b11df6f6 |
|
216 | mtn: committed revision 4a736634505795f17786fffdf2c9cbf5b11df6f6 | |
217 |
|
217 | |||
218 | test large file support (> 32kB) |
|
218 | test large file support (> 32kB) | |
219 |
|
219 | |||
220 | >>> fp = open('large-file', 'wb') |
|
220 | >>> fp = open('large-file', 'wb') | |
221 | >>> for x in range(10000): fp.write(b'%d\n' % x) |
|
221 | >>> for x in range(10000): fp.write(b'%d\n' % x) and None | |
222 | >>> fp.close() |
|
222 | >>> fp.close() | |
223 |
$ |
|
223 | $ md5sum.py large-file | |
224 | 5d6de8a95c3b6bf9e0ffb808ba5299c1 large-file |
|
224 | 5d6de8a95c3b6bf9e0ffb808ba5299c1 large-file | |
225 | $ mtn add large-file |
|
225 | $ mtn add large-file | |
226 | mtn: adding 'large-file' to workspace manifest |
|
226 | mtn: adding 'large-file' to workspace manifest | |
227 | $ mtn ci -m largefile |
|
227 | $ mtn ci -m largefile | |
228 | mtn: beginning commit on branch 'com.selenic.test' |
|
228 | mtn: beginning commit on branch 'com.selenic.test' | |
229 | mtn: committed revision f0a20fecd10dc4392d18fe69a03f1f4919d3387b |
|
229 | mtn: committed revision f0a20fecd10dc4392d18fe69a03f1f4919d3387b | |
230 |
|
230 | |||
231 | test suspending (closing a branch) |
|
231 | test suspending (closing a branch) | |
232 |
|
232 | |||
233 | $ mtn suspend f0a20fecd10dc4392d18fe69a03f1f4919d3387b 2> /dev/null |
|
233 | $ mtn suspend f0a20fecd10dc4392d18fe69a03f1f4919d3387b 2> /dev/null | |
234 | $ cd .. |
|
234 | $ cd .. | |
235 |
|
235 | |||
236 | convert incrementally |
|
236 | convert incrementally | |
237 |
|
237 | |||
238 | $ hg convert -s mtn repo.mtn |
|
238 | $ hg convert -s mtn repo.mtn | |
239 | assuming destination repo.mtn-hg |
|
239 | assuming destination repo.mtn-hg | |
240 | scanning source... |
|
240 | scanning source... | |
241 | sorting... |
|
241 | sorting... | |
242 | converting... |
|
242 | converting... | |
243 | 12 update2 "with" quotes |
|
243 | 12 update2 "with" quotes | |
244 | 11 createdir1 |
|
244 | 11 createdir1 | |
245 | 10 movedir1 |
|
245 | 10 movedir1 | |
246 | 9 movedir |
|
246 | 9 movedir | |
247 | 8 emptydir |
|
247 | 8 emptydir | |
248 | 7 dropdirectory |
|
248 | 7 dropdirectory | |
249 | 6 dirfilemove |
|
249 | 6 dirfilemove | |
250 | 5 dirfilemove2 |
|
250 | 5 dirfilemove2 | |
251 | 4 dirdirmove |
|
251 | 4 dirdirmove | |
252 | 3 dirdirmove2 |
|
252 | 3 dirdirmove2 | |
253 | 2 divergentdirmove |
|
253 | 2 divergentdirmove | |
254 | 1 divergentdirmove2 |
|
254 | 1 divergentdirmove2 | |
255 | 0 largefile |
|
255 | 0 largefile | |
256 | $ glog() |
|
256 | $ glog() | |
257 | > { |
|
257 | > { | |
258 | > hg log -G --template '{rev} "{desc|firstline}" files: {files}\n' "$@" |
|
258 | > hg log -G --template '{rev} "{desc|firstline}" files: {files}\n' "$@" | |
259 | > } |
|
259 | > } | |
260 | $ cd repo.mtn-hg |
|
260 | $ cd repo.mtn-hg | |
261 | $ hg up -C |
|
261 | $ hg up -C | |
262 | 12 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
262 | 12 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
263 | no open descendant heads on branch "com.selenic.test", updating to a closed head |
|
263 | no open descendant heads on branch "com.selenic.test", updating to a closed head | |
264 | (committing will reopen branch "com.selenic.test") |
|
264 | (committing will reopen branch "com.selenic.test") | |
265 | $ glog |
|
265 | $ glog | |
266 | @ 14 "largefile" files: large-file |
|
266 | @ 14 "largefile" files: large-file | |
267 | | |
|
267 | | | |
268 | o 13 "divergentdirmove2" files: dir7-2/c dir7/c dir7/dir9/b dir7/dir9/dir8/a dir8-2/a dir9-2/b |
|
268 | o 13 "divergentdirmove2" files: dir7-2/c dir7/c dir7/dir9/b dir7/dir9/dir8/a dir8-2/a dir9-2/b | |
269 | | |
|
269 | | | |
270 | o 12 "divergentdirmove" files: dir7/c dir7/dir9/b dir7/dir9/dir8/a |
|
270 | o 12 "divergentdirmove" files: dir7/c dir7/dir9/b dir7/dir9/dir8/a | |
271 | | |
|
271 | | | |
272 | o 11 "dirdirmove2" files: dir4/a dir6/dir4/a |
|
272 | o 11 "dirdirmove2" files: dir4/a dir6/dir4/a | |
273 | | |
|
273 | | | |
274 | o 10 "dirdirmove" files: dir4/a |
|
274 | o 10 "dirdirmove" files: dir4/a | |
275 | | |
|
275 | | | |
276 | o 9 "dirfilemove2" files: dir3/a dir3/d2/a |
|
276 | o 9 "dirfilemove2" files: dir3/a dir3/d2/a | |
277 | | |
|
277 | | | |
278 | o 8 "dirfilemove" files: dir3/a |
|
278 | o 8 "dirfilemove" files: dir3/a | |
279 | | |
|
279 | | | |
280 | o 7 "dropdirectory" files: dir2/dir/subdir/f |
|
280 | o 7 "dropdirectory" files: dir2/dir/subdir/f | |
281 | | |
|
281 | | | |
282 | o 6 "emptydir" files: dir2/dir/subdir/f |
|
282 | o 6 "emptydir" files: dir2/dir/subdir/f | |
283 | | |
|
283 | | | |
284 | o 5 "movedir" files: dir/a dir/d dir2/a dir2/newfile |
|
284 | o 5 "movedir" files: dir/a dir/d dir2/a dir2/newfile | |
285 | | |
|
285 | | | |
286 | o 4 "movedir1" files: dir1/subdir1/file1 dir1/subdir2/file1 |
|
286 | o 4 "movedir1" files: dir1/subdir1/file1 dir1/subdir2/file1 | |
287 | | |
|
287 | | | |
288 | o 3 "createdir1" files: dir1/subdir1/file1 dir1/subdir2_other/file1 |
|
288 | o 3 "createdir1" files: dir1/subdir1/file1 dir1/subdir2_other/file1 | |
289 | | |
|
289 | | | |
290 | o 2 "update2 "with" quotes" files: bin bin2 dir/b e |
|
290 | o 2 "update2 "with" quotes" files: bin bin2 dir/b e | |
291 | | |
|
291 | | | |
292 | o 1 "update1" files: a bin c dir/a dir/b |
|
292 | o 1 "update1" files: a bin c dir/a dir/b | |
293 | | |
|
293 | | | |
294 | o 0 "initialize" files: a bin c dir/b dir/d |
|
294 | o 0 "initialize" files: a bin c dir/b dir/d | |
295 |
|
295 | |||
296 |
|
296 | |||
297 | manifest |
|
297 | manifest | |
298 |
|
298 | |||
299 | $ hg manifest |
|
299 | $ hg manifest | |
300 | bin2 |
|
300 | bin2 | |
301 | dir1/subdir2/file1 |
|
301 | dir1/subdir2/file1 | |
302 | dir1/subdir2_other/file1 |
|
302 | dir1/subdir2_other/file1 | |
303 | dir2/a |
|
303 | dir2/a | |
304 | dir2/newfile |
|
304 | dir2/newfile | |
305 | dir3/d2/a |
|
305 | dir3/d2/a | |
306 | dir6/dir4/a |
|
306 | dir6/dir4/a | |
307 | dir7-2/c |
|
307 | dir7-2/c | |
308 | dir8-2/a |
|
308 | dir8-2/a | |
309 | dir9-2/b |
|
309 | dir9-2/b | |
310 | e |
|
310 | e | |
311 | large-file |
|
311 | large-file | |
312 |
|
312 | |||
313 | contents |
|
313 | contents | |
314 |
|
314 | |||
315 | $ cat dir2/a |
|
315 | $ cat dir2/a | |
316 | a |
|
316 | a | |
317 | a |
|
317 | a | |
318 | $ test -d dir2/dir && echo 'removed dir2/dir is still there!' |
|
318 | $ test -d dir2/dir && echo 'removed dir2/dir is still there!' | |
319 | [1] |
|
319 | [1] | |
320 |
|
320 | |||
321 | file move |
|
321 | file move | |
322 |
|
322 | |||
323 | $ hg log -v -C -r 1 | grep copies |
|
323 | $ hg log -v -C -r 1 | grep copies | |
324 | copies: dir/a (a) |
|
324 | copies: dir/a (a) | |
325 |
|
325 | |||
326 | check directory move |
|
326 | check directory move | |
327 |
|
327 | |||
328 | $ hg manifest -r 4 |
|
328 | $ hg manifest -r 4 | |
329 | bin2 |
|
329 | bin2 | |
330 | dir/a |
|
330 | dir/a | |
331 | dir/d |
|
331 | dir/d | |
332 | dir1/subdir2/file1 |
|
332 | dir1/subdir2/file1 | |
333 | dir1/subdir2_other/file1 |
|
333 | dir1/subdir2_other/file1 | |
334 | e |
|
334 | e | |
335 | $ test -d dir1/subdir2 || echo 'new dir1/subdir2 does not exist!' |
|
335 | $ test -d dir1/subdir2 || echo 'new dir1/subdir2 does not exist!' | |
336 | $ test -d dir1/subdir1 && echo 'renamed dir1/subdir1 is still there!' |
|
336 | $ test -d dir1/subdir1 && echo 'renamed dir1/subdir1 is still there!' | |
337 | [1] |
|
337 | [1] | |
338 | $ hg log -v -C -r 4 | grep copies |
|
338 | $ hg log -v -C -r 4 | grep copies | |
339 | copies: dir1/subdir2/file1 (dir1/subdir1/file1) |
|
339 | copies: dir1/subdir2/file1 (dir1/subdir1/file1) | |
340 |
|
340 | |||
341 | check file remove with directory move |
|
341 | check file remove with directory move | |
342 |
|
342 | |||
343 | $ hg manifest -r 5 |
|
343 | $ hg manifest -r 5 | |
344 | bin2 |
|
344 | bin2 | |
345 | dir1/subdir2/file1 |
|
345 | dir1/subdir2/file1 | |
346 | dir1/subdir2_other/file1 |
|
346 | dir1/subdir2_other/file1 | |
347 | dir2/a |
|
347 | dir2/a | |
348 | dir2/newfile |
|
348 | dir2/newfile | |
349 | e |
|
349 | e | |
350 |
|
350 | |||
351 | check file move with directory move |
|
351 | check file move with directory move | |
352 |
|
352 | |||
353 | $ hg manifest -r 9 |
|
353 | $ hg manifest -r 9 | |
354 | bin2 |
|
354 | bin2 | |
355 | dir1/subdir2/file1 |
|
355 | dir1/subdir2/file1 | |
356 | dir1/subdir2_other/file1 |
|
356 | dir1/subdir2_other/file1 | |
357 | dir2/a |
|
357 | dir2/a | |
358 | dir2/newfile |
|
358 | dir2/newfile | |
359 | dir3/d2/a |
|
359 | dir3/d2/a | |
360 | e |
|
360 | e | |
361 |
|
361 | |||
362 | check file directory directory move |
|
362 | check file directory directory move | |
363 |
|
363 | |||
364 | $ hg manifest -r 11 |
|
364 | $ hg manifest -r 11 | |
365 | bin2 |
|
365 | bin2 | |
366 | dir1/subdir2/file1 |
|
366 | dir1/subdir2/file1 | |
367 | dir1/subdir2_other/file1 |
|
367 | dir1/subdir2_other/file1 | |
368 | dir2/a |
|
368 | dir2/a | |
369 | dir2/newfile |
|
369 | dir2/newfile | |
370 | dir3/d2/a |
|
370 | dir3/d2/a | |
371 | dir6/dir4/a |
|
371 | dir6/dir4/a | |
372 | e |
|
372 | e | |
373 |
|
373 | |||
374 | check divergent directory moves |
|
374 | check divergent directory moves | |
375 |
|
375 | |||
376 | $ hg manifest -r 13 |
|
376 | $ hg manifest -r 13 | |
377 | bin2 |
|
377 | bin2 | |
378 | dir1/subdir2/file1 |
|
378 | dir1/subdir2/file1 | |
379 | dir1/subdir2_other/file1 |
|
379 | dir1/subdir2_other/file1 | |
380 | dir2/a |
|
380 | dir2/a | |
381 | dir2/newfile |
|
381 | dir2/newfile | |
382 | dir3/d2/a |
|
382 | dir3/d2/a | |
383 | dir6/dir4/a |
|
383 | dir6/dir4/a | |
384 | dir7-2/c |
|
384 | dir7-2/c | |
385 | dir8-2/a |
|
385 | dir8-2/a | |
386 | dir9-2/b |
|
386 | dir9-2/b | |
387 | e |
|
387 | e | |
388 |
|
388 | |||
389 | test large file support (> 32kB) |
|
389 | test large file support (> 32kB) | |
390 |
|
390 | |||
391 | $ md5sum.py large-file |
|
391 | $ md5sum.py large-file | |
392 | 5d6de8a95c3b6bf9e0ffb808ba5299c1 large-file |
|
392 | 5d6de8a95c3b6bf9e0ffb808ba5299c1 large-file | |
393 |
|
393 | |||
394 | check branch closing |
|
394 | check branch closing | |
395 |
|
395 | |||
396 | $ hg branches -a |
|
396 | $ hg branches -a | |
397 | $ hg branches -c |
|
397 | $ hg branches -c | |
398 | com.selenic.test 14:* (closed) (glob) |
|
398 | com.selenic.test 14:* (closed) (glob) | |
399 |
|
399 |
@@ -1,416 +1,416 b'' | |||||
1 | Setup |
|
1 | Setup | |
2 |
|
2 | |||
3 | $ cat <<EOF >> $HGRCPATH |
|
3 | $ cat <<EOF >> $HGRCPATH | |
4 | > [ui] |
|
4 | > [ui] | |
5 | > color = yes |
|
5 | > color = yes | |
6 | > formatted = always |
|
6 | > formatted = always | |
7 | > paginate = never |
|
7 | > paginate = never | |
8 | > [color] |
|
8 | > [color] | |
9 | > mode = ansi |
|
9 | > mode = ansi | |
10 | > EOF |
|
10 | > EOF | |
11 | $ hg init repo |
|
11 | $ hg init repo | |
12 | $ cd repo |
|
12 | $ cd repo | |
13 | $ cat > a <<EOF |
|
13 | $ cat > a <<EOF | |
14 | > c |
|
14 | > c | |
15 | > c |
|
15 | > c | |
16 | > a |
|
16 | > a | |
17 | > a |
|
17 | > a | |
18 | > b |
|
18 | > b | |
19 | > a |
|
19 | > a | |
20 | > a |
|
20 | > a | |
21 | > c |
|
21 | > c | |
22 | > c |
|
22 | > c | |
23 | > EOF |
|
23 | > EOF | |
24 | $ hg ci -Am adda |
|
24 | $ hg ci -Am adda | |
25 | \x1b[0;32madding a\x1b[0m (esc) |
|
25 | \x1b[0;32madding a\x1b[0m (esc) | |
26 | $ cat > a <<EOF |
|
26 | $ cat > a <<EOF | |
27 | > c |
|
27 | > c | |
28 | > c |
|
28 | > c | |
29 | > a |
|
29 | > a | |
30 | > a |
|
30 | > a | |
31 | > dd |
|
31 | > dd | |
32 | > a |
|
32 | > a | |
33 | > a |
|
33 | > a | |
34 | > c |
|
34 | > c | |
35 | > c |
|
35 | > c | |
36 | > EOF |
|
36 | > EOF | |
37 |
|
37 | |||
38 | default context |
|
38 | default context | |
39 |
|
39 | |||
40 | $ hg diff --nodates |
|
40 | $ hg diff --nodates | |
41 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) |
|
41 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) | |
42 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
42 | \x1b[0;31;1m--- a/a\x1b[0m (esc) | |
43 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
|
43 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) | |
44 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) |
|
44 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) | |
45 | c |
|
45 | c | |
46 | a |
|
46 | a | |
47 | a |
|
47 | a | |
48 | \x1b[0;31m-b\x1b[0m (esc) |
|
48 | \x1b[0;31m-b\x1b[0m (esc) | |
49 | \x1b[0;32m+dd\x1b[0m (esc) |
|
49 | \x1b[0;32m+dd\x1b[0m (esc) | |
50 | a |
|
50 | a | |
51 | a |
|
51 | a | |
52 | c |
|
52 | c | |
53 |
|
53 | |||
54 | trailing whitespace |
|
54 | trailing whitespace | |
55 |
|
55 | |||
56 | $ cp a a.orig |
|
56 | $ cp a a.orig | |
57 | >>> with open('a', 'rb') as f: |
|
57 | >>> with open('a', 'rb') as f: | |
58 | ... data = f.read() |
|
58 | ... data = f.read() | |
59 | >>> with open('a', 'wb') as f: |
|
59 | >>> with open('a', 'wb') as f: | |
60 | ... f.write(data.replace(b'dd', b'dd \r')) |
|
60 | ... f.write(data.replace(b'dd', b'dd \r')) and None | |
61 |
$ |
|
61 | $ hg diff --nodates | |
62 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) |
|
62 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) | |
63 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
63 | \x1b[0;31;1m--- a/a\x1b[0m (esc) | |
64 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
|
64 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) | |
65 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) |
|
65 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) | |
66 | c |
|
66 | c | |
67 | a |
|
67 | a | |
68 | a |
|
68 | a | |
69 | \x1b[0;31m-b\x1b[0m (esc) |
|
69 | \x1b[0;31m-b\x1b[0m (esc) | |
70 | \x1b[0;32m+dd\x1b[0m\x1b[0;1;41m \x1b[0m\r (esc) |
|
70 | \x1b[0;32m+dd\x1b[0m\x1b[0;1;41m \x1b[0m\r (esc) | |
71 | a |
|
71 | a | |
72 | a |
|
72 | a | |
73 | c |
|
73 | c | |
74 |
|
74 | |||
75 | $ mv a.orig a |
|
75 | $ mv a.orig a | |
76 |
|
76 | |||
77 | (check that 'ui.color=yes' match '--color=auto') |
|
77 | (check that 'ui.color=yes' match '--color=auto') | |
78 |
|
78 | |||
79 | $ hg diff --nodates --config ui.formatted=no |
|
79 | $ hg diff --nodates --config ui.formatted=no | |
80 | diff -r cf9f4ba66af2 a |
|
80 | diff -r cf9f4ba66af2 a | |
81 | --- a/a |
|
81 | --- a/a | |
82 | +++ b/a |
|
82 | +++ b/a | |
83 | @@ -2,7 +2,7 @@ |
|
83 | @@ -2,7 +2,7 @@ | |
84 | c |
|
84 | c | |
85 | a |
|
85 | a | |
86 | a |
|
86 | a | |
87 | -b |
|
87 | -b | |
88 | +dd |
|
88 | +dd | |
89 | a |
|
89 | a | |
90 | a |
|
90 | a | |
91 | c |
|
91 | c | |
92 |
|
92 | |||
93 | (check that 'ui.color=no' disable color) |
|
93 | (check that 'ui.color=no' disable color) | |
94 |
|
94 | |||
95 | $ hg diff --nodates --config ui.formatted=yes --config ui.color=no |
|
95 | $ hg diff --nodates --config ui.formatted=yes --config ui.color=no | |
96 | diff -r cf9f4ba66af2 a |
|
96 | diff -r cf9f4ba66af2 a | |
97 | --- a/a |
|
97 | --- a/a | |
98 | +++ b/a |
|
98 | +++ b/a | |
99 | @@ -2,7 +2,7 @@ |
|
99 | @@ -2,7 +2,7 @@ | |
100 | c |
|
100 | c | |
101 | a |
|
101 | a | |
102 | a |
|
102 | a | |
103 | -b |
|
103 | -b | |
104 | +dd |
|
104 | +dd | |
105 | a |
|
105 | a | |
106 | a |
|
106 | a | |
107 | c |
|
107 | c | |
108 |
|
108 | |||
109 | (check that 'ui.color=always' force color) |
|
109 | (check that 'ui.color=always' force color) | |
110 |
|
110 | |||
111 | $ hg diff --nodates --config ui.formatted=no --config ui.color=always |
|
111 | $ hg diff --nodates --config ui.formatted=no --config ui.color=always | |
112 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) |
|
112 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) | |
113 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
113 | \x1b[0;31;1m--- a/a\x1b[0m (esc) | |
114 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
|
114 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) | |
115 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) |
|
115 | \x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc) | |
116 | c |
|
116 | c | |
117 | a |
|
117 | a | |
118 | a |
|
118 | a | |
119 | \x1b[0;31m-b\x1b[0m (esc) |
|
119 | \x1b[0;31m-b\x1b[0m (esc) | |
120 | \x1b[0;32m+dd\x1b[0m (esc) |
|
120 | \x1b[0;32m+dd\x1b[0m (esc) | |
121 | a |
|
121 | a | |
122 | a |
|
122 | a | |
123 | c |
|
123 | c | |
124 |
|
124 | |||
125 | --unified=2 |
|
125 | --unified=2 | |
126 |
|
126 | |||
127 | $ hg diff --nodates -U 2 |
|
127 | $ hg diff --nodates -U 2 | |
128 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) |
|
128 | \x1b[0;1mdiff -r cf9f4ba66af2 a\x1b[0m (esc) | |
129 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
129 | \x1b[0;31;1m--- a/a\x1b[0m (esc) | |
130 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
|
130 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) | |
131 | \x1b[0;35m@@ -3,5 +3,5 @@\x1b[0m (esc) |
|
131 | \x1b[0;35m@@ -3,5 +3,5 @@\x1b[0m (esc) | |
132 | a |
|
132 | a | |
133 | a |
|
133 | a | |
134 | \x1b[0;31m-b\x1b[0m (esc) |
|
134 | \x1b[0;31m-b\x1b[0m (esc) | |
135 | \x1b[0;32m+dd\x1b[0m (esc) |
|
135 | \x1b[0;32m+dd\x1b[0m (esc) | |
136 | a |
|
136 | a | |
137 | a |
|
137 | a | |
138 |
|
138 | |||
139 | diffstat |
|
139 | diffstat | |
140 |
|
140 | |||
141 | $ hg diff --stat |
|
141 | $ hg diff --stat | |
142 | a | 2 \x1b[0;32m+\x1b[0m\x1b[0;31m-\x1b[0m (esc) |
|
142 | a | 2 \x1b[0;32m+\x1b[0m\x1b[0;31m-\x1b[0m (esc) | |
143 | 1 files changed, 1 insertions(+), 1 deletions(-) |
|
143 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
144 | $ cat <<EOF >> $HGRCPATH |
|
144 | $ cat <<EOF >> $HGRCPATH | |
145 | > [extensions] |
|
145 | > [extensions] | |
146 | > record = |
|
146 | > record = | |
147 | > [ui] |
|
147 | > [ui] | |
148 | > interactive = true |
|
148 | > interactive = true | |
149 | > [diff] |
|
149 | > [diff] | |
150 | > git = True |
|
150 | > git = True | |
151 | > EOF |
|
151 | > EOF | |
152 |
|
152 | |||
153 | #if execbit |
|
153 | #if execbit | |
154 |
|
154 | |||
155 | record |
|
155 | record | |
156 |
|
156 | |||
157 | $ chmod +x a |
|
157 | $ chmod +x a | |
158 | $ hg record -m moda a <<EOF |
|
158 | $ hg record -m moda a <<EOF | |
159 | > y |
|
159 | > y | |
160 | > y |
|
160 | > y | |
161 | > EOF |
|
161 | > EOF | |
162 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) |
|
162 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) | |
163 | \x1b[0;36;1mold mode 100644\x1b[0m (esc) |
|
163 | \x1b[0;36;1mold mode 100644\x1b[0m (esc) | |
164 | \x1b[0;36;1mnew mode 100755\x1b[0m (esc) |
|
164 | \x1b[0;36;1mnew mode 100755\x1b[0m (esc) | |
165 | 1 hunks, 1 lines changed |
|
165 | 1 hunks, 1 lines changed | |
166 | \x1b[0;33mexamine changes to 'a'? [Ynesfdaq?]\x1b[0m y (esc) |
|
166 | \x1b[0;33mexamine changes to 'a'? [Ynesfdaq?]\x1b[0m y (esc) | |
167 |
|
167 | |||
168 | \x1b[0;35m@@ -2,7 +2,7 @@ c\x1b[0m (esc) |
|
168 | \x1b[0;35m@@ -2,7 +2,7 @@ c\x1b[0m (esc) | |
169 | c |
|
169 | c | |
170 | a |
|
170 | a | |
171 | a |
|
171 | a | |
172 | \x1b[0;31m-b\x1b[0m (esc) |
|
172 | \x1b[0;31m-b\x1b[0m (esc) | |
173 | \x1b[0;32m+dd\x1b[0m (esc) |
|
173 | \x1b[0;32m+dd\x1b[0m (esc) | |
174 | a |
|
174 | a | |
175 | a |
|
175 | a | |
176 | c |
|
176 | c | |
177 | \x1b[0;33mrecord this change to 'a'? [Ynesfdaq?]\x1b[0m y (esc) |
|
177 | \x1b[0;33mrecord this change to 'a'? [Ynesfdaq?]\x1b[0m y (esc) | |
178 |
|
178 | |||
179 |
|
179 | |||
180 | $ echo "[extensions]" >> $HGRCPATH |
|
180 | $ echo "[extensions]" >> $HGRCPATH | |
181 | $ echo "mq=" >> $HGRCPATH |
|
181 | $ echo "mq=" >> $HGRCPATH | |
182 | $ hg rollback |
|
182 | $ hg rollback | |
183 | repository tip rolled back to revision 0 (undo commit) |
|
183 | repository tip rolled back to revision 0 (undo commit) | |
184 | working directory now based on revision 0 |
|
184 | working directory now based on revision 0 | |
185 |
|
185 | |||
186 | qrecord |
|
186 | qrecord | |
187 |
|
187 | |||
188 | $ hg qrecord -m moda patch <<EOF |
|
188 | $ hg qrecord -m moda patch <<EOF | |
189 | > y |
|
189 | > y | |
190 | > y |
|
190 | > y | |
191 | > EOF |
|
191 | > EOF | |
192 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) |
|
192 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) | |
193 | \x1b[0;36;1mold mode 100644\x1b[0m (esc) |
|
193 | \x1b[0;36;1mold mode 100644\x1b[0m (esc) | |
194 | \x1b[0;36;1mnew mode 100755\x1b[0m (esc) |
|
194 | \x1b[0;36;1mnew mode 100755\x1b[0m (esc) | |
195 | 1 hunks, 1 lines changed |
|
195 | 1 hunks, 1 lines changed | |
196 | \x1b[0;33mexamine changes to 'a'? [Ynesfdaq?]\x1b[0m y (esc) |
|
196 | \x1b[0;33mexamine changes to 'a'? [Ynesfdaq?]\x1b[0m y (esc) | |
197 |
|
197 | |||
198 | \x1b[0;35m@@ -2,7 +2,7 @@ c\x1b[0m (esc) |
|
198 | \x1b[0;35m@@ -2,7 +2,7 @@ c\x1b[0m (esc) | |
199 | c |
|
199 | c | |
200 | a |
|
200 | a | |
201 | a |
|
201 | a | |
202 | \x1b[0;31m-b\x1b[0m (esc) |
|
202 | \x1b[0;31m-b\x1b[0m (esc) | |
203 | \x1b[0;32m+dd\x1b[0m (esc) |
|
203 | \x1b[0;32m+dd\x1b[0m (esc) | |
204 | a |
|
204 | a | |
205 | a |
|
205 | a | |
206 | c |
|
206 | c | |
207 | \x1b[0;33mrecord this change to 'a'? [Ynesfdaq?]\x1b[0m y (esc) |
|
207 | \x1b[0;33mrecord this change to 'a'? [Ynesfdaq?]\x1b[0m y (esc) | |
208 |
|
208 | |||
209 |
|
209 | |||
210 | $ hg qpop -a |
|
210 | $ hg qpop -a | |
211 | popping patch |
|
211 | popping patch | |
212 | patch queue now empty |
|
212 | patch queue now empty | |
213 |
|
213 | |||
214 | #endif |
|
214 | #endif | |
215 |
|
215 | |||
216 | issue3712: test colorization of subrepo diff |
|
216 | issue3712: test colorization of subrepo diff | |
217 |
|
217 | |||
218 | $ hg init sub |
|
218 | $ hg init sub | |
219 | $ echo b > sub/b |
|
219 | $ echo b > sub/b | |
220 | $ hg -R sub commit -Am 'create sub' |
|
220 | $ hg -R sub commit -Am 'create sub' | |
221 | \x1b[0;32madding b\x1b[0m (esc) |
|
221 | \x1b[0;32madding b\x1b[0m (esc) | |
222 | $ echo 'sub = sub' > .hgsub |
|
222 | $ echo 'sub = sub' > .hgsub | |
223 | $ hg add .hgsub |
|
223 | $ hg add .hgsub | |
224 | $ hg commit -m 'add subrepo sub' |
|
224 | $ hg commit -m 'add subrepo sub' | |
225 | $ echo aa >> a |
|
225 | $ echo aa >> a | |
226 | $ echo bb >> sub/b |
|
226 | $ echo bb >> sub/b | |
227 |
|
227 | |||
228 | $ hg diff -S |
|
228 | $ hg diff -S | |
229 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) |
|
229 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) | |
230 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
230 | \x1b[0;31;1m--- a/a\x1b[0m (esc) | |
231 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
|
231 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) | |
232 | \x1b[0;35m@@ -7,3 +7,4 @@\x1b[0m (esc) |
|
232 | \x1b[0;35m@@ -7,3 +7,4 @@\x1b[0m (esc) | |
233 | a |
|
233 | a | |
234 | c |
|
234 | c | |
235 | c |
|
235 | c | |
236 | \x1b[0;32m+aa\x1b[0m (esc) |
|
236 | \x1b[0;32m+aa\x1b[0m (esc) | |
237 | \x1b[0;1mdiff --git a/sub/b b/sub/b\x1b[0m (esc) |
|
237 | \x1b[0;1mdiff --git a/sub/b b/sub/b\x1b[0m (esc) | |
238 | \x1b[0;31;1m--- a/sub/b\x1b[0m (esc) |
|
238 | \x1b[0;31;1m--- a/sub/b\x1b[0m (esc) | |
239 | \x1b[0;32;1m+++ b/sub/b\x1b[0m (esc) |
|
239 | \x1b[0;32;1m+++ b/sub/b\x1b[0m (esc) | |
240 | \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc) |
|
240 | \x1b[0;35m@@ -1,1 +1,2 @@\x1b[0m (esc) | |
241 | b |
|
241 | b | |
242 | \x1b[0;32m+bb\x1b[0m (esc) |
|
242 | \x1b[0;32m+bb\x1b[0m (esc) | |
243 |
|
243 | |||
244 | test tabs |
|
244 | test tabs | |
245 |
|
245 | |||
246 | $ cat >> a <<EOF |
|
246 | $ cat >> a <<EOF | |
247 | > one tab |
|
247 | > one tab | |
248 | > two tabs |
|
248 | > two tabs | |
249 | > end tab |
|
249 | > end tab | |
250 | > mid tab |
|
250 | > mid tab | |
251 | > all tabs |
|
251 | > all tabs | |
252 | > EOF |
|
252 | > EOF | |
253 | $ hg diff --nodates |
|
253 | $ hg diff --nodates | |
254 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) |
|
254 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) | |
255 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
255 | \x1b[0;31;1m--- a/a\x1b[0m (esc) | |
256 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
|
256 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) | |
257 | \x1b[0;35m@@ -7,3 +7,9 @@\x1b[0m (esc) |
|
257 | \x1b[0;35m@@ -7,3 +7,9 @@\x1b[0m (esc) | |
258 | a |
|
258 | a | |
259 | c |
|
259 | c | |
260 | c |
|
260 | c | |
261 | \x1b[0;32m+aa\x1b[0m (esc) |
|
261 | \x1b[0;32m+aa\x1b[0m (esc) | |
262 | \x1b[0;32m+\x1b[0m \x1b[0;32mone tab\x1b[0m (esc) |
|
262 | \x1b[0;32m+\x1b[0m \x1b[0;32mone tab\x1b[0m (esc) | |
263 | \x1b[0;32m+\x1b[0m \x1b[0;32mtwo tabs\x1b[0m (esc) |
|
263 | \x1b[0;32m+\x1b[0m \x1b[0;32mtwo tabs\x1b[0m (esc) | |
264 | \x1b[0;32m+end tab\x1b[0m\x1b[0;1;41m \x1b[0m (esc) |
|
264 | \x1b[0;32m+end tab\x1b[0m\x1b[0;1;41m \x1b[0m (esc) | |
265 | \x1b[0;32m+mid\x1b[0m \x1b[0;32mtab\x1b[0m (esc) |
|
265 | \x1b[0;32m+mid\x1b[0m \x1b[0;32mtab\x1b[0m (esc) | |
266 | \x1b[0;32m+\x1b[0m \x1b[0;32mall\x1b[0m \x1b[0;32mtabs\x1b[0m\x1b[0;1;41m \x1b[0m (esc) |
|
266 | \x1b[0;32m+\x1b[0m \x1b[0;32mall\x1b[0m \x1b[0;32mtabs\x1b[0m\x1b[0;1;41m \x1b[0m (esc) | |
267 | $ echo "[color]" >> $HGRCPATH |
|
267 | $ echo "[color]" >> $HGRCPATH | |
268 | $ echo "diff.tab = bold magenta" >> $HGRCPATH |
|
268 | $ echo "diff.tab = bold magenta" >> $HGRCPATH | |
269 | $ hg diff --nodates |
|
269 | $ hg diff --nodates | |
270 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) |
|
270 | \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) | |
271 | \x1b[0;31;1m--- a/a\x1b[0m (esc) |
|
271 | \x1b[0;31;1m--- a/a\x1b[0m (esc) | |
272 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) |
|
272 | \x1b[0;32;1m+++ b/a\x1b[0m (esc) | |
273 | \x1b[0;35m@@ -7,3 +7,9 @@\x1b[0m (esc) |
|
273 | \x1b[0;35m@@ -7,3 +7,9 @@\x1b[0m (esc) | |
274 | a |
|
274 | a | |
275 | c |
|
275 | c | |
276 | c |
|
276 | c | |
277 | \x1b[0;32m+aa\x1b[0m (esc) |
|
277 | \x1b[0;32m+aa\x1b[0m (esc) | |
278 | \x1b[0;32m+\x1b[0m\x1b[0;1;35m \x1b[0m\x1b[0;32mone tab\x1b[0m (esc) |
|
278 | \x1b[0;32m+\x1b[0m\x1b[0;1;35m \x1b[0m\x1b[0;32mone tab\x1b[0m (esc) | |
279 | \x1b[0;32m+\x1b[0m\x1b[0;1;35m \x1b[0m\x1b[0;32mtwo tabs\x1b[0m (esc) |
|
279 | \x1b[0;32m+\x1b[0m\x1b[0;1;35m \x1b[0m\x1b[0;32mtwo tabs\x1b[0m (esc) | |
280 | \x1b[0;32m+end tab\x1b[0m\x1b[0;1;41m \x1b[0m (esc) |
|
280 | \x1b[0;32m+end tab\x1b[0m\x1b[0;1;41m \x1b[0m (esc) | |
281 | \x1b[0;32m+mid\x1b[0m\x1b[0;1;35m \x1b[0m\x1b[0;32mtab\x1b[0m (esc) |
|
281 | \x1b[0;32m+mid\x1b[0m\x1b[0;1;35m \x1b[0m\x1b[0;32mtab\x1b[0m (esc) | |
282 | \x1b[0;32m+\x1b[0m\x1b[0;1;35m \x1b[0m\x1b[0;32mall\x1b[0m\x1b[0;1;35m \x1b[0m\x1b[0;32mtabs\x1b[0m\x1b[0;1;41m \x1b[0m (esc) |
|
282 | \x1b[0;32m+\x1b[0m\x1b[0;1;35m \x1b[0m\x1b[0;32mall\x1b[0m\x1b[0;1;35m \x1b[0m\x1b[0;32mtabs\x1b[0m\x1b[0;1;41m \x1b[0m (esc) | |
283 |
|
283 | |||
284 | $ cd .. |
|
284 | $ cd .. | |
285 |
|
285 | |||
286 | test inline color diff |
|
286 | test inline color diff | |
287 |
|
287 | |||
288 | $ hg init inline |
|
288 | $ hg init inline | |
289 | $ cd inline |
|
289 | $ cd inline | |
290 | $ cat > file1 << EOF |
|
290 | $ cat > file1 << EOF | |
291 | > this is the first line |
|
291 | > this is the first line | |
292 | > this is the second line |
|
292 | > this is the second line | |
293 | > third line starts with space |
|
293 | > third line starts with space | |
294 | > + starts with a plus sign |
|
294 | > + starts with a plus sign | |
295 | > this one with one tab |
|
295 | > this one with one tab | |
296 | > now with full two tabs |
|
296 | > now with full two tabs | |
297 | > now tabs everywhere, much fun |
|
297 | > now tabs everywhere, much fun | |
298 | > |
|
298 | > | |
299 | > this line won't change |
|
299 | > this line won't change | |
300 | > |
|
300 | > | |
301 | > two lines are going to |
|
301 | > two lines are going to | |
302 | > be changed into three! |
|
302 | > be changed into three! | |
303 | > |
|
303 | > | |
304 | > three of those lines will |
|
304 | > three of those lines will | |
305 | > collapse onto one |
|
305 | > collapse onto one | |
306 | > (to see if it works) |
|
306 | > (to see if it works) | |
307 | > EOF |
|
307 | > EOF | |
308 | $ hg add file1 |
|
308 | $ hg add file1 | |
309 | $ hg ci -m 'commit' |
|
309 | $ hg ci -m 'commit' | |
310 |
|
310 | |||
311 | $ cat > file1 << EOF |
|
311 | $ cat > file1 << EOF | |
312 | > that is the first paragraph |
|
312 | > that is the first paragraph | |
313 | > this is the second line |
|
313 | > this is the second line | |
314 | > third line starts with space |
|
314 | > third line starts with space | |
315 | > - starts with a minus sign |
|
315 | > - starts with a minus sign | |
316 | > this one with two tab |
|
316 | > this one with two tab | |
317 | > now with full three tabs |
|
317 | > now with full three tabs | |
318 | > now there are tabs everywhere, much fun |
|
318 | > now there are tabs everywhere, much fun | |
319 | > |
|
319 | > | |
320 | > this line won't change |
|
320 | > this line won't change | |
321 | > |
|
321 | > | |
322 | > two lines are going to |
|
322 | > two lines are going to | |
323 | > (entirely magically, |
|
323 | > (entirely magically, | |
324 | > assuming this works) |
|
324 | > assuming this works) | |
325 | > be changed into four! |
|
325 | > be changed into four! | |
326 | > |
|
326 | > | |
327 | > three of those lines have |
|
327 | > three of those lines have | |
328 | > collapsed onto one |
|
328 | > collapsed onto one | |
329 | > EOF |
|
329 | > EOF | |
330 | $ hg diff --config diff.word-diff=False --color=debug |
|
330 | $ hg diff --config diff.word-diff=False --color=debug | |
331 | [diff.diffline|diff --git a/file1 b/file1] |
|
331 | [diff.diffline|diff --git a/file1 b/file1] | |
332 | [diff.file_a|--- a/file1] |
|
332 | [diff.file_a|--- a/file1] | |
333 | [diff.file_b|+++ b/file1] |
|
333 | [diff.file_b|+++ b/file1] | |
334 | [diff.hunk|@@ -1,16 +1,17 @@] |
|
334 | [diff.hunk|@@ -1,16 +1,17 @@] | |
335 | [diff.deleted|-this is the first line] |
|
335 | [diff.deleted|-this is the first line] | |
336 | [diff.deleted|-this is the second line] |
|
336 | [diff.deleted|-this is the second line] | |
337 | [diff.deleted|- third line starts with space] |
|
337 | [diff.deleted|- third line starts with space] | |
338 | [diff.deleted|-+ starts with a plus sign] |
|
338 | [diff.deleted|-+ starts with a plus sign] | |
339 | [diff.deleted|-][diff.tab| ][diff.deleted|this one with one tab] |
|
339 | [diff.deleted|-][diff.tab| ][diff.deleted|this one with one tab] | |
340 | [diff.deleted|-][diff.tab| ][diff.deleted|now with full two tabs] |
|
340 | [diff.deleted|-][diff.tab| ][diff.deleted|now with full two tabs] | |
341 | [diff.deleted|-][diff.tab| ][diff.deleted|now tabs][diff.tab| ][diff.deleted|everywhere, much fun] |
|
341 | [diff.deleted|-][diff.tab| ][diff.deleted|now tabs][diff.tab| ][diff.deleted|everywhere, much fun] | |
342 | [diff.inserted|+that is the first paragraph] |
|
342 | [diff.inserted|+that is the first paragraph] | |
343 | [diff.inserted|+ this is the second line] |
|
343 | [diff.inserted|+ this is the second line] | |
344 | [diff.inserted|+third line starts with space] |
|
344 | [diff.inserted|+third line starts with space] | |
345 | [diff.inserted|+- starts with a minus sign] |
|
345 | [diff.inserted|+- starts with a minus sign] | |
346 | [diff.inserted|+][diff.tab| ][diff.inserted|this one with two tab] |
|
346 | [diff.inserted|+][diff.tab| ][diff.inserted|this one with two tab] | |
347 | [diff.inserted|+][diff.tab| ][diff.inserted|now with full three tabs] |
|
347 | [diff.inserted|+][diff.tab| ][diff.inserted|now with full three tabs] | |
348 | [diff.inserted|+][diff.tab| ][diff.inserted|now there are tabs][diff.tab| ][diff.inserted|everywhere, much fun] |
|
348 | [diff.inserted|+][diff.tab| ][diff.inserted|now there are tabs][diff.tab| ][diff.inserted|everywhere, much fun] | |
349 |
|
349 | |||
350 | this line won't change |
|
350 | this line won't change | |
351 |
|
351 | |||
352 | two lines are going to |
|
352 | two lines are going to | |
353 | [diff.deleted|-be changed into three!] |
|
353 | [diff.deleted|-be changed into three!] | |
354 | [diff.inserted|+(entirely magically,] |
|
354 | [diff.inserted|+(entirely magically,] | |
355 | [diff.inserted|+ assuming this works)] |
|
355 | [diff.inserted|+ assuming this works)] | |
356 | [diff.inserted|+be changed into four!] |
|
356 | [diff.inserted|+be changed into four!] | |
357 |
|
357 | |||
358 | [diff.deleted|-three of those lines will] |
|
358 | [diff.deleted|-three of those lines will] | |
359 | [diff.deleted|-collapse onto one] |
|
359 | [diff.deleted|-collapse onto one] | |
360 | [diff.deleted|-(to see if it works)] |
|
360 | [diff.deleted|-(to see if it works)] | |
361 | [diff.inserted|+three of those lines have] |
|
361 | [diff.inserted|+three of those lines have] | |
362 | [diff.inserted|+collapsed onto one] |
|
362 | [diff.inserted|+collapsed onto one] | |
363 | $ hg diff --config diff.word-diff=True --color=debug |
|
363 | $ hg diff --config diff.word-diff=True --color=debug | |
364 | [diff.diffline|diff --git a/file1 b/file1] |
|
364 | [diff.diffline|diff --git a/file1 b/file1] | |
365 | [diff.file_a|--- a/file1] |
|
365 | [diff.file_a|--- a/file1] | |
366 | [diff.file_b|+++ b/file1] |
|
366 | [diff.file_b|+++ b/file1] | |
367 | [diff.hunk|@@ -1,16 +1,17 @@] |
|
367 | [diff.hunk|@@ -1,16 +1,17 @@] | |
368 | [diff.deleted|-][diff.deleted.changed|this][diff.deleted.unchanged| is the first ][diff.deleted.changed|line] |
|
368 | [diff.deleted|-][diff.deleted.changed|this][diff.deleted.unchanged| is the first ][diff.deleted.changed|line] | |
369 | [diff.deleted|-][diff.deleted.unchanged|this is the second line] |
|
369 | [diff.deleted|-][diff.deleted.unchanged|this is the second line] | |
370 | [diff.deleted|-][diff.deleted.changed| ][diff.deleted.unchanged|third line starts with space] |
|
370 | [diff.deleted|-][diff.deleted.changed| ][diff.deleted.unchanged|third line starts with space] | |
371 | [diff.deleted|-][diff.deleted.changed|+][diff.deleted.unchanged| starts with a ][diff.deleted.changed|plus][diff.deleted.unchanged| sign] |
|
371 | [diff.deleted|-][diff.deleted.changed|+][diff.deleted.unchanged| starts with a ][diff.deleted.changed|plus][diff.deleted.unchanged| sign] | |
372 | [diff.deleted|-][diff.tab| ][diff.deleted.unchanged|this one with ][diff.deleted.changed|one][diff.deleted.unchanged| tab] |
|
372 | [diff.deleted|-][diff.tab| ][diff.deleted.unchanged|this one with ][diff.deleted.changed|one][diff.deleted.unchanged| tab] | |
373 | [diff.deleted|-][diff.tab| ][diff.deleted.unchanged|now with full ][diff.deleted.changed|two][diff.deleted.unchanged| tabs] |
|
373 | [diff.deleted|-][diff.tab| ][diff.deleted.unchanged|now with full ][diff.deleted.changed|two][diff.deleted.unchanged| tabs] | |
374 | [diff.deleted|-][diff.tab| ][diff.deleted.unchanged|now ][diff.deleted.unchanged|tabs][diff.tab| ][diff.deleted.unchanged|everywhere, much fun] |
|
374 | [diff.deleted|-][diff.tab| ][diff.deleted.unchanged|now ][diff.deleted.unchanged|tabs][diff.tab| ][diff.deleted.unchanged|everywhere, much fun] | |
375 | [diff.inserted|+][diff.inserted.changed|that][diff.inserted.unchanged| is the first ][diff.inserted.changed|paragraph] |
|
375 | [diff.inserted|+][diff.inserted.changed|that][diff.inserted.unchanged| is the first ][diff.inserted.changed|paragraph] | |
376 | [diff.inserted|+][diff.inserted.changed| ][diff.inserted.unchanged|this is the second line] |
|
376 | [diff.inserted|+][diff.inserted.changed| ][diff.inserted.unchanged|this is the second line] | |
377 | [diff.inserted|+][diff.inserted.unchanged|third line starts with space] |
|
377 | [diff.inserted|+][diff.inserted.unchanged|third line starts with space] | |
378 | [diff.inserted|+][diff.inserted.changed|-][diff.inserted.unchanged| starts with a ][diff.inserted.changed|minus][diff.inserted.unchanged| sign] |
|
378 | [diff.inserted|+][diff.inserted.changed|-][diff.inserted.unchanged| starts with a ][diff.inserted.changed|minus][diff.inserted.unchanged| sign] | |
379 | [diff.inserted|+][diff.tab| ][diff.inserted.unchanged|this one with ][diff.inserted.changed|two][diff.inserted.unchanged| tab] |
|
379 | [diff.inserted|+][diff.tab| ][diff.inserted.unchanged|this one with ][diff.inserted.changed|two][diff.inserted.unchanged| tab] | |
380 | [diff.inserted|+][diff.tab| ][diff.inserted.unchanged|now with full ][diff.inserted.changed|three][diff.inserted.unchanged| tabs] |
|
380 | [diff.inserted|+][diff.tab| ][diff.inserted.unchanged|now with full ][diff.inserted.changed|three][diff.inserted.unchanged| tabs] | |
381 | [diff.inserted|+][diff.tab| ][diff.inserted.unchanged|now ][diff.inserted.changed|there are ][diff.inserted.unchanged|tabs][diff.tab| ][diff.inserted.unchanged|everywhere, much fun] |
|
381 | [diff.inserted|+][diff.tab| ][diff.inserted.unchanged|now ][diff.inserted.changed|there are ][diff.inserted.unchanged|tabs][diff.tab| ][diff.inserted.unchanged|everywhere, much fun] | |
382 |
|
382 | |||
383 | this line won't change |
|
383 | this line won't change | |
384 |
|
384 | |||
385 | two lines are going to |
|
385 | two lines are going to | |
386 | [diff.deleted|-][diff.deleted.unchanged|be changed into ][diff.deleted.changed|three][diff.deleted.unchanged|!] |
|
386 | [diff.deleted|-][diff.deleted.unchanged|be changed into ][diff.deleted.changed|three][diff.deleted.unchanged|!] | |
387 | [diff.inserted|+][diff.inserted.changed|(entirely magically,] |
|
387 | [diff.inserted|+][diff.inserted.changed|(entirely magically,] | |
388 | [diff.inserted|+][diff.inserted.changed| assuming this works)] |
|
388 | [diff.inserted|+][diff.inserted.changed| assuming this works)] | |
389 | [diff.inserted|+][diff.inserted.unchanged|be changed into ][diff.inserted.changed|four][diff.inserted.unchanged|!] |
|
389 | [diff.inserted|+][diff.inserted.unchanged|be changed into ][diff.inserted.changed|four][diff.inserted.unchanged|!] | |
390 |
|
390 | |||
391 | [diff.deleted|-][diff.deleted.unchanged|three of those lines ][diff.deleted.changed|will] |
|
391 | [diff.deleted|-][diff.deleted.unchanged|three of those lines ][diff.deleted.changed|will] | |
392 | [diff.deleted|-][diff.deleted.changed|collapse][diff.deleted.unchanged| onto one] |
|
392 | [diff.deleted|-][diff.deleted.changed|collapse][diff.deleted.unchanged| onto one] | |
393 | [diff.deleted|-][diff.deleted.changed|(to see if it works)] |
|
393 | [diff.deleted|-][diff.deleted.changed|(to see if it works)] | |
394 | [diff.inserted|+][diff.inserted.unchanged|three of those lines ][diff.inserted.changed|have] |
|
394 | [diff.inserted|+][diff.inserted.unchanged|three of those lines ][diff.inserted.changed|have] | |
395 | [diff.inserted|+][diff.inserted.changed|collapsed][diff.inserted.unchanged| onto one] |
|
395 | [diff.inserted|+][diff.inserted.changed|collapsed][diff.inserted.unchanged| onto one] | |
396 |
|
396 | |||
397 | multibyte character shouldn't be broken up in word diff: |
|
397 | multibyte character shouldn't be broken up in word diff: | |
398 |
|
398 | |||
399 | $ $PYTHON <<'EOF' |
|
399 | $ $PYTHON <<'EOF' | |
400 | > with open("utf8", "wb") as f: |
|
400 | > with open("utf8", "wb") as f: | |
401 | > f.write(b"blah \xe3\x82\xa2 blah\n") |
|
401 | > f.write(b"blah \xe3\x82\xa2 blah\n") | |
402 | > EOF |
|
402 | > EOF | |
403 | $ hg ci -Am 'add utf8 char' utf8 |
|
403 | $ hg ci -Am 'add utf8 char' utf8 | |
404 | $ $PYTHON <<'EOF' |
|
404 | $ $PYTHON <<'EOF' | |
405 | > with open("utf8", "wb") as f: |
|
405 | > with open("utf8", "wb") as f: | |
406 | > f.write(b"blah \xe3\x82\xa4 blah\n") |
|
406 | > f.write(b"blah \xe3\x82\xa4 blah\n") | |
407 | > EOF |
|
407 | > EOF | |
408 | $ hg ci -m 'slightly change utf8 char' utf8 |
|
408 | $ hg ci -m 'slightly change utf8 char' utf8 | |
409 |
|
409 | |||
410 | $ hg diff --config diff.word-diff=True --color=debug -c. |
|
410 | $ hg diff --config diff.word-diff=True --color=debug -c. | |
411 | [diff.diffline|diff --git a/utf8 b/utf8] |
|
411 | [diff.diffline|diff --git a/utf8 b/utf8] | |
412 | [diff.file_a|--- a/utf8] |
|
412 | [diff.file_a|--- a/utf8] | |
413 | [diff.file_b|+++ b/utf8] |
|
413 | [diff.file_b|+++ b/utf8] | |
414 | [diff.hunk|@@ -1,1 +1,1 @@] |
|
414 | [diff.hunk|@@ -1,1 +1,1 @@] | |
415 | [diff.deleted|-][diff.deleted.unchanged|blah ][diff.deleted.changed|\xe3\x82\xa2][diff.deleted.unchanged| blah] (esc) |
|
415 | [diff.deleted|-][diff.deleted.unchanged|blah ][diff.deleted.changed|\xe3\x82\xa2][diff.deleted.unchanged| blah] (esc) | |
416 | [diff.inserted|+][diff.inserted.unchanged|blah ][diff.inserted.changed|\xe3\x82\xa4][diff.inserted.unchanged| blah] (esc) |
|
416 | [diff.inserted|+][diff.inserted.unchanged|blah ][diff.inserted.changed|\xe3\x82\xa4][diff.inserted.unchanged| blah] (esc) |
General Comments 0
You need to be logged in to leave comments.
Login now