equal
deleted
inserted
replaced
299 |
299 |
300 repo._sparsematchercache[key] = result |
300 repo._sparsematchercache[key] = result |
301 |
301 |
302 return result |
302 return result |
303 |
303 |
304 def calculateupdates(orig, repo, wctx, mctx, ancestors, branchmerge, *arg, |
304 def filterupdatesactions(repo, wctx, mctx, branchmerge, actions): |
305 **kwargs): |
305 """Filter updates to only lay out files that match the sparse rules.""" |
306 """Filter updates to only lay out files that match the sparse rules. |
306 if not enabled: |
307 """ |
307 return actions |
308 actions, diverge, renamedelete = orig(repo, wctx, mctx, ancestors, |
|
309 branchmerge, *arg, **kwargs) |
|
310 |
308 |
311 oldrevs = [pctx.rev() for pctx in wctx.parents()] |
309 oldrevs = [pctx.rev() for pctx in wctx.parents()] |
312 oldsparsematch = matcher(repo, oldrevs) |
310 oldsparsematch = matcher(repo, oldrevs) |
313 |
311 |
314 if oldsparsematch.always(): |
312 if oldsparsematch.always(): |
315 return actions, diverge, renamedelete |
313 return actions |
316 |
314 |
317 files = set() |
315 files = set() |
318 prunedactions = {} |
316 prunedactions = {} |
319 |
317 |
320 if branchmerge: |
318 if branchmerge: |
381 flags = mf.flags(file) |
379 flags = mf.flags(file) |
382 prunedactions[file] = ('g', (flags, False), '') |
380 prunedactions[file] = ('g', (flags, False), '') |
383 elif old and not new: |
381 elif old and not new: |
384 prunedactions[file] = ('r', [], '') |
382 prunedactions[file] = ('r', [], '') |
385 |
383 |
386 return prunedactions, diverge, renamedelete |
384 return prunedactions |