--- a/hgext3rd/topic/compat.py Mon Mar 19 11:18:47 2018 -0700
+++ b/hgext3rd/topic/compat.py Mon Mar 19 15:46:17 2018 -0700
@@ -7,6 +7,8 @@
"""
from __future__ import absolute_import
+import functools
+
from mercurial import (
obsolete,
scmutil,
@@ -30,7 +32,10 @@
# Wrap obsolete.creatmarkers and make it accept but ignore "operation" argument
# for hg < 4.3
createmarkers = obsolete.createmarkers
-if obsolete.createmarkers.__code__.co_argcount < 6:
+originalcreatemarkers = createmarkers
+while isinstance(originalcreatemarkers, functools.partial):
+ originalcreatemarkers = originalcreatemarkers.func
+if originalcreatemarkers.__code__.co_argcount < 6:
def createmarkers(repo, relations, flag=0, date=None, metadata=None,
operation=None):
return obsolete.createmarkers(repo, relations, flag, date, metadata)