Mercurial > evolve
changeset 5983:bfa47d370b2c stable
compat: make compatible with upstream change to put nullid on repo
This patch makes evolve compatible across Mercurial core commit
d55b71393907.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 04 May 2021 09:39:45 -0700 |
parents | 991be5efe7cb |
children | f408cc176bef |
files | hgext3rd/evolve/__init__.py |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)