[Updated] D8833: sparse: add comment for an if condition which I tried to refactor
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Sun Aug 2 17:46:39 UTC 2020
Closed by commit rHG6a8eafaeff3b: sparse: add comment for an if condition which I tried to refactor (authored by pulkit).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8833?vs=22120&id=22216
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8833/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8833
AFFECTED FILES
mercurial/sparse.py
CHANGE DETAILS
diff --git a/mercurial/sparse.py b/mercurial/sparse.py
--- a/mercurial/sparse.py
+++ b/mercurial/sparse.py
@@ -407,6 +407,12 @@
elif file in wctx:
prunedactions[file] = (mergestatemod.ACTION_REMOVE, args, msg)
+ # in case or rename on one side, it is possible that f1 might not
+ # be present in sparse checkout we should include it
+ # TODO: should we do the same for f2?
+ # exists as a separate check because file can be in sparse and hence
+ # if we try to club this condition in above `elif type == ACTION_MERGE`
+ # it won't be triggered
if branchmerge and type == mergestatemod.ACTION_MERGE:
f1, f2, fa, move, anc = args
if not sparsematch(f1):
To: pulkit, #hg-reviewers, indygreg
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200802/88527f3a/attachment-0002.html>
More information about the Mercurial-patches
mailing list