changeset 1566:25254b2f8116

evolve: apply API change to 'merge.update' Mercurial core43c00ca887d1 (future 3.7) changed the signature of the 'mercurial.merge.update', this impact our code so we update it. This
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 17 Dec 2015 16:00:32 +0000
parents 9590332b26c8
children 536fdfa3c48b
files README hgext/evolve.py
diffstat 2 files changed, 18 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/README	Mon Dec 14 16:29:55 2015 -0800
+++ b/README	Thu Dec 17 16:00:32 2015 +0000
@@ -61,6 +61,7 @@
 - split: add a new command to split changesets,
 - tests: drop our copy of 'run-tests.py' use core one instead,
 - bookmark: do all bookmark movement within a transaction.
+- evolve: compatibility with Mercurial 3.7
 
 5.2.2 --
 
--- a/hgext/evolve.py	Mon Dec 14 16:29:55 2015 -0800
+++ b/hgext/evolve.py	Thu Dec 17 16:00:32 2015 +0000
@@ -2004,13 +2004,23 @@
         hg.update(repo, divergent.rev())
     repo.ui.note(_('merging divergent changeset\n'))
     if progresscb: progresscb()
-    stats = merge.update(repo,
-                         other.node(),
-                         branchmerge=True,
-                         force=False,
-                         partial=None,
-                         ancestor=base.node(),
-                         mergeancestor=True)
+    if 'partial' in merge.update.__doc__:
+        # Mercurial  < 43c00ca887d1 (3.7)
+        stats = merge.update(repo,
+                             other.node(),
+                             branchmerge=True,
+                             force=False,
+                             partial=None,
+                             ancestor=base.node(),
+                             mergeancestor=True)
+    else:
+        stats = merge.update(repo,
+                             other.node(),
+                             branchmerge=True,
+                             force=False,
+                             ancestor=base.node(),
+                             mergeancestor=True)
+
     hg._showstats(repo, stats)
     if stats[3]:
         repo.ui.status(_("use 'hg resolve' to retry unresolved file merges "