changeset 36209:2ad527f7d27a

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
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 13 Feb 2018 13:50:24 -0800
parents c407ccd06abd
children 5c9bdfb32eac
files hgext/narrow/narrowbundle2.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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]: