# HG changeset patch # User Wagner Bruna # Date 1350825633 7200 # Node ID 71c1513fd5601f37dc8cdfb08c3943ae963e3607 # Parent 6da47b655d977aed78501b2cbc04cda11f240bcd scmutil: generalize message to make it more i18n-friendly diff -r 6da47b655d97 -r 71c1513fd560 mercurial/scmutil.py --- a/mercurial/scmutil.py Mon Oct 22 17:23:31 2012 -0500 +++ b/mercurial/scmutil.py Sun Oct 21 11:20:33 2012 -0200 @@ -32,8 +32,7 @@ raise util.Abort(_("the name '%s' is reserved") % lbl) for c in (':', '\0', '\n', '\r'): if c in lbl: - raise util.Abort(_("%r cannot be used in a %s name") % - (c, kind)) + raise util.Abort(_("%r cannot be used in a name") % c) def checkfilename(f): '''Check that the filename f is an acceptable filename for a tracked file''' diff -r 6da47b655d97 -r 71c1513fd560 tests/test-bookmarks.t --- a/tests/test-bookmarks.t Mon Oct 22 17:23:31 2012 -0500 +++ b/tests/test-bookmarks.t Sun Oct 21 11:20:33 2012 -0200 @@ -302,12 +302,12 @@ invalid bookmark $ hg bookmark 'foo:bar' - abort: ':' cannot be used in a bookmark name + abort: ':' cannot be used in a name [255] $ hg bookmark 'foo > bar' - abort: '\n' cannot be used in a bookmark name + abort: '\n' cannot be used in a name [255] the bookmark extension should be ignored now that it is part of core diff -r 6da47b655d97 -r 71c1513fd560 tests/test-branches.t --- a/tests/test-branches.t Mon Oct 22 17:23:31 2012 -0500 +++ b/tests/test-branches.t Sun Oct 21 11:20:33 2012 -0200 @@ -60,12 +60,12 @@ invalid characters $ hg branch 'foo:bar' - abort: ':' cannot be used in a branch name + abort: ':' cannot be used in a name [255] $ hg branch 'foo > bar' - abort: '\n' cannot be used in a branch name + abort: '\n' cannot be used in a name [255] $ echo 'd' >d diff -r 6da47b655d97 -r 71c1513fd560 tests/test-tag.t --- a/tests/test-tag.t Mon Oct 22 17:23:31 2012 -0500 +++ b/tests/test-tag.t Sun Oct 21 11:20:33 2012 -0200 @@ -116,10 +116,10 @@ $ hg tag -l 'xx > newline' - abort: '\n' cannot be used in a tag name + abort: '\n' cannot be used in a name [255] $ hg tag -l 'xx:xx' - abort: ':' cannot be used in a tag name + abort: ':' cannot be used in a name [255] cloning local tags