# HG changeset patch # User Martin von Zweigbergk # Date 1562997611 25200 # Node ID 6b101bbd907ad3b80a9581123f2d40042105c616 # Parent 85ae5dc0507d816f0c2d29655ce198f4d40b6a99 cleanup: remove check only needed for hg versions before 4.4 ui.edit() has had the "action" argument since 6e6452bc441d (editor: use an unambiguous path suffix for editor files, 2017-08-30), which was first released in hg version 4.4. Since we support only versions higher than 4.5, we can drop this check. diff -r 85ae5dc0507d -r 6b101bbd907a hgext3rd/evolve/cmdrewrite.py --- a/hgext3rd/evolve/cmdrewrite.py Fri Jul 12 08:20:24 2019 -0700 +++ b/hgext3rd/evolve/cmdrewrite.py Fri Jul 12 23:00:11 2019 -0700 @@ -182,10 +182,7 @@ while newnode is None: fp.seek(0) previous_patch = fp.getvalue() - 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()) + newpatch = ui.edit(fp.getvalue(), old.user(), action="diff") afp = stringio() afp.write(newpatch)