mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2026-05-13 00:35:30 +02:00
Use changelog.isancestorrev()
The old changelog.descendant() is deprecated in 4.7, gone in 4.8. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
@@ -999,7 +999,12 @@ def checkheads_bmark(repo, ref, ctx):
|
||||
print "error %s unknown" % ref
|
||||
return False
|
||||
|
||||
if not repo.changelog.descendant(ctx_old.rev(), ctx_new.rev()):
|
||||
if check_version(4, 7):
|
||||
isancestorrev = repo.changelog.isancestorrev
|
||||
else:
|
||||
isancestorrev = repo.changelog.descendant
|
||||
|
||||
if not isancestorrev(ctx_old.rev(), ctx_new.rev()):
|
||||
if force_push:
|
||||
print "ok %s forced update" % ref
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user