Mercurial > evolve
changeset 675:af9cc1e861a4 stable
add an explicite warning when repo contains invalid obsolescence markers
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 04 Feb 2013 17:31:20 +0100 |
parents | b3ce838a077e |
children | 81d13d461145 |
files | hgext/evolve.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/evolve.py Mon Feb 04 17:21:02 2013 +0100 +++ b/hgext/evolve.py Mon Feb 04 17:31:20 2013 +0100 @@ -22,7 +22,7 @@ testedwith = '2.5' buglink = 'https://bitbucket.org/marmoute/mutable-history/issues' - +import sys import random import mercuria @@ -311,13 +311,18 @@ 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