changeset 577:2cd2ee20d9fa stable

evolve: filter nullid successors
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Wed, 10 Oct 2012 14:58:21 +0200
parents cf116ffc9cc5
children 02f34904305f 4676650f4f9d
files hgext/evolve.py
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/evolve.py	Thu Sep 27 16:55:08 2012 +0200
+++ b/hgext/evolve.py	Wed Oct 10 14:58:21 2012 +0200
@@ -295,6 +295,25 @@
 reposetup = eh.final_reposetup
 
 #####################################################################
+### Critical fix                                                  ###
+#####################################################################
+
+@eh.wrapfunction(mercurial.obsolete, '_readmarkers')
+def safereadmarkers(orig, data):
+    """safe maker wrapper to remove nullid succesors
+
+    Nullid successors was created by older version of evolve.
+    """
+    for marker in orig(data):
+        if nullid in marker[1]:
+            marker = (marker[0],
+                      tuple(s for s in marker[1] if s != nullid),
+                      marker[2],
+                      marker[3])
+        yield marker
+
+
+#####################################################################
 ### Obsolescence Caching Logic                                    ###
 #####################################################################