D301: scmutil: use util.shellquote instead of %r
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Tue Aug 15 03:42:27 EDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2cd5aba5e1d2: scmutil: use util.shellquote instead of %r (authored by durin42).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D301?vs=684&id=923
REVISION DETAIL
https://phab.mercurial-scm.org/D301
AFFECTED FILES
mercurial/scmutil.py
tests/test-add.t
tests/test-copy.t
tests/test-rename.t
CHANGE DETAILS
diff --git a/tests/test-rename.t b/tests/test-rename.t
--- a/tests/test-rename.t
+++ b/tests/test-rename.t
@@ -12,7 +12,7 @@
$ hg rename d1/d11/a1 d2/c
$ hg --config ui.portablefilenames=abort rename d1/a d1/con.xml
- abort: filename contains 'con', which is reserved on Windows: 'd1/con.xml'
+ abort: filename contains 'con', which is reserved on Windows: d1/con.xml
[255]
$ hg sum
parent: 0:9b4b6e7b2c26 tip
diff --git a/tests/test-copy.t b/tests/test-copy.t
--- a/tests/test-copy.t
+++ b/tests/test-copy.t
@@ -15,7 +15,7 @@
$ hg status
$ hg copy a b
$ hg --config ui.portablefilenames=abort copy a con.xml
- abort: filename contains 'con', which is reserved on Windows: 'con.xml'
+ abort: filename contains 'con', which is reserved on Windows: con.xml
[255]
$ hg status
A b
diff --git a/tests/test-add.t b/tests/test-add.t
--- a/tests/test-add.t
+++ b/tests/test-add.t
@@ -44,14 +44,14 @@
abort: ui.portablefilenames value is invalid ('jump')
[255]
$ hg --config ui.portablefilenames=abort add con.xml
- abort: filename contains 'con', which is reserved on Windows: 'con.xml'
+ abort: filename contains 'con', which is reserved on Windows: con.xml
[255]
$ hg st
A a
A b
? con.xml
$ hg add con.xml
- warning: filename contains 'con', which is reserved on Windows: 'con.xml'
+ warning: filename contains 'con', which is reserved on Windows: con.xml
$ hg st
A a
A b
diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -273,7 +273,7 @@
if abort or warn:
msg = util.checkwinfilename(f)
if msg:
- msg = "%s: %r" % (msg, f)
+ msg = "%s: %s" % (msg, util.shellquote(f))
if abort:
raise error.Abort(msg)
ui.warn(_("warning: %s\n") % msg)
To: durin42, #hg-reviewers, quark, indygreg
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list