# HG changeset patch # User Pierre-Yves David # Date 1341585173 -7200 # Node ID 37b543215187cce0885c278aef9db69e7c6abceb # Parent 3853061e7fea664dab70c0c1c0dae383db0b8ddf obsolete: better lookuperror handling during convert diff -r 3853061e7fea -r 37b543215187 hgext/obsolete.py --- 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'])