# HG changeset patch # User Pierre-Yves David # Date 1430345537 25200 # Node ID ebcf23fe3032e551a220eade3fe27af7d44c8d93 # Parent 896d66841f7fb32e0e5f0044c62941ea8319ff64 evolve: stop conditional wrapping of _checkinvalidmarkers We support down to Mercurial 3.3, all such version have this function. diff -r 896d66841f7f -r ebcf23fe3032 hgext/evolve.py --- 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',