Mercurial > hg
changeset 25453:d3a00fc3680f
mq: use %r to format illegal characters instead of manually quoting
This will make it easier to ban \r and \n in the next patch and still
have a sensible error message.
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 05 Jun 2015 14:31:52 -0400 |
parents | 43906060a3f4 |
children | b5a8bc09b0db |
files | hgext/mq.py tests/test-mq-qnew.t |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Fri Jun 05 15:20:33 2015 -0400 +++ b/hgext/mq.py Fri Jun 05 14:31:52 2015 -0400 @@ -1104,7 +1104,7 @@ % prefix) for c in ('#', ':'): if c in name: - raise util.Abort(_('"%s" cannot be used in the name of a patch') + raise util.Abort(_('%r cannot be used in the name of a patch') % c) def checkpatchname(self, name, force=False):
--- a/tests/test-mq-qnew.t Fri Jun 05 15:20:33 2015 -0400 +++ b/tests/test-mq-qnew.t Fri Jun 05 14:31:52 2015 -0400 @@ -108,8 +108,8 @@ abort: ".." cannot be used as the name of a patch abort: patch name cannot begin with ".hg" abort: patch name cannot begin with ".mq" - abort: "#" cannot be used in the name of a patch - abort: ":" cannot be used in the name of a patch + abort: '#' cannot be used in the name of a patch + abort: ':' cannot be used in the name of a patch % qnew with name containing slash abort: path ends in directory separator: foo/ (glob) abort: "foo" already exists as a directory @@ -176,8 +176,8 @@ abort: ".." cannot be used as the name of a patch abort: patch name cannot begin with ".hg" abort: patch name cannot begin with ".mq" - abort: "#" cannot be used in the name of a patch - abort: ":" cannot be used in the name of a patch + abort: '#' cannot be used in the name of a patch + abort: ':' cannot be used in the name of a patch % qnew with name containing slash abort: path ends in directory separator: foo/ (glob) abort: "foo" already exists as a directory