mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
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 734bab2916a6.
This commit is contained in:
parent
c341aeb03e
commit
bcbd1c4dc5
@ -4061,19 +4061,16 @@ def tags(ui, repo):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user