--- 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.')