# HG changeset patch # User Martin von Zweigbergk # Date 1620146385 25200 # Node ID efdbbced2374275c61d4108a1415732306da6ff1 # Parent e24bdf74cf83b5e77bf8afaab80a9f80b1981919 compat: make compatible with upstream change to put nullid on repo This patch makes evolve compatible across Mercurial core commit d55b71393907. diff -r e24bdf74cf83 -r efdbbced2374 hgext3rd/evolve/__init__.py --- a/hgext3rd/evolve/__init__.py Sun Apr 25 23:52:29 2021 +0800 +++ b/hgext3rd/evolve/__init__.py Tue May 04 09:39:45 2021 -0700 @@ -1039,16 +1039,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)