mercurial/obsolete.py
changeset 17774 0496d4f73cf4
parent 17537 31f32a96e1e3
child 17775 13744acc4ad7
--- a/mercurial/obsolete.py	Tue Oct 16 11:43:15 2012 -0700
+++ b/mercurial/obsolete.py	Mon Oct 15 00:12:06 2012 +0200
@@ -52,7 +52,7 @@
   cannot contain '\0'.
 """
 import struct
-import util, base85
+import util, base85, node
 from i18n import _
 
 _pack = struct.pack
@@ -237,6 +237,9 @@
             self.precursors.setdefault(pre, set()).add(mark)
             for suc in sucs:
                 self.successors.setdefault(suc, set()).add(mark)
+        if node.nullid in self.successors:
+            raise util.Abort(_('bad obsolescence marker detected: '
+                               'invalid successors nullid'))
 
 def _encodemarkers(markers, addheader=False):
     # Kept separate from flushmarkers(), it will be reused for