[Request] [+ ] D8569: merge: get mergestate from context instead of directly
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Mon May 18 22:10:54 UTC 2020
durin42 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This causes `hg fix` (and probably others) to use the new in-memory mergestate
object instead of the on-disk one, which may incidentally correct some
defects.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D8569
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
@@ -1182,9 +1182,8 @@
_prefetchfiles(repo, mctx, actions)
updated, merged, removed = 0, 0, 0
- ms = mergestatemod.mergestate.clean(
- repo, wctx.p1().node(), mctx.node(), labels
- )
+ ms = wctx.mergestate(clean=True)
+ ms.reset(wctx.p1().node(), mctx.node(), labels)
# add ACTION_GET_OTHER_AND_STORE to mergestate
for e in actions[mergestatemod.ACTION_GET_OTHER_AND_STORE]:
@@ -1593,7 +1592,7 @@
if not overwrite:
if len(pl) > 1:
raise error.Abort(_(b"outstanding uncommitted merge"))
- ms = mergestatemod.mergestate.read(repo)
+ ms = wc.mergestate()
if ms.unresolvedcount():
raise error.Abort(
_(b"outstanding merge conflicts"),
To: durin42, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200518/98713f24/attachment-0001.html>
More information about the Mercurial-patches
mailing list