# HG changeset patch # User Martin von Zweigbergk # Date 1620146385 25200 # Node ID bfa47d370b2cd75da6fc119b2339245449fb7ea6 # Parent 991be5efe7cb07fee041b464e5cc110bb08cf548 compat: make compatible with upstream change to put nullid on repo This patch makes evolve compatible across Mercurial core commit d55b71393907. diff -r 991be5efe7cb -r bfa47d370b2c hgext3rd/evolve/__init__.py --- a/hgext3rd/evolve/__init__.py Tue Jul 27 03:06:25 2021 +0300 +++ b/hgext3rd/evolve/__init__.py Tue May 04 09:39:45 2021 -0700 @@ -1043,16 +1043,23 @@ _(b"make commit obsolete this revision (DEPRECATED)"))) @eh.wrapfunction(obsolete, '_checkinvalidmarkers') -def _checkinvalidmarkers(orig, markers): +def _checkinvalidmarkers(orig, *args): """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 len(args) == 2: + repo_nullid = args[0].nullid + markers = args[1] + else: + # hg <= 5.8 (d55b71393907) + repo_nullid = nullid + markers = args[0] if r'debugobsconvert' in sys.argv: return for mark in markers: - if nullid in mark[1]: + if repo_nullid in mark[1]: msg = _(b'bad obsolescence marker detected: invalid successors nullid') hint = _(b'You should run `hg debugobsconvert`') raise error.Abort(msg, hint=hint)