Mercurial > evolve
changeset 1302:ebcf23fe3032
evolve: stop conditional wrapping of _checkinvalidmarkers
We support down to Mercurial 3.3, all such version have this function.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 29 Apr 2015 15:12:17 -0700 |
parents | 896d66841f7f |
children | 508f9911b042 |
files | hgext/evolve.py |
diffstat | 1 files changed, 14 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- 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',