Patchwork D2234: narrow: restrict manifest iteration by using manifest.walk(matcher)

login
register
mail settings
Submitter phabricator
Date Feb. 13, 2018, 10:42 p.m.
Message ID <differential-rev-PHID-DREV-i2mdvbj5k7ai7otgjf2n-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27850/
State Superseded
Headers show

Comments

phabricator - Feb. 13, 2018, 10:42 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This is only for root nodes, so it shouldn't really matter (they're
  rarely huge), but seems cleaner.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2234

AFFECTED FILES
  hgext/narrow/narrowbundle2.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

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 @@ 
             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]: