Mercurial > hg
changeset 13893:1aea86673dee
tags: no need to check for valid nodes
_findtags in localrepo checks that nodes exist in the revlog so we
can't get a LookupError here.
The output of 'hg tags' stays the same since tags to unknown nodes
didn't get printed before anyway due to ae3089cefaab.
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Mon, 04 Apr 2011 23:43:22 +0300 |
parents | 31d15f761631 |
children | e4ffb9576b63 3b4025dcb223 |
files | mercurial/commands.py |
diffstat | 1 files changed, 10 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Apr 04 22:51:10 2011 +0300 +++ b/mercurial/commands.py Mon Apr 04 23:43:22 2011 +0300 @@ -4061,19 +4061,16 @@ ui.write("%s\n" % t) continue - try: - hn = hexfunc(n) - 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)) + hn = hexfunc(n) + r = "%5d:%s" % (repo.changelog.rev(n), hn) + 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