Mercurial > evolve
diff hgext/obsolete.py @ 340:37b543215187 stable
obsolete: better lookuperror handling during convert
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Fri, 06 Jul 2012 16:32:53 +0200 |
parents | 3853061e7fea |
children | 7653f80fd7a4 |
line wrap: on
line diff
--- a/hgext/obsolete.py Fri Jul 06 16:25:06 2012 +0200 +++ b/hgext/obsolete.py Fri Jul 06 16:32:53 2012 +0200 @@ -605,15 +605,16 @@ del oldmark['reason'] # unused until then oldobject = str(oldmark.pop('object')) oldsubjects = [str(s) for s in oldmark.pop('subjects')] + LOOKUP_ERRORS = (error.RepoLookupError, error.LookupError) if len(oldobject) != 40: try: oldobject = repo[oldobject].node() - except error.RepoLookupError: + except LOOKUP_ERRORS: pass if any(len(s) != 40 for s in oldsubjects): try: oldsubjects = [repo[s].node() for s in oldsubjects] - except error.RepoLookupError: + except LOOKUP_ERRORS: pass oldmark['date'] = '%i %i' % tuple(oldmark['date'])