D682: merge: allow a custom working context to be passed to update

phillco (Phil Cohen) phabricator at mercurial-scm.org
Mon Sep 11 20:21:26 UTC 2017


phillco created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This will allow anyone to enable the first in-menmory merge milestone
  by wrapping merge.update in an extension and creating an overlayworkingctx.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1467,7 +1467,7 @@
 
 def update(repo, node, branchmerge, force, ancestor=None,
            mergeancestor=False, labels=None, matcher=None, mergeforce=False,
-           updatecheck=None):
+           updatecheck=None, wc=None):
     """
     Perform a merge between the working directory and the given node
 
@@ -1538,7 +1538,8 @@
     else:
         partial = True
     with repo.wlock():
-        wc = repo[None]
+        if wc is None:
+            wc = repo[None]
         pl = wc.parents()
         p1 = pl[0]
         pas = [None]



To: phillco, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list