cleanup: remove check only needed for hg versions before 4.4
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 12 Jul 2019 23:00:11 -0700
changeset 4734 6b101bbd907a
parent 4733 85ae5dc0507d
child 4735 168c270e8347
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.
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)