evolve: stop conditional wrapping of _checkinvalidmarkers
We support down to Mercurial 3.3, all such version have this function.
--- a/hgext/evolve.py Wed Apr 29 15:11:52 2015 -0700
+++ b/hgext/evolve.py Wed Apr 29 15:12:17 2015 -0700
@@ -2946,21 +2946,20 @@
_bestformat = max(obsolete.formats.keys())
-if getattr(obsolete, '_checkinvalidmarkers', None) is not None:
- @eh.wrapfunction(obsolete, '_checkinvalidmarkers')
- def _checkinvalidmarkers(orig, markers):
- """search for marker with invalid data and raise error if needed
-
- Exist as a separated function to allow the evolve extension for a more
- subtle handling.
- """
- if 'debugobsconvert' in sys.argv:
- return
- for mark in markers:
- if node.nullid in mark[1]:
- raise util.Abort(_('bad obsolescence marker detected: '
- 'invalid successors nullid'),
- hint=_('You should run `hg debugobsconvert`'))
+@eh.wrapfunction(obsolete, '_checkinvalidmarkers')
+def _checkinvalidmarkers(orig, markers):
+ """search for marker with invalid data and raise error if needed
+
+ Exist as a separated function to allow the evolve extension for a more
+ subtle handling.
+ """
+ if 'debugobsconvert' in sys.argv:
+ return
+ for mark in markers:
+ if node.nullid in mark[1]:
+ raise util.Abort(_('bad obsolescence marker detected: '
+ 'invalid successors nullid'),
+ hint=_('You should run `hg debugobsconvert`'))
@command(
'debugobsconvert',