Mercurial > evolve
changeset 379:881c3eca314a
Wider triggering of the debug marker abort
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Wed, 25 Jul 2012 18:18:38 +0200 |
parents | 0313cb49fa1a |
children | b36b07ae21bc |
files | hgext/obsolete.py |
diffstat | 1 files changed, 11 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/obsolete.py Wed Jul 25 18:09:11 2012 +0200 +++ b/hgext/obsolete.py Wed Jul 25 18:18:38 2012 +0200 @@ -75,7 +75,7 @@ """ -import os +import os, sys try: from cStringIO import StringIO except ImportError: @@ -819,12 +819,6 @@ @util.propertycache def _obsoleteset(self): """the set of obsolete revision""" - data = repo.opener.tryread('obsolete-relations') - if not data: - data = repo.sopener.tryread('obsoletemarkers') - if data: - raise util.Abort('old format of obsolete marker detected!\n' - 'run `hg debugconvertobsolete` once.') obs = set() nm = self.changelog.nodemap for prec in self.obsstore.precursors: @@ -1033,3 +1027,13 @@ return c repo.__class__ = obsoletingrepo + for arg in sys.argv: + if 'debugc' in arg: + break + else: + data = repo.opener.tryread('obsolete-relations') + if not data: + data = repo.sopener.tryread('obsoletemarkers') + if data: + raise util.Abort('old format of obsolete marker detected!\n' + 'run `hg debugconvertobsolete` once.')