Mercurial > hg
comparison mercurial/localrepo.py @ 13892:31d15f761631
localrepo: ignore tags to unknown nodes (issue2750)
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Mon, 04 Apr 2011 22:51:10 +0300 |
parents | a8d13ee0ce68 |
children | 184cf2fa1046 |
comparison
equal
deleted
inserted
replaced
13891:1bd9f3a6a0d0 | 13892:31d15f761631 |
---|---|
360 # writing to the cache), but the rest of Mercurial wants them in | 360 # writing to the cache), but the rest of Mercurial wants them in |
361 # local encoding. | 361 # local encoding. |
362 tags = {} | 362 tags = {} |
363 for (name, (node, hist)) in alltags.iteritems(): | 363 for (name, (node, hist)) in alltags.iteritems(): |
364 if node != nullid: | 364 if node != nullid: |
365 tags[encoding.tolocal(name)] = node | 365 try: |
366 # ignore tags to unknown nodes | |
367 self.changelog.lookup(node) | |
368 tags[encoding.tolocal(name)] = node | |
369 except error.LookupError: | |
370 pass | |
366 tags['tip'] = self.changelog.tip() | 371 tags['tip'] = self.changelog.tip() |
367 tagtypes = dict([(encoding.tolocal(name), value) | 372 tagtypes = dict([(encoding.tolocal(name), value) |
368 for (name, value) in tagtypes.iteritems()]) | 373 for (name, value) in tagtypes.iteritems()]) |
369 return (tags, tagtypes) | 374 return (tags, tagtypes) |
370 | 375 |