Patchwork D8081: manifest: fix _very_ subtle bug with exact matchers passed to walk()

login
register
mail settings
Submitter phabricator
Date Feb. 6, 2020, 10:12 p.m.
Message ID <921fc68c5493ac5413a1fe70e119044a@localhost.localdomain>
Download mbox | patch
Permalink /patch/45004/
State Not Applicable
Headers show

Comments

phabricator - Feb. 6, 2020, 10:12 p.m.
Closed by commit rHG48a1a974a92c: manifest: fix _very_ subtle bug with exact matchers passed to walk() (authored by durin42).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8081?vs=19924&id=19968

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8081/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8081

AFFECTED FILES
  mercurial/manifest.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -530,7 +530,8 @@ 
         # avoid the entire walk if we're only looking for specific files
         if self._filesfastpath(match):
             for fn in sorted(fset):
-                yield fn
+                if fn in self:
+                    yield fn
             return
 
         for fn in self: