[Request] [+ ] D8556: commands: get mergestate via context

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Mon May 18 22:10:48 UTC 2020


durin42 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/D8556

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5939,7 +5939,7 @@
     if show:
         ui.pager(b'resolve')
         fm = ui.formatter(b'resolve', opts)
-        ms = mergestatemod.mergestate.read(repo)
+        ms = repo[None].mergestate()
         wctx = repo[None]
         m = scmutil.match(wctx, pats, opts)
 
@@ -5982,7 +5982,7 @@
         return 0
 
     with repo.wlock():
-        ms = mergestatemod.mergestate.read(repo)
+        ms = repo[None].mergestate()
 
         if not (ms.active() or repo.dirstate.p2() != nullid):
             raise error.Abort(
@@ -6949,7 +6949,7 @@
     marks = []
 
     try:
-        ms = mergestatemod.mergestate.read(repo)
+        ms = repo[None].mergestate()
     except error.UnsupportedMergeRecords as e:
         s = b' '.join(e.recordtypes)
         ui.warn(



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/7b266632/attachment.html>


More information about the Mercurial-patches mailing list