changeset 3927:b4589df6d3aa stable

compat: make compatible call to ui.edit for hg <= 4.3 This is similar to what is already happening elsewhere.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 02 Aug 2018 04:11:54 +0200
parents 35172bd95e57
children a50b7e3d86c2 b627e165ad20
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Thu Aug 02 03:08:52 2018 +0200
+++ b/hgext3rd/evolve/evolvecmd.py	Thu Aug 02 04:11:54 2018 +0200
@@ -707,7 +707,10 @@
                     " content-divergent changesets.\nHG: Resolve conflicts"
                     " in commit messages to continue.\n\n")
 
-        resolveddesc = ui.edit(prefixes + desc, ui.username(), action='desc')
+        if 5 <= len(ui.edit.im_func.func_defaults): # <= hg-4.3
+            resolveddesc = ui.edit(prefixes + desc, ui.username(), action='desc')
+        else:
+            resolveddesc = ui.edit(prefixes + desc, ui.username())
         # make sure we remove the prefixes part from final commit message
         if prefixes in resolveddesc:
             # hack, we should find something better