comparison mercurial/context.py @ 44263:beea86e4d332

context: use manifest.walk() instead of manifest.match() to get file list 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. Differential Revision: https://phab.mercurial-scm.org/D8080
author Augie Fackler <augie@google.com>
date Wed, 05 Feb 2020 15:15:18 -0500
parents 98349eddceef
children 2e2cfc3bea0b
comparison
equal deleted inserted replaced
44262:c86256bd4eb8 44263:beea86e4d332
2355 fail(path, component) 2355 fail(path, component)
2356 2356
2357 # Test the other direction -- that this path from p2 isn't a directory 2357 # Test the other direction -- that this path from p2 isn't a directory
2358 # in p1 (test that p1 doesn't have any paths matching `path/*`). 2358 # in p1 (test that p1 doesn't have any paths matching `path/*`).
2359 match = self.match([path], default=b'path') 2359 match = self.match([path], default=b'path')
2360 matches = self.p1().manifest().matches(match) 2360 mfiles = list(self.p1().manifest().walk(match))
2361 mfiles = matches.keys()
2362 if len(mfiles) > 0: 2361 if len(mfiles) > 0:
2363 if len(mfiles) == 1 and mfiles[0] == path: 2362 if len(mfiles) == 1 and mfiles[0] == path:
2364 return 2363 return
2365 # omit the files which are deleted in current IMM wctx 2364 # omit the files which are deleted in current IMM wctx
2366 mfiles = [m for m in mfiles if m in self] 2365 mfiles = [m for m in mfiles if m in self]