comparison mercurial/sparse.py @ 45346:3c783ff08d40

mergeresult: introduce filemap() which yields filename based mapping We wanted to remove `actions` as this was leaking how we store things internally and was direct access to one of the member. This introduces filemap() which yields a map of `filename` -> `action, args, msg`. `mergeresult.actions` has been deleted as it's no longer required. Differential Revision: https://phab.mercurial-scm.org/D8888
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 05 Aug 2020 16:00:25 +0530
parents 9320f66854f6
children a1f51c7dce0f
comparison
equal deleted inserted replaced
45345:e5b4061f32be 45346:3c783ff08d40
386 # If we're updating, use the target context's filter, since we're 386 # If we're updating, use the target context's filter, since we're
387 # moving to the target context. 387 # moving to the target context.
388 sparsematch = matcher(repo, [mctx.rev()]) 388 sparsematch = matcher(repo, [mctx.rev()])
389 389
390 temporaryfiles = [] 390 temporaryfiles = []
391 for file, action in pycompat.iteritems(mresult.actions): 391 for file, action in mresult.filemap():
392 type, args, msg = action 392 type, args, msg = action
393 files.add(file) 393 files.add(file)
394 if sparsematch(file): 394 if sparsematch(file):
395 prunedactions[file] = action 395 prunedactions[file] = action
396 elif type == mergestatemod.ACTION_MERGE: 396 elif type == mergestatemod.ACTION_MERGE: