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
--- a/README Wed Feb 01 16:19:58 2017 +0100
+++ b/README Thu Feb 02 16:33:17 2017 +0100
@@ -56,6 +56,10 @@
Changelog
=========
+5.6.1 -- 2017-02-28
+
+ - fix a crash that sometime happened when evolving merges.
+
5.6.0 -- 2017-02-01
- compatibility with Mercurial 4.1.
--- 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)