--- a/hgext3rd/evolve/cmdrewrite.py Tue Apr 24 16:13:42 2018 +0100
+++ b/hgext3rd/evolve/cmdrewrite.py Tue Apr 24 15:23:15 2018 +0100
@@ -195,7 +195,10 @@
while newnode is None:
fp.seek(0)
previous_patch = fp.getvalue()
- newpatch = ui.edit(fp.getvalue(), old.user(), action="diff")
+ if 5 <= len(ui.edit.im_func.func_defaults):
+ newpatch = ui.edit(fp.getvalue(), old.user(), action="diff")
+ else:
+ newpatch = ui.edit(fp.getvalue(), old.user())
afp = stringio()
afp.write(newpatch)
--- a/hgext3rd/evolve/obsexchange.py Tue Apr 24 16:13:42 2018 +0100
+++ b/hgext3rd/evolve/obsexchange.py Tue Apr 24 15:23:15 2018 +0100
@@ -54,12 +54,12 @@
@eh.uisetup
def addgetbundleargs(self):
try:
+ from mercurial import wireprototypes
+ gboptsmap = wireprototypes.GETBUNDLE_ARGUMENTS
+ except (ImportError, AttributeError):
# <= hg 4.5
from mercurial import wireproto
gboptsmap = wireproto.gboptsmap
- except (ImportError, AttributeError):
- from mercurial import wireprototypes
- gboptsmap = wireprototypes.GETBUNDLE_ARGUMENTS
gboptsmap['evo_obscommon'] = 'nodes'
gboptsmap['evo_missing_nodes'] = 'nodes'