diff -r 9c156b9caa4f -r 8feb73f733cb hgext/obsolete.py --- a/hgext/obsolete.py Tue Jul 10 15:14:58 2012 +0200 +++ b/hgext/obsolete.py Tue Jul 10 16:14:29 2012 +0200 @@ -566,7 +566,7 @@ del oldmark['id'] # dropped for now del oldmark['reason'] # unused until then oldobject = str(oldmark.pop('object')) - oldsubjects = [str(s) for s in oldmark.pop('subjects')] + oldsubjects = [str(s) for s in oldmark.pop('subjects', [])] LOOKUP_ERRORS = (error.RepoLookupError, error.LookupError) if len(oldobject) != 40: try: @@ -583,7 +583,9 @@ meta = dict((k.encode('utf-8'), v.encode('utf-8')) for k, v in oldmark.iteritems()) try: - store.create(bin(oldobject), [bin(n) for n in oldsubjects], + succs = [bin(n) for n in oldsubjects] + succs = [n for n in succs if n != nullid] + store.create(bin(oldobject), succs, 0, meta) cnt += 1 except ValueError: @@ -718,6 +720,7 @@ while toproceed: current = toproceed.pop() assert len(current) <= 1, 'splitting not handled yet. %r' % current + current = [n for n in current if n != nullid] if current: n, = current if n in objectrels: