Commits

Pierre-Yves David  committed af9cc1e

add an explicite warning when repo contains invalid obsolescence markers

  • Participants
  • Parent commits b3ce838

Comments (0)

Files changed (1)

File hgext/evolve.py

 testedwith = '2.5'
 buglink = 'https://bitbucket.org/marmoute/mutable-history/issues'
 
-
+import sys
 import random
 
 import mercuria
 
     Nullid successors was created by older version of evolve.
     """
+    nb = 0
     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])
+            nb += 1
         yield marker
+    if nb:
+        e = sys.stderr
+        print >> e, 'repo contains %i invalid obsolescence markers' % nb
 
 getrevs = obsolete.getrevs