changeset 1831:0195dc7bdfa4

compat: drop compatibility layer around update We now support only versions with the new API.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 28 Feb 2017 14:27:54 +0100
parents 53aae4b4e791
children 41b531dab3ad
files hgext3rd/evolve/__init__.py
diffstat 1 files changed, 10 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py	Tue Feb 28 14:27:08 2017 +0100
+++ b/hgext3rd/evolve/__init__.py	Tue Feb 28 14:27:54 2017 +0100
@@ -2114,23 +2114,12 @@
         hg.update(repo, divergent.rev())
     repo.ui.note(_('merging divergent changeset\n'))
     if progresscb: progresscb()
-    try:
-        stats = merge.update(repo,
-                             other.node(),
-                             branchmerge=True,
-                             force=False,
-                             ancestor=base.node(),
-                             mergeancestor=True)
-    except TypeError:
-        # Mercurial  < 43c00ca887d1 (3.7)
-        stats = merge.update(repo,
-                             other.node(),
-                             branchmerge=True,
-                             force=False,
-                             partial=None,
-                             ancestor=base.node(),
-                             mergeancestor=True)
-
+    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 "
@@ -4131,19 +4120,10 @@
     """Used by the evolve function to merge dest on top of pctx.
     return the same tuple as merge.graft"""
     if repo['.'].rev() != dest.rev():
-        #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)
+        merge.update(repo,
+                     dest,
+                     branchmerge=False,
+                     force=True)
     if bmactive(repo):
        repo.ui.status(_("(leaving bookmark %s)\n") % bmactive(repo))
     bmdeactivate(repo)