Patchwork D8555: cmdutil: get mergestate via context

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

Comments

phabricator - May 18, 2020, 10:09 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/D8555

AFFECTED FILES
  mercurial/cmdutil.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -38,7 +38,6 @@ 
     logcmdutil,
     match as matchmod,
     merge as mergemod,
-    mergestate as mergestatemod,
     mergeutil,
     obsolete,
     patch,
@@ -891,7 +890,7 @@ 
 def readmorestatus(repo):
     """Returns a morestatus object if the repo has unfinished state."""
     statetuple = statemod.getrepostate(repo)
-    mergestate = mergestatemod.mergestate.read(repo)
+    mergestate = repo[None].mergestate()
     activemerge = mergestate.active()
     if not statetuple and not activemerge:
         return None
@@ -3128,7 +3127,7 @@ 
             if subs:
                 subrepoutil.writestate(repo, newsubstate)
 
-        ms = mergestatemod.mergestate.read(repo)
+        ms = repo[None].mergestate()
         mergeutil.checkunresolved(ms)
 
         filestoamend = {f for f in wctx.files() if matcher(f)}