[PATCH] commands: print tags to unknown nodes
Idan Kamara
idankk86 at gmail.com
Mon Apr 4 13:21:26 CDT 2011
# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1301940970 -10800
# Node ID 197a698fd249c0cfdcecf2c4b128ea8b674cd91a
# Parent 6b964249593693135e6a8c1193f65dd411ae2003
commands: print tags to unknown nodes
This restores (very) old behaviour that was changed (accidently?) in ae3089cefaab
diff -r 6b9642495936 -r 197a698fd249 mercurial/commands.py
--- a/mercurial/commands.py Mon Apr 04 19:06:02 2011 +0300
+++ b/mercurial/commands.py Mon Apr 04 21:16:10 2011 +0300
@@ -4065,14 +4065,15 @@
r = "%5d:%s" % (repo.changelog.rev(n), hn)
except error.LookupError:
r = " ?:%s" % hn
- else:
- spaces = " " * (30 - encoding.colwidth(t))
- if ui.verbose:
- if repo.tagtype(t) == 'local':
- tagtype = " local"
- else:
- tagtype = ""
- ui.write("%s%s %s%s\n" % (t, spaces, r, tagtype))
+
+ spaces = " " * (30 - encoding.colwidth(t))
+
+ if ui.verbose:
+ if repo.tagtype(t) == 'local':
+ tagtype = " local"
+ else:
+ tagtype = ""
+ ui.write("%s%s %s%s\n" % (t, spaces, r, tagtype))
def tip(ui, repo, **opts):
"""show the tip revision
diff -r 6b9642495936 -r 197a698fd249 tests/test-tags.t
--- a/tests/test-tags.t Mon Apr 04 19:06:02 2011 +0300
+++ b/tests/test-tags.t Mon Apr 04 21:16:10 2011 +0300
@@ -158,6 +158,7 @@
.hgtags at c4be69a18c11, line 2: node 'x' is not well formed
tip 8:c4be69a18c11
first 0:acb14030fe0a
+ invalid ?:a5a5
$ hg tip
changeset: 8:c4be69a18c11
tag: tip
More information about the Mercurial-devel
mailing list