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: