# HG changeset patch # User Augie Fackler # Date 2020-02-05 21:16:15 # Node ID 48a1a974a92c273444c09e779bfb8d62ceb5a941 # Parent aa0fc32ece9e67f72bf681f4991a02fba62b1d5b manifest: fix _very_ subtle bug with exact matchers passed to walk() Prior to this fix, manifestdict.walk() with an exact matcher would blindly list the files in the matcher, even if they weren't in the manifest. This was exposed by my next patch where I rewrite filesnotin() to use walk() instead of matches(). Differential Revision: https://phab.mercurial-scm.org/D8081 diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -530,7 +530,8 @@ class manifestdict(object): # 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: