# HG changeset patch # User Augie Fackler # Date 1580937375 18000 # 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 -r aa0fc32ece9e -r 48a1a974a92c mercurial/manifest.py --- a/mercurial/manifest.py Tue Jan 14 17:08:45 2020 +0100 +++ b/mercurial/manifest.py Wed Feb 05 16:16:15 2020 -0500 @@ -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: