Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
44855:1d2d353e5c4a | 44856:b7808443ed6a |
---|---|
16 ) | 16 ) |
17 from . import ( | 17 from . import ( |
18 error, | 18 error, |
19 match as matchmod, | 19 match as matchmod, |
20 merge as mergemod, | 20 merge as mergemod, |
21 mergestate as mergestatemod, | |
21 pathutil, | 22 pathutil, |
22 pycompat, | 23 pycompat, |
23 scmutil, | 24 scmutil, |
24 util, | 25 util, |
25 ) | 26 ) |
404 elif type == b'f': | 405 elif type == b'f': |
405 prunedactions[file] = action | 406 prunedactions[file] = action |
406 elif file in wctx: | 407 elif file in wctx: |
407 prunedactions[file] = (b'r', args, msg) | 408 prunedactions[file] = (b'r', args, msg) |
408 | 409 |
409 if branchmerge and type == mergemod.ACTION_MERGE: | 410 if branchmerge and type == mergestatemod.ACTION_MERGE: |
410 f1, f2, fa, move, anc = args | 411 f1, f2, fa, move, anc = args |
411 if not sparsematch(f1): | 412 if not sparsematch(f1): |
412 temporaryfiles.append(f1) | 413 temporaryfiles.append(f1) |
413 | 414 |
414 if len(temporaryfiles) > 0: | 415 if len(temporaryfiles) > 0: |