Adjust to Mercurial 4.7 wrt deprecated revlog method

This commit is contained in:
Mark Nauwelaerts
2018-09-09 11:52:36 +02:00
parent 435373ee83
commit 5ddcdd33ec

View File

@@ -1121,7 +1121,10 @@ def checkheads_bmark(repo, ref, ctx, force):
print "error %s unknown" % ref
return False
if not repo.changelog.descendant(ctx_old.rev(), ctx_new.rev()):
# replaced around Mercurial 4.7
isancestor = repo.changelog.isancestorrev if hasattr(repo.changelog, 'isancestorrev') \
else repo.changelog.descendant
if not isancestor(ctx_old.rev(), ctx_new.rev()):
if force:
print "ok %s forced update" % ref
else: