changeset 18906:ef7068173a22

tag: clarify cryptic error message when tagging null revision
author Mads Kiilerich <madski@unity3d.com>
date Thu, 11 Apr 2013 14:44:22 +0200
parents 012780620d4f
children af9fa8d4c939
files mercurial/commands.py tests/test-tag.t
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Apr 12 16:55:34 2013 -0400
+++ b/mercurial/commands.py	Thu Apr 11 14:44:22 2013 +0200
@@ -5601,7 +5601,7 @@
         # don't allow tagging the null rev
         if (not opts.get('remove') and
             scmutil.revsingle(repo, rev_).rev() == nullrev):
-            raise util.Abort(_("null revision specified"))
+            raise util.Abort(_("cannot tag null revision"))
 
         repo.tag(names, r, message, opts.get('local'), opts.get('user'), date)
     finally:
--- a/tests/test-tag.t	Fri Apr 12 16:55:34 2013 -0400
+++ b/tests/test-tag.t	Thu Apr 11 14:44:22 2013 +0200
@@ -264,11 +264,11 @@
 
   $ hg init empty
   $ hg tag -R empty nullrev
-  abort: null revision specified
+  abort: cannot tag null revision
   [255]
 
   $ hg tag -R empty -r 00000000000 -f nulltag
-  abort: null revision specified
+  abort: cannot tag null revision
   [255]
 
   $ cd ..