##// END OF EJS Templates
test-extdiff: fill in a missing Windows test
Matt Harbison -
r32208:bc2e2335 default
parent child Browse files
Show More
@@ -1,414 +1,415 b''
1 $ echo "[extensions]" >> $HGRCPATH
1 $ echo "[extensions]" >> $HGRCPATH
2 $ echo "extdiff=" >> $HGRCPATH
2 $ echo "extdiff=" >> $HGRCPATH
3
3
4 $ hg init a
4 $ hg init a
5 $ cd a
5 $ cd a
6 $ echo a > a
6 $ echo a > a
7 $ echo b > b
7 $ echo b > b
8 $ hg add
8 $ hg add
9 adding a
9 adding a
10 adding b
10 adding b
11
11
12 Should diff cloned directories:
12 Should diff cloned directories:
13
13
14 $ hg extdiff -o -r $opt
14 $ hg extdiff -o -r $opt
15 Only in a: a
15 Only in a: a
16 Only in a: b
16 Only in a: b
17 [1]
17 [1]
18
18
19 $ cat <<EOF >> $HGRCPATH
19 $ cat <<EOF >> $HGRCPATH
20 > [extdiff]
20 > [extdiff]
21 > cmd.falabala = echo
21 > cmd.falabala = echo
22 > opts.falabala = diffing
22 > opts.falabala = diffing
23 > cmd.edspace = echo
23 > cmd.edspace = echo
24 > opts.edspace = "name <user@example.com>"
24 > opts.edspace = "name <user@example.com>"
25 > EOF
25 > EOF
26
26
27 $ hg falabala
27 $ hg falabala
28 diffing a.000000000000 a
28 diffing a.000000000000 a
29 [1]
29 [1]
30
30
31 $ hg help falabala
31 $ hg help falabala
32 hg falabala [OPTION]... [FILE]...
32 hg falabala [OPTION]... [FILE]...
33
33
34 use external program to diff repository (or selected files)
34 use external program to diff repository (or selected files)
35
35
36 Show differences between revisions for the specified files, using the
36 Show differences between revisions for the specified files, using the
37 following program:
37 following program:
38
38
39 'echo'
39 'echo'
40
40
41 When two revision arguments are given, then changes are shown between
41 When two revision arguments are given, then changes are shown between
42 those revisions. If only one revision is specified then that revision is
42 those revisions. If only one revision is specified then that revision is
43 compared to the working directory, and, when no revisions are specified,
43 compared to the working directory, and, when no revisions are specified,
44 the working directory files are compared to its parent.
44 the working directory files are compared to its parent.
45
45
46 options ([+] can be repeated):
46 options ([+] can be repeated):
47
47
48 -o --option OPT [+] pass option to comparison program
48 -o --option OPT [+] pass option to comparison program
49 -r --rev REV [+] revision
49 -r --rev REV [+] revision
50 -c --change REV change made by revision
50 -c --change REV change made by revision
51 --patch compare patches for two revisions
51 --patch compare patches for two revisions
52 -I --include PATTERN [+] include names matching the given patterns
52 -I --include PATTERN [+] include names matching the given patterns
53 -X --exclude PATTERN [+] exclude names matching the given patterns
53 -X --exclude PATTERN [+] exclude names matching the given patterns
54 -S --subrepos recurse into subrepositories
54 -S --subrepos recurse into subrepositories
55
55
56 (some details hidden, use --verbose to show complete help)
56 (some details hidden, use --verbose to show complete help)
57
57
58 $ hg ci -d '0 0' -mtest1
58 $ hg ci -d '0 0' -mtest1
59
59
60 $ echo b >> a
60 $ echo b >> a
61 $ hg ci -d '1 0' -mtest2
61 $ hg ci -d '1 0' -mtest2
62
62
63 Should diff cloned files directly:
63 Should diff cloned files directly:
64
64
65 #if windows
65 #if windows
66 $ hg falabala -r 0:1
66 $ hg falabala -r 0:1
67 diffing "*\\extdiff.*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob)
67 diffing "*\\extdiff.*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob)
68 [1]
68 [1]
69 #else
69 #else
70 $ hg falabala -r 0:1
70 $ hg falabala -r 0:1
71 diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
71 diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
72 [1]
72 [1]
73 #endif
73 #endif
74
74
75 Specifying an empty revision should abort.
75 Specifying an empty revision should abort.
76
76
77 $ hg extdiff -p diff --patch --rev 'ancestor()' --rev 1
77 $ hg extdiff -p diff --patch --rev 'ancestor()' --rev 1
78 abort: empty revision on one side of range
78 abort: empty revision on one side of range
79 [255]
79 [255]
80
80
81 Test diff during merge:
81 Test diff during merge:
82
82
83 $ hg update -C 0
83 $ hg update -C 0
84 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
84 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
85 $ echo c >> c
85 $ echo c >> c
86 $ hg add c
86 $ hg add c
87 $ hg ci -m "new branch" -d '1 0'
87 $ hg ci -m "new branch" -d '1 0'
88 created new head
88 created new head
89 $ hg merge 1
89 $ hg merge 1
90 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
91 (branch merge, don't forget to commit)
91 (branch merge, don't forget to commit)
92
92
93 Should diff cloned file against wc file:
93 Should diff cloned file against wc file:
94
94
95 #if windows
95 #if windows
96 $ hg falabala
96 $ hg falabala
97 diffing "*\\extdiff.*\\a.2a13a4d2da36\\a" "*\\a\\a" (glob)
97 diffing "*\\extdiff.*\\a.2a13a4d2da36\\a" "*\\a\\a" (glob)
98 [1]
98 [1]
99 #else
99 #else
100 $ hg falabala
100 $ hg falabala
101 diffing */extdiff.*/a.2a13a4d2da36/a */a/a (glob)
101 diffing */extdiff.*/a.2a13a4d2da36/a */a/a (glob)
102 [1]
102 [1]
103 #endif
103 #endif
104
104
105
105
106 Test --change option:
106 Test --change option:
107
107
108 $ hg ci -d '2 0' -mtest3
108 $ hg ci -d '2 0' -mtest3
109 #if windows
109 #if windows
110 $ hg falabala -c 1
110 $ hg falabala -c 1
111 diffing "*\\extdiff.*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob)
111 diffing "*\\extdiff.*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob)
112 [1]
112 [1]
113 #else
113 #else
114 $ hg falabala -c 1
114 $ hg falabala -c 1
115 diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
115 diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
116 [1]
116 [1]
117 #endif
117 #endif
118
118
119 Check diff are made from the first parent:
119 Check diff are made from the first parent:
120
120
121 #if windows
121 #if windows
122 $ hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code"
122 $ hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code"
123 diffing "*\\extdiff.*\\a.2a13a4d2da36\\a" "a.46c0e4daeb72\\a" (glob)
123 diffing "*\\extdiff.*\\a.2a13a4d2da36\\a" "a.46c0e4daeb72\\a" (glob)
124 diff-like tools yield a non-zero exit code
124 diff-like tools yield a non-zero exit code
125 #else
125 #else
126 $ hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code"
126 $ hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code"
127 diffing */extdiff.*/a.2a13a4d2da36/a a.46c0e4daeb72/a (glob)
127 diffing */extdiff.*/a.2a13a4d2da36/a a.46c0e4daeb72/a (glob)
128 diff-like tools yield a non-zero exit code
128 diff-like tools yield a non-zero exit code
129 #endif
129 #endif
130
130
131 issue3153: ensure using extdiff with removed subrepos doesn't crash:
131 issue3153: ensure using extdiff with removed subrepos doesn't crash:
132
132
133 $ hg init suba
133 $ hg init suba
134 $ cd suba
134 $ cd suba
135 $ echo suba > suba
135 $ echo suba > suba
136 $ hg add
136 $ hg add
137 adding suba
137 adding suba
138 $ hg ci -m "adding suba file"
138 $ hg ci -m "adding suba file"
139 $ cd ..
139 $ cd ..
140 $ echo suba=suba > .hgsub
140 $ echo suba=suba > .hgsub
141 $ hg add
141 $ hg add
142 adding .hgsub
142 adding .hgsub
143 $ hg ci -Sm "adding subrepo"
143 $ hg ci -Sm "adding subrepo"
144 $ echo > .hgsub
144 $ echo > .hgsub
145 $ hg ci -m "removing subrepo"
145 $ hg ci -m "removing subrepo"
146 $ hg falabala -r 4 -r 5 -S
146 $ hg falabala -r 4 -r 5 -S
147 diffing a.398e36faf9c6 a.5ab95fb166c4
147 diffing a.398e36faf9c6 a.5ab95fb166c4
148 [1]
148 [1]
149
149
150 issue4463: usage of command line configuration without additional quoting
150 issue4463: usage of command line configuration without additional quoting
151
151
152 $ cat <<EOF >> $HGRCPATH
152 $ cat <<EOF >> $HGRCPATH
153 > [extdiff]
153 > [extdiff]
154 > cmd.4463a = echo
154 > cmd.4463a = echo
155 > opts.4463a = a-naked 'single quoted' "double quoted"
155 > opts.4463a = a-naked 'single quoted' "double quoted"
156 > 4463b = echo b-naked 'single quoted' "double quoted"
156 > 4463b = echo b-naked 'single quoted' "double quoted"
157 > echo =
157 > echo =
158 > EOF
158 > EOF
159 $ hg update -q -C 0
159 $ hg update -q -C 0
160 $ echo a >> a
160 $ echo a >> a
161 #if windows
161 #if windows
162 $ hg --debug 4463a | grep '^running'
162 $ hg --debug 4463a | grep '^running'
163 running 'echo a-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
163 running 'echo a-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
164 $ hg --debug 4463b | grep '^running'
164 $ hg --debug 4463b | grep '^running'
165 running 'echo b-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
165 running 'echo b-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
166 $ hg --debug echo | grep '^running'
166 $ hg --debug echo | grep '^running'
167 running '*echo* "*\\a" "*\\a"' in */extdiff.* (glob)
167 running '*echo* "*\\a" "*\\a"' in */extdiff.* (glob)
168 #else
168 #else
169 $ hg --debug 4463a | grep '^running'
169 $ hg --debug 4463a | grep '^running'
170 running 'echo a-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob)
170 running 'echo a-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob)
171 $ hg --debug 4463b | grep '^running'
171 $ hg --debug 4463b | grep '^running'
172 running 'echo b-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob)
172 running 'echo b-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob)
173 $ hg --debug echo | grep '^running'
173 $ hg --debug echo | grep '^running'
174 running '*echo */a $TESTTMP/a/a' in */extdiff.* (glob)
174 running '*echo */a $TESTTMP/a/a' in */extdiff.* (glob)
175 #endif
175 #endif
176
176
177 (getting options from other than extdiff section)
177 (getting options from other than extdiff section)
178
178
179 $ cat <<EOF >> $HGRCPATH
179 $ cat <<EOF >> $HGRCPATH
180 > [extdiff]
180 > [extdiff]
181 > # using diff-tools diffargs
181 > # using diff-tools diffargs
182 > 4463b2 = echo
182 > 4463b2 = echo
183 > # using merge-tools diffargs
183 > # using merge-tools diffargs
184 > 4463b3 = echo
184 > 4463b3 = echo
185 > # no diffargs
185 > # no diffargs
186 > 4463b4 = echo
186 > 4463b4 = echo
187 > [diff-tools]
187 > [diff-tools]
188 > 4463b2.diffargs = b2-naked 'single quoted' "double quoted"
188 > 4463b2.diffargs = b2-naked 'single quoted' "double quoted"
189 > [merge-tools]
189 > [merge-tools]
190 > 4463b3.diffargs = b3-naked 'single quoted' "double quoted"
190 > 4463b3.diffargs = b3-naked 'single quoted' "double quoted"
191 > EOF
191 > EOF
192 #if windows
192 #if windows
193 $ hg --debug 4463b2 | grep '^running'
193 $ hg --debug 4463b2 | grep '^running'
194 running 'echo b2-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
194 running 'echo b2-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
195 $ hg --debug 4463b3 | grep '^running'
195 $ hg --debug 4463b3 | grep '^running'
196 running 'echo b3-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
196 running 'echo b3-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
197 $ hg --debug 4463b4 | grep '^running'
197 $ hg --debug 4463b4 | grep '^running'
198 running 'echo "*\\a" "*\\a"' in */extdiff.* (glob)
198 running 'echo "*\\a" "*\\a"' in */extdiff.* (glob)
199 $ hg --debug 4463b4 --option b4-naked --option 'being quoted' | grep '^running'
199 $ hg --debug 4463b4 --option b4-naked --option 'being quoted' | grep '^running'
200 running 'echo b4-naked "being quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
200 running 'echo b4-naked "being quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
201 $ hg --debug extdiff -p echo --option echo-naked --option 'being quoted' | grep '^running'
201 $ hg --debug extdiff -p echo --option echo-naked --option 'being quoted' | grep '^running'
202 running 'echo echo-naked "being quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
202 running 'echo echo-naked "being quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
203 #else
203 #else
204 $ hg --debug 4463b2 | grep '^running'
204 $ hg --debug 4463b2 | grep '^running'
205 running 'echo b2-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob)
205 running 'echo b2-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob)
206 $ hg --debug 4463b3 | grep '^running'
206 $ hg --debug 4463b3 | grep '^running'
207 running 'echo b3-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob)
207 running 'echo b3-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob)
208 $ hg --debug 4463b4 | grep '^running'
208 $ hg --debug 4463b4 | grep '^running'
209 running 'echo */a $TESTTMP/a/a' in */extdiff.* (glob)
209 running 'echo */a $TESTTMP/a/a' in */extdiff.* (glob)
210 $ hg --debug 4463b4 --option b4-naked --option 'being quoted' | grep '^running'
210 $ hg --debug 4463b4 --option b4-naked --option 'being quoted' | grep '^running'
211 running "echo b4-naked 'being quoted' */a $TESTTMP/a/a" in */extdiff.* (glob)
211 running "echo b4-naked 'being quoted' */a $TESTTMP/a/a" in */extdiff.* (glob)
212 $ hg --debug extdiff -p echo --option echo-naked --option 'being quoted' | grep '^running'
212 $ hg --debug extdiff -p echo --option echo-naked --option 'being quoted' | grep '^running'
213 running "echo echo-naked 'being quoted' */a $TESTTMP/a/a" in */extdiff.* (glob)
213 running "echo echo-naked 'being quoted' */a $TESTTMP/a/a" in */extdiff.* (glob)
214 #endif
214 #endif
215
215
216 $ touch 'sp ace'
216 $ touch 'sp ace'
217 $ hg add 'sp ace'
217 $ hg add 'sp ace'
218 $ hg ci -m 'sp ace'
218 $ hg ci -m 'sp ace'
219 created new head
219 created new head
220 $ echo > 'sp ace'
220 $ echo > 'sp ace'
221
221
222 Test pre-72a89cf86fcd backward compatibility with half-baked manual quoting
222 Test pre-72a89cf86fcd backward compatibility with half-baked manual quoting
223
223
224 $ cat <<EOF >> $HGRCPATH
224 $ cat <<EOF >> $HGRCPATH
225 > [extdiff]
225 > [extdiff]
226 > odd =
226 > odd =
227 > [merge-tools]
227 > [merge-tools]
228 > odd.diffargs = --foo='\$clabel' '\$clabel' "--bar=\$clabel" "\$clabel"
228 > odd.diffargs = --foo='\$clabel' '\$clabel' "--bar=\$clabel" "\$clabel"
229 > odd.executable = echo
229 > odd.executable = echo
230 > EOF
230 > EOF
231 #if windows
231 #if windows
232 TODO
232 $ hg --debug odd | grep '^running'
233 running '"*\\echo.exe" --foo="sp ace" "sp ace" --bar="sp ace" "sp ace"' in * (glob)
233 #else
234 #else
234 $ hg --debug odd | grep '^running'
235 $ hg --debug odd | grep '^running'
235 running "*/echo --foo='sp ace' 'sp ace' --bar='sp ace' 'sp ace'" in * (glob)
236 running "*/echo --foo='sp ace' 'sp ace' --bar='sp ace' 'sp ace'" in * (glob)
236 #endif
237 #endif
237
238
238 Empty argument must be quoted
239 Empty argument must be quoted
239
240
240 $ cat <<EOF >> $HGRCPATH
241 $ cat <<EOF >> $HGRCPATH
241 > [extdiff]
242 > [extdiff]
242 > kdiff3 = echo
243 > kdiff3 = echo
243 > [merge-tools]
244 > [merge-tools]
244 > kdiff3.diffargs=--L1 \$plabel1 --L2 \$clabel \$parent \$child
245 > kdiff3.diffargs=--L1 \$plabel1 --L2 \$clabel \$parent \$child
245 > EOF
246 > EOF
246 #if windows
247 #if windows
247 $ hg --debug kdiff3 -r0 | grep '^running'
248 $ hg --debug kdiff3 -r0 | grep '^running'
248 running 'echo --L1 "@0" --L2 "" a.8a5febb7f867 a' in * (glob)
249 running 'echo --L1 "@0" --L2 "" a.8a5febb7f867 a' in * (glob)
249 #else
250 #else
250 $ hg --debug kdiff3 -r0 | grep '^running'
251 $ hg --debug kdiff3 -r0 | grep '^running'
251 running "echo --L1 '@0' --L2 '' a.8a5febb7f867 a" in * (glob)
252 running "echo --L1 '@0' --L2 '' a.8a5febb7f867 a" in * (glob)
252 #endif
253 #endif
253
254
254 #if execbit
255 #if execbit
255
256
256 Test extdiff of multiple files in tmp dir:
257 Test extdiff of multiple files in tmp dir:
257
258
258 $ hg update -C 0 > /dev/null
259 $ hg update -C 0 > /dev/null
259 $ echo changed > a
260 $ echo changed > a
260 $ echo changed > b
261 $ echo changed > b
261 $ chmod +x b
262 $ chmod +x b
262
263
263 Diff in working directory, before:
264 Diff in working directory, before:
264
265
265 $ hg diff --git
266 $ hg diff --git
266 diff --git a/a b/a
267 diff --git a/a b/a
267 --- a/a
268 --- a/a
268 +++ b/a
269 +++ b/a
269 @@ -1,1 +1,1 @@
270 @@ -1,1 +1,1 @@
270 -a
271 -a
271 +changed
272 +changed
272 diff --git a/b b/b
273 diff --git a/b b/b
273 old mode 100644
274 old mode 100644
274 new mode 100755
275 new mode 100755
275 --- a/b
276 --- a/b
276 +++ b/b
277 +++ b/b
277 @@ -1,1 +1,1 @@
278 @@ -1,1 +1,1 @@
278 -b
279 -b
279 +changed
280 +changed
280
281
281
282
282 Edit with extdiff -p:
283 Edit with extdiff -p:
283
284
284 Prepare custom diff/edit tool:
285 Prepare custom diff/edit tool:
285
286
286 $ cat > 'diff tool.py' << EOT
287 $ cat > 'diff tool.py' << EOT
287 > #!/usr/bin/env python
288 > #!/usr/bin/env python
288 > import time
289 > import time
289 > time.sleep(1) # avoid unchanged-timestamp problems
290 > time.sleep(1) # avoid unchanged-timestamp problems
290 > file('a/a', 'ab').write('edited\n')
291 > file('a/a', 'ab').write('edited\n')
291 > file('a/b', 'ab').write('edited\n')
292 > file('a/b', 'ab').write('edited\n')
292 > EOT
293 > EOT
293
294
294 $ chmod +x 'diff tool.py'
295 $ chmod +x 'diff tool.py'
295
296
296 will change to /tmp/extdiff.TMP and populate directories a.TMP and a
297 will change to /tmp/extdiff.TMP and populate directories a.TMP and a
297 and start tool
298 and start tool
298
299
299 $ hg extdiff -p "`pwd`/diff tool.py"
300 $ hg extdiff -p "`pwd`/diff tool.py"
300 [1]
301 [1]
301
302
302 Diff in working directory, after:
303 Diff in working directory, after:
303
304
304 $ hg diff --git
305 $ hg diff --git
305 diff --git a/a b/a
306 diff --git a/a b/a
306 --- a/a
307 --- a/a
307 +++ b/a
308 +++ b/a
308 @@ -1,1 +1,2 @@
309 @@ -1,1 +1,2 @@
309 -a
310 -a
310 +changed
311 +changed
311 +edited
312 +edited
312 diff --git a/b b/b
313 diff --git a/b b/b
313 old mode 100644
314 old mode 100644
314 new mode 100755
315 new mode 100755
315 --- a/b
316 --- a/b
316 +++ b/b
317 +++ b/b
317 @@ -1,1 +1,2 @@
318 @@ -1,1 +1,2 @@
318 -b
319 -b
319 +changed
320 +changed
320 +edited
321 +edited
321
322
322 Test extdiff with --option:
323 Test extdiff with --option:
323
324
324 $ hg extdiff -p echo -o this -c 1
325 $ hg extdiff -p echo -o this -c 1
325 this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
326 this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
326 [1]
327 [1]
327
328
328 $ hg falabala -o this -c 1
329 $ hg falabala -o this -c 1
329 diffing this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
330 diffing this */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
330 [1]
331 [1]
331
332
332 Test extdiff's handling of options with spaces in them:
333 Test extdiff's handling of options with spaces in them:
333
334
334 $ hg edspace -c 1
335 $ hg edspace -c 1
335 name <user@example.com> */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
336 name <user@example.com> */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
336 [1]
337 [1]
337
338
338 $ hg extdiff -p echo -o "name <user@example.com>" -c 1
339 $ hg extdiff -p echo -o "name <user@example.com>" -c 1
339 name <user@example.com> */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
340 name <user@example.com> */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
340 [1]
341 [1]
341
342
342 Test with revsets:
343 Test with revsets:
343
344
344 $ hg extdif -p echo -c "rev(1)"
345 $ hg extdif -p echo -c "rev(1)"
345 */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
346 */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
346 [1]
347 [1]
347
348
348 $ hg extdif -p echo -r "0::1"
349 $ hg extdif -p echo -r "0::1"
349 */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
350 */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
350 [1]
351 [1]
351
352
352 Fallback to merge-tools.tool.executable|regkey
353 Fallback to merge-tools.tool.executable|regkey
353 $ mkdir dir
354 $ mkdir dir
354 $ cat > 'dir/tool.sh' << EOF
355 $ cat > 'dir/tool.sh' << EOF
355 > #!/bin/sh
356 > #!/bin/sh
356 > echo "** custom diff **"
357 > echo "** custom diff **"
357 > EOF
358 > EOF
358 $ chmod +x dir/tool.sh
359 $ chmod +x dir/tool.sh
359 $ tool=`pwd`/dir/tool.sh
360 $ tool=`pwd`/dir/tool.sh
360 $ hg --debug tl --config extdiff.tl= --config merge-tools.tl.executable=$tool
361 $ hg --debug tl --config extdiff.tl= --config merge-tools.tl.executable=$tool
361 making snapshot of 2 files from rev * (glob)
362 making snapshot of 2 files from rev * (glob)
362 a
363 a
363 b
364 b
364 making snapshot of 2 files from working directory
365 making snapshot of 2 files from working directory
365 a
366 a
366 b
367 b
367 running '$TESTTMP/a/dir/tool.sh a.* a' in */extdiff.* (glob)
368 running '$TESTTMP/a/dir/tool.sh a.* a' in */extdiff.* (glob)
368 ** custom diff **
369 ** custom diff **
369 cleaning up temp directory
370 cleaning up temp directory
370 [1]
371 [1]
371
372
372 $ cd ..
373 $ cd ..
373
374
374 #endif
375 #endif
375
376
376 #if symlink
377 #if symlink
377
378
378 Test symlinks handling (issue1909)
379 Test symlinks handling (issue1909)
379
380
380 $ hg init testsymlinks
381 $ hg init testsymlinks
381 $ cd testsymlinks
382 $ cd testsymlinks
382 $ echo a > a
383 $ echo a > a
383 $ hg ci -Am adda
384 $ hg ci -Am adda
384 adding a
385 adding a
385 $ echo a >> a
386 $ echo a >> a
386 $ ln -s missing linka
387 $ ln -s missing linka
387 $ hg add linka
388 $ hg add linka
388 $ hg falabala -r 0 --traceback
389 $ hg falabala -r 0 --traceback
389 diffing testsymlinks.07f494440405 testsymlinks
390 diffing testsymlinks.07f494440405 testsymlinks
390 [1]
391 [1]
391 $ cd ..
392 $ cd ..
392
393
393 #endif
394 #endif
394
395
395 Test handling of non-ASCII paths in generated docstrings (issue5301)
396 Test handling of non-ASCII paths in generated docstrings (issue5301)
396
397
397 >>> open("u", "w").write("\xa5\xa5")
398 >>> open("u", "w").write("\xa5\xa5")
398 $ U=`cat u`
399 $ U=`cat u`
399
400
400 $ HGPLAIN=1 hg --config hgext.extdiff= --config extdiff.cmd.td=hi help -k xyzzy
401 $ HGPLAIN=1 hg --config hgext.extdiff= --config extdiff.cmd.td=hi help -k xyzzy
401 abort: no matches
402 abort: no matches
402 (try 'hg help' for a list of topics)
403 (try 'hg help' for a list of topics)
403 [255]
404 [255]
404
405
405 $ HGPLAIN=1 hg --config hgext.extdiff= --config extdiff.cmd.td=hi help td > /dev/null
406 $ HGPLAIN=1 hg --config hgext.extdiff= --config extdiff.cmd.td=hi help td > /dev/null
406
407
407 $ LC_MESSAGES=ja_JP.UTF-8 hg --config hgext.extdiff= --config extdiff.cmd.td=$U help -k xyzzy
408 $ LC_MESSAGES=ja_JP.UTF-8 hg --config hgext.extdiff= --config extdiff.cmd.td=$U help -k xyzzy
408 abort: no matches
409 abort: no matches
409 (try 'hg help' for a list of topics)
410 (try 'hg help' for a list of topics)
410 [255]
411 [255]
411
412
412 $ LC_MESSAGES=ja_JP.UTF-8 hg --config hgext.extdiff= --config extdiff.cmd.td=$U help td \
413 $ LC_MESSAGES=ja_JP.UTF-8 hg --config hgext.extdiff= --config extdiff.cmd.td=$U help td \
413 > | grep "^ '"
414 > | grep "^ '"
414 '\xa5\xa5'
415 '\xa5\xa5'
General Comments 0
You need to be logged in to leave comments. Login now