Patchwork D8556: commands: get mergestate via context

login
register
mail settings
Submitter phabricator
Date May 18, 2020, 10:10 p.m.
Message ID <differential-rev-PHID-DREV-mha7afuxyaj2vig2intd-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46348/
State New
Headers show

Comments

phabricator - May 18, 2020, 10:10 p.m.
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




To: durin42, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

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(