narrow: restrict manifest iteration by using manifest.walk(matcher)
This is only for root nodes, so it shouldn't really matter (they're
rarely huge), but seems cleaner.
Differential Revision: https://phab.mercurial-scm.org/D2234
--- a/hgext/narrow/narrowbundle2.py Tue Feb 13 13:16:06 2018 -0800
+++ b/hgext/narrow/narrowbundle2.py Tue Feb 13 13:50:24 2018 -0800
@@ -152,7 +152,7 @@
else:
# For a root node, we need to include the node if any
# files in the node match the narrowspec.
- needed = any(match(f) for f in curmf)
+ needed = any(curmf.walk(match))
if needed:
for head in ellipsisheads[rev]: