--- a/hgext/obsolete.py Fri Jul 06 16:32:53 2012 +0200
+++ b/hgext/obsolete.py Fri Jul 06 17:15:30 2012 +0200
@@ -589,8 +589,13 @@
'date': '%i %i' % util.makedate(),
'user': ui.username(),
}
- store.create(prec, sucs, 0, meta)
- cnt += 1
+ try:
+ store.create(prec, sucs, 0, meta)
+ cnt += 1
+ except ValueError:
+ repo.ui.write_err("invalid old marker line: %s"
+ % (line))
+ err += 1
finally:
f.close()
util.unlink(repo.join('obsolete-relations'))
@@ -623,11 +628,11 @@
try:
store.create(bin(oldobject), [bin(n) for n in oldsubjects],
0, meta)
+ cnt += 1
except ValueError:
repo.ui.write_err("invalid marker %s -> %s\n"
% (oldobject, oldsubjects))
err += 1
- cnt += 1
util.unlink(repo.sjoin('obsoletemarkers'))
finally:
del repo._importoldobsolete