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

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Sat Jun 6 01:39:58 UTC 2020


martinvonz edited the summary of this revision.
martinvonz updated this revision to Diff 21565.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8597?vs=21526&id=21565

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8597/new/

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
@@ -1474,18 +1474,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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200606/faf7554d/attachment-0001.html>


More information about the Mercurial-patches mailing list