Mercurial > public > mercurial-scm > hg
diff mercurial/hg.py @ 484:934279f3ca53
Pull from TAH
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Pull from TAH
manifest hash: 470ea90dd95189a019f4d96016a45db8a297b841
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCvzZzywK+sNU5EO8RAkZhAKCUJKX1vFtkFxV7qFwbuWQj62zcnQCfU687
jxKpBVesIXSOpBO4NbW/RIM=
=hSBe
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Sun, 26 Jun 2005 15:12:51 -0800 |
parents | 4c7f687e4313 520540fd6b64 |
children | 2ad41189bee5 e94cebc60d96 |
line wrap: on
line diff
--- a/mercurial/hg.py Sun Jun 26 15:09:37 2005 -0800 +++ b/mercurial/hg.py Sun Jun 26 15:12:51 2005 -0800 @@ -373,7 +373,7 @@ def tags(self): '''return a mapping of tag to node''' - if not self.tagscache: + if not self.tagscache: self.tagscache = {} try: # read each head of the tags file, ending with the tip @@ -386,11 +386,20 @@ for l in fl.revision(r).splitlines(): if l: n, k = l.split(" ", 1) - self.tagscache[k.strip()] = bin(n) - except KeyError: pass + try: + bin_n = bin(n) + except TypeError: + bin_n = '' + self.tagscache[k.strip()] = bin_n + except KeyError: + pass for k, n in self.ui.configitems("tags"): - self.tagscache[k] = bin(n) - + try: + bin_n = bin(n) + except TypeError: + bin_n = '' + self.tagscache[k] = bin_n + self.tagscache['tip'] = self.changelog.tip() return self.tagscache @@ -398,7 +407,7 @@ def tagslist(self): '''return a list of tags ordered by revision''' l = [] - for t,n in self.tags().items(): + for t, n in self.tags().items(): try: r = self.changelog.rev(n) except: