--- a/hgext/obsolete.py Fri Jul 06 18:43:25 2012 +0200
+++ b/hgext/obsolete.py Tue Jul 10 16:03:29 2012 +0200
@@ -609,7 +609,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:
@@ -626,7 +626,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: