changeset 3928:a50b7e3d86c2 mercurial-4.6

test-compat: merge stable into mercurial-4.6
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 02 Aug 2018 02:42:14 +0200
parents b4589df6d3aa (diff) 257481642686 (current diff)
children e709e3817d7e 1194c850fe2a
files
diffstat 3 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py	Thu Aug 02 01:57:13 2018 +0200
+++ b/hgext3rd/evolve/__init__.py	Thu Aug 02 02:42:14 2018 +0200
@@ -1409,9 +1409,10 @@
     cmdutil.afterresolvedstates.append(afterresolved)
     cmdutil.afterresolvedstates.append(grabresolved)
 
-    statedata = ('evolve', cmdutil.fileexistspredicate('evolvestate'),
-                 _evolvemessage)
-    cmdutil.STATES = (statedata, ) + cmdutil.STATES
+    if util.safehasattr(cmdutil, 'STATES'):
+        statedata = ('evolve', cmdutil.fileexistspredicate('evolvestate'),
+                     _evolvemessage)
+        cmdutil.STATES = (statedata, ) + cmdutil.STATES
 
 @eh.wrapfunction(hg, 'clean')
 def clean(orig, repo, *args, **kwargs):
--- a/hgext3rd/evolve/evolvecmd.py	Thu Aug 02 01:57:13 2018 +0200
+++ b/hgext3rd/evolve/evolvecmd.py	Thu Aug 02 02:42:14 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
--- a/hgext3rd/topic/__init__.py	Thu Aug 02 01:57:13 2018 +0200
+++ b/hgext3rd/topic/__init__.py	Thu Aug 02 02:42:14 2018 +0200
@@ -489,7 +489,7 @@
                     ui.status('active topic %r is now empty\n' % ct)
                     if ('phase' in getattr(tr, 'names', ())
                             or any(n.startswith('push-response')
-                            for n in getattr(tr, 'names', ()))):
+                                   for n in getattr(tr, 'names', ()))):
                         ui.status(_("(use 'hg topic --clear' to clear it if needed)\n"))
                 hint = _("(see 'hg help topics' for more information)\n")
                 if ctwasempty and not empty: