scmutil: generalize message to make it more i18n-friendly stable
authorWagner Bruna <wbruna@yahoo.com>
Sun, 21 Oct 2012 11:20:33 -0200
branchstable
changeset 17850 71c1513fd560
parent 17849 6da47b655d97
child 17854 afbc7714c323
child 17883 a9a971671e12
scmutil: generalize message to make it more i18n-friendly
mercurial/scmutil.py
tests/test-bookmarks.t
tests/test-branches.t
tests/test-tag.t
--- 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'''
--- 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
--- 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
--- 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