# HG changeset patch # User Martin von Zweigbergk # Date 2018-02-13 21:50:24 # Node ID 2ad527f7d27ad6a5f14a8656923290c8a0c9594e # Parent c407ccd06abdd44c3d695d601907e4a6a06dfcd4 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 diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py --- a/hgext/narrow/narrowbundle2.py +++ b/hgext/narrow/narrowbundle2.py @@ -152,7 +152,7 @@ def _computeellipsis(repo, common, heads 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]: