[PATCH 3 of 4] tag: do not pass binary nullid to scmutil.revsingle()
Yuya Nishihara
yuya at tcha.org
Tue Aug 4 10:10:29 CDT 2015
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1426398326 -32400
# Sun Mar 15 14:45:26 2015 +0900
# Node ID 2fe6baa83605980bf2a57b1b0b7a5177b884c0f5
# Parent fb330f1901e39f450b5aec93e590df1a247c2bfc
tag: do not pass binary nullid to scmutil.revsingle()
Future patches will remove the old-style parser that happen to accept a
binary nodeid. A binary nodeid shouldn't be passed to scmutil.revrange()
because it is ambiguous. For example, bin('20' * 19 + '30') is valid binary
nodeid, but it can also be parsed as a revset expression, '0'.
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -6248,7 +6248,7 @@ def tag(ui, repo, name1, *names, **opts)
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
+ rev_ = 'null'
if not message:
# we don't translate commit messages
message = 'Removed tag %s' % ', '.join(names)
More information about the Mercurial-devel
mailing list