D7439: dirstate: include explicit matches in match.traversedir calls
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Tue Nov 19 08:14:21 EST 2019
Closed by commit rHG95d2eab0a7b9: dirstate: include explicit matches in match.traversedir calls (authored by martinvonz).
martinvonz marked an inline comment as done.
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D7439?vs=18174&id=18236
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7439/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D7439
AFFECTED FILES
mercurial/dirstate.py
mercurial/merge.py
CHANGE DETAILS
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -2676,7 +2676,6 @@
# There's no API to copy a matcher. So mutate the passed matcher and
# restore it when we're done.
- oldexplicitdir = matcher.explicitdir
oldtraversedir = matcher.traversedir
res = []
@@ -2684,7 +2683,7 @@
try:
if removeemptydirs:
directories = []
- matcher.explicitdir = matcher.traversedir = directories.append
+ matcher.traversedir = directories.append
status = repo.status(match=matcher, ignored=ignored, unknown=True)
@@ -2706,5 +2705,4 @@
return res
finally:
- matcher.explicitdir = oldexplicitdir
matcher.traversedir = oldtraversedir
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -939,6 +939,11 @@
# step 1: find all explicit files
results, work, dirsnotfound = self._walkexplicit(match, subrepos)
+ if matchtdir:
+ for d in work:
+ matchtdir(d[0])
+ for d in dirsnotfound:
+ matchtdir(d)
skipstep3 = skipstep3 and not (work or dirsnotfound)
work = [d for d in work if not dirignore(d[0])]
To: martinvonz, #hg-reviewers, Alphare, pulkit
Cc: Alphare, mercurial-devel
More information about the Mercurial-devel
mailing list