[Request] [+ ] D8597: rebase: use merge.graft() instead of merge.update()

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri May 29 15:58:25 UTC 2020


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

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:



To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200529/2f8c502e/attachment-0001.html>


More information about the Mercurial-patches mailing list