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