Show More
@@ -311,7 +311,7 b' def checknewlabel(repo, lbl, kind):' | |||||
311 | def checkfilename(f): |
|
311 | def checkfilename(f): | |
312 | '''Check that the filename f is an acceptable filename for a tracked file''' |
|
312 | '''Check that the filename f is an acceptable filename for a tracked file''' | |
313 | if b'\r' in f or b'\n' in f: |
|
313 | if b'\r' in f or b'\n' in f: | |
314 |
raise error. |
|
314 | raise error.InputError( | |
315 | _(b"'\\n' and '\\r' disallowed in filenames: %r") |
|
315 | _(b"'\\n' and '\\r' disallowed in filenames: %r") | |
316 | % pycompat.bytestr(f) |
|
316 | % pycompat.bytestr(f) | |
317 | ) |
|
317 | ) | |
@@ -326,7 +326,7 b' def checkportable(ui, f):' | |||||
326 | if msg: |
|
326 | if msg: | |
327 | msg = b"%s: %s" % (msg, procutil.shellquote(f)) |
|
327 | msg = b"%s: %s" % (msg, procutil.shellquote(f)) | |
328 | if abort: |
|
328 | if abort: | |
329 |
raise error. |
|
329 | raise error.InputError(msg) | |
330 | ui.warn(_(b"warning: %s\n") % msg) |
|
330 | ui.warn(_(b"warning: %s\n") % msg) | |
331 |
|
331 | |||
332 |
|
332 |
@@ -48,7 +48,7 b' should fail' | |||||
48 | [30] |
|
48 | [30] | |
49 | $ hg --config ui.portablefilenames=abort add con.xml |
|
49 | $ hg --config ui.portablefilenames=abort add con.xml | |
50 | abort: filename contains 'con', which is reserved on Windows: con.xml |
|
50 | abort: filename contains 'con', which is reserved on Windows: con.xml | |
51 |
[ |
|
51 | [10] | |
52 | $ hg st |
|
52 | $ hg st | |
53 | A a |
|
53 | A a | |
54 | A b |
|
54 | A b | |
@@ -68,7 +68,7 b' should fail' | |||||
68 | $ hg --config ui.portablefilenames=abort add |
|
68 | $ hg --config ui.portablefilenames=abort add | |
69 | adding hello:world |
|
69 | adding hello:world | |
70 | abort: filename contains ':', which is reserved on Windows: 'hello:world' |
|
70 | abort: filename contains ':', which is reserved on Windows: 'hello:world' | |
71 |
[ |
|
71 | [10] | |
72 | $ hg st |
|
72 | $ hg st | |
73 | A a |
|
73 | A a | |
74 | A b |
|
74 | A b |
@@ -9,7 +9,7 b'' | |||||
9 | $ hg copy a b |
|
9 | $ hg copy a b | |
10 | $ hg --config ui.portablefilenames=abort copy a con.xml |
|
10 | $ hg --config ui.portablefilenames=abort copy a con.xml | |
11 | abort: filename contains 'con', which is reserved on Windows: con.xml |
|
11 | abort: filename contains 'con', which is reserved on Windows: con.xml | |
12 |
[ |
|
12 | [10] | |
13 | $ hg status |
|
13 | $ hg status | |
14 | A b |
|
14 | A b | |
15 | $ hg sum |
|
15 | $ hg sum |
@@ -12,12 +12,12 b' test issue352' | |||||
12 | adding he\r (no-eol) (esc) |
|
12 | adding he\r (no-eol) (esc) | |
13 | llo |
|
13 | llo | |
14 | abort: '\n' and '\r' disallowed in filenames: 'he\rllo' |
|
14 | abort: '\n' and '\r' disallowed in filenames: 'he\rllo' | |
15 |
[ |
|
15 | [10] | |
16 | $ hg ci -A -m m |
|
16 | $ hg ci -A -m m | |
17 | adding he\r (no-eol) (esc) |
|
17 | adding he\r (no-eol) (esc) | |
18 | llo |
|
18 | llo | |
19 | abort: '\n' and '\r' disallowed in filenames: 'he\rllo' |
|
19 | abort: '\n' and '\r' disallowed in filenames: 'he\rllo' | |
20 |
[ |
|
20 | [10] | |
21 | $ rm "$A" |
|
21 | $ rm "$A" | |
22 | $ echo foo > "hell |
|
22 | $ echo foo > "hell | |
23 | > o" |
|
23 | > o" | |
@@ -25,12 +25,12 b' test issue352' | |||||
25 | adding hell |
|
25 | adding hell | |
26 | o |
|
26 | o | |
27 | abort: '\n' and '\r' disallowed in filenames: 'hell\no' |
|
27 | abort: '\n' and '\r' disallowed in filenames: 'hell\no' | |
28 |
[ |
|
28 | [10] | |
29 | $ hg ci -A -m m |
|
29 | $ hg ci -A -m m | |
30 | adding hell |
|
30 | adding hell | |
31 | o |
|
31 | o | |
32 | abort: '\n' and '\r' disallowed in filenames: 'hell\no' |
|
32 | abort: '\n' and '\r' disallowed in filenames: 'hell\no' | |
33 |
[ |
|
33 | [10] | |
34 | $ echo foo > "$A" |
|
34 | $ echo foo > "$A" | |
35 | $ hg debugwalk -v |
|
35 | $ hg debugwalk -v | |
36 | * matcher: |
|
36 | * matcher: | |
@@ -48,10 +48,10 b' test issue352' | |||||
48 | $ A=`printf 'quick\rfox'` |
|
48 | $ A=`printf 'quick\rfox'` | |
49 | $ hg cp quickfox "$A" |
|
49 | $ hg cp quickfox "$A" | |
50 | abort: '\n' and '\r' disallowed in filenames: 'quick\rfox' |
|
50 | abort: '\n' and '\r' disallowed in filenames: 'quick\rfox' | |
51 |
[ |
|
51 | [10] | |
52 | $ hg mv quickfox "$A" |
|
52 | $ hg mv quickfox "$A" | |
53 | abort: '\n' and '\r' disallowed in filenames: 'quick\rfox' |
|
53 | abort: '\n' and '\r' disallowed in filenames: 'quick\rfox' | |
54 |
[ |
|
54 | [10] | |
55 |
|
55 | |||
56 | https://bz.mercurial-scm.org/2036 |
|
56 | https://bz.mercurial-scm.org/2036 | |
57 |
|
57 |
@@ -13,7 +13,7 b' rename a single file' | |||||
13 | $ hg rename d1/d11/a1 d2/c |
|
13 | $ hg rename d1/d11/a1 d2/c | |
14 | $ hg --config ui.portablefilenames=abort rename d1/a d1/con.xml |
|
14 | $ hg --config ui.portablefilenames=abort rename d1/a d1/con.xml | |
15 | abort: filename contains 'con', which is reserved on Windows: d1/con.xml |
|
15 | abort: filename contains 'con', which is reserved on Windows: d1/con.xml | |
16 |
[ |
|
16 | [10] | |
17 | $ hg sum |
|
17 | $ hg sum | |
18 | parent: 0:9b4b6e7b2c26 tip |
|
18 | parent: 0:9b4b6e7b2c26 tip | |
19 | 1 |
|
19 | 1 |
General Comments 0
You need to be logged in to leave comments.
Login now