diff -r fa6c2c3064fd -r 252500520d60 mercurial/sparse.py --- a/mercurial/sparse.py Thu Jul 06 16:17:35 2017 -0700 +++ b/mercurial/sparse.py Thu Jul 06 16:29:31 2017 -0700 @@ -301,18 +301,16 @@ return result -def calculateupdates(orig, repo, wctx, mctx, ancestors, branchmerge, *arg, - **kwargs): - """Filter updates to only lay out files that match the sparse rules. - """ - actions, diverge, renamedelete = orig(repo, wctx, mctx, ancestors, - branchmerge, *arg, **kwargs) +def filterupdatesactions(repo, wctx, mctx, branchmerge, actions): + """Filter updates to only lay out files that match the sparse rules.""" + if not enabled: + return actions oldrevs = [pctx.rev() for pctx in wctx.parents()] oldsparsematch = matcher(repo, oldrevs) if oldsparsematch.always(): - return actions, diverge, renamedelete + return actions files = set() prunedactions = {} @@ -383,4 +381,4 @@ elif old and not new: prunedactions[file] = ('r', [], '') - return prunedactions, diverge, renamedelete + return prunedactions