# HG changeset patch # User Mads Kiilerich # Date 2013-04-11 12:44:22 # Node ID ef7068173a22ba660af2d124a59316002509d95a # Parent 012780620d4f4c8d02c1a17c1826095c5e98b10a tag: clarify cryptic error message when tagging null revision diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -5601,7 +5601,7 @@ def tag(ui, repo, name1, *names, **opts) # 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: diff --git a/tests/test-tag.t b/tests/test-tag.t --- a/tests/test-tag.t +++ b/tests/test-tag.t @@ -264,11 +264,11 @@ tagging on null rev $ 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 ..