##// END OF EJS Templates
Handle errors in .hgtags or hgrc [tags] section more gracefully....
Thomas Arendsen Hein -
r477:520540fd default
parent child Browse files
Show More
@@ -667,10 +667,10 b' def tags(ui, repo):'
667 667 l.reverse()
668 668 for t,n in l:
669 669 try:
670 r = repo.changelog.rev(n)
670 r = "%5d:%s" % (repo.changelog.rev(n), hg.hex(n))
671 671 except KeyError:
672 r = "?"
673 print "%-30s %5d:%s" % (t, repo.changelog.rev(n), hg.hex(n))
672 r = " ?:?"
673 ui.write("%-30s %s\n" % (t, r))
674 674
675 675 def tip(ui, repo):
676 676 """show the tip revision"""
@@ -386,10 +386,19 b' class localrepository:'
386 386 for l in fl.revision(r).splitlines():
387 387 if l:
388 388 n, k = l.split(" ", 1)
389 self.tagscache[k.strip()] = bin(n)
390 except KeyError: pass
389 try:
390 bin_n = bin(n)
391 except TypeError:
392 bin_n = ''
393 self.tagscache[k.strip()] = bin_n
394 except KeyError:
395 pass
391 396 for k, n in self.ui.configitems("tags"):
392 self.tagscache[k] = bin(n)
397 try:
398 bin_n = bin(n)
399 except TypeError:
400 bin_n = ''
401 self.tagscache[k] = bin_n
393 402
394 403 self.tagscache['tip'] = self.changelog.tip()
395 404
General Comments 0
You need to be logged in to leave comments. Login now