compat: make compatible call to ui.edit for hg <= 4.3
This is similar to what is already happening elsewhere.
--- 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