diff mercurial/sparse.py @ 44856: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 a61287a95dc3
children a03c177a4679
line wrap: on
line diff
--- a/mercurial/sparse.py	Mon May 18 12:45:45 2020 -0400
+++ b/mercurial/sparse.py	Mon May 18 14:59:59 2020 -0400
@@ -18,6 +18,7 @@
     error,
     match as matchmod,
     merge as mergemod,
+    mergestate as mergestatemod,
     pathutil,
     pycompat,
     scmutil,
@@ -406,7 +407,7 @@
         elif file in wctx:
             prunedactions[file] = (b'r', args, msg)
 
-        if branchmerge and type == mergemod.ACTION_MERGE:
+        if branchmerge and type == mergestatemod.ACTION_MERGE:
             f1, f2, fa, move, anc = args
             if not sparsematch(f1):
                 temporaryfiles.append(f1)