diff mercurial/cmdutil.py @ 44915:b7808443ed6a

mergestate: split out merge state handling code from main merge module There's already some pretty reasonable encapsulation here, but I want to make the mergestate storage a property of the context so memctx instances can do a reasonable thing. This is the first step in a reshuffle to make that easier. Differential Revision: https://phab.mercurial-scm.org/D8550
author Augie Fackler <augie@google.com>
date Mon, 18 May 2020 14:59:59 -0400
parents c5574408254a
children 065421e12248
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Mon May 18 12:45:45 2020 -0400
+++ b/mercurial/cmdutil.py	Mon May 18 14:59:59 2020 -0400
@@ -38,6 +38,7 @@
     logcmdutil,
     match as matchmod,
     merge as mergemod,
+    mergestate as mergestatemod,
     mergeutil,
     obsolete,
     patch,
@@ -890,7 +891,7 @@
 def readmorestatus(repo):
     """Returns a morestatus object if the repo has unfinished state."""
     statetuple = statemod.getrepostate(repo)
-    mergestate = mergemod.mergestate.read(repo)
+    mergestate = mergestatemod.mergestate.read(repo)
     activemerge = mergestate.active()
     if not statetuple and not activemerge:
         return None
@@ -3127,7 +3128,7 @@
             if subs:
                 subrepoutil.writestate(repo, newsubstate)
 
-        ms = mergemod.mergestate.read(repo)
+        ms = mergestatemod.mergestate.read(repo)
         mergeutil.checkunresolved(ms)
 
         filestoamend = {f for f in wctx.files() if matcher(f)}