diff hgext/evolve.py @ 1812:5217c745bb60 stable

evolve: extend API fix from 25254b2f8116 to another relevant case For some reason, only part of this API change got fixes. Test did not caught this because 'False' is a valid revision number (0) and update force did not mind using it as an ancestors. The API changed in Mercurial 43c00ca887d1
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Thu, 02 Feb 2017 16:33:17 +0100
parents 99ede2d77545
children
line wrap: on
line diff
--- a/hgext/evolve.py	Wed Feb 01 16:19:58 2017 +0100
+++ b/hgext/evolve.py	Thu Feb 02 16:33:17 2017 +0100
@@ -4146,7 +4146,19 @@
     """Used by the evolve function to merge dest on top of pctx.
     return the same tuple as merge.graft"""
     if repo['.'].rev() != dest.rev():
-       merge.update(repo, dest, False, True, False)
+        #assert False
+        try:
+            merge.update(repo,
+                         dest,
+                         branchmerge=False,
+                         force=True)
+        except TypeError:
+            # Mercurial  < 43c00ca887d1 (3.7)
+            merge.update(repo,
+                         dest,
+                         branchmerge=False,
+                         force=True,
+                         partial=False)
     if bmactive(repo):
        repo.ui.status(_("(leaving bookmark %s)\n") % bmactive(repo))
     bmdeactivate(repo)