Patchwork D8597: rebase: use merge.graft() instead of merge.update()

login
register
mail settings
Submitter phabricator
Date May 29, 2020, 3:58 p.m.
Message ID <differential-rev-PHID-DREV-uhctnr2pbuvhtxwasxkl-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46392/
State New
Headers show

Comments

phabricator - May 29, 2020, 3:58 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8597

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -1473,18 +1473,8 @@ 
     repo.ui.debug(b" merge against %d:%s\n" % (rev, ctx))
     if base is not None:
         repo.ui.debug(b"   detach base %d:%s\n" % (base, repo[base]))
-
-    # See explanation in merge.graft()
-    mergeancestor = repo.changelog.isancestor(p1ctx.node(), ctx.node())
-    stats = mergemod.update(
-        repo,
-        rev,
-        branchmerge=True,
-        force=True,
-        ancestor=base,
-        mergeancestor=mergeancestor,
-        labels=[b'dest', b'source'],
-        wc=wctx,
+    stats = mergemod.graft(
+        repo, ctx, repo[base], labels=[b'dest', b'source'], wctx=wctx,
     )
     wctx.setparents(p1ctx.node(), repo[p2].node())
     if collapse: