commands, i18n: avoid untranslated strings as message parameters
authorWagner Bruna <wbruna@yahoo.com>
Sun, 05 Apr 2009 05:11:46 -0300
changeset 8008 36924a4711e9
parent 8007 a4defdc4f5dc
child 8009 76e4c08a48ad
commands, i18n: avoid untranslated strings as message parameters
mercurial/commands.py
--- a/mercurial/commands.py	Sat Apr 04 20:16:01 2009 +0200
+++ b/mercurial/commands.py	Sun Apr 05 05:11:46 2009 -0300
@@ -2829,8 +2829,10 @@
             if not repo.tagtype(n):
                 raise util.Abort(_('tag \'%s\' does not exist') % n)
             if repo.tagtype(n) != expectedtype:
-                raise util.Abort(_('tag \'%s\' is not a %s tag') %
-                                 (n, expectedtype))
+                if expectedtype == 'global':
+                    raise util.Abort(_('tag \'%s\' is not a global tag') % n)
+                else:
+                    raise util.Abort(_('tag \'%s\' is not a local tag') % n)
         rev_ = nullid
         if not message:
             message = _('Removed tag %s') % ', '.join(names)