Patchwork D8080: context: use manifest.walk() instead of manifest.match() to get file list

login
register
mail settings
Submitter phabricator
Date Feb. 5, 2020, 10:34 p.m.
Message ID <differential-rev-PHID-DREV-exgc3vdmbhmzm2ps7eef-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44964/
State Superseded
Headers show

Comments

phabricator - Feb. 5, 2020, 10:34 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The former doesn't create a whole extra manifest in order to produce the
  matching file list, which is all we actually cared about here. Sigh.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -2357,8 +2357,7 @@ 
         # Test the other direction -- that this path from p2 isn't a directory
         # in p1 (test that p1 doesn't have any paths matching `path/*`).
         match = self.match([path], default=b'path')
-        matches = self.p1().manifest().matches(match)
-        mfiles = matches.keys()
+        mfiles = list(self.p1().manifest().walk(match))
         if len(mfiles) > 0:
             if len(mfiles) == 1 and mfiles[0] == path:
                 return