##// END OF EJS Templates
treemanifest: use visitchildrenset when doing a walk...
Kyle Lippincott -
r39558:3ba9ef0f default
parent child Browse files
Show More
@@ -1036,20 +1036,22 b' class treemanifest(object):'
1036
1036
1037 def _walk(self, match):
1037 def _walk(self, match):
1038 '''Recursively generates matching file names for walk().'''
1038 '''Recursively generates matching file names for walk().'''
1039 if not match.visitdir(self._dir[:-1] or '.'):
1039 visit = match.visitchildrenset(self._dir[:-1] or '.')
1040 if not visit:
1040 return
1041 return
1041
1042
1042 # yield this dir's files and walk its submanifests
1043 # yield this dir's files and walk its submanifests
1043 self._load()
1044 self._load()
1044 self._loadalllazy()
1045 visit = self._loadchildrensetlazy(visit)
1045 for p in sorted(list(self._dirs) + list(self._files)):
1046 for p in sorted(list(self._dirs) + list(self._files)):
1046 if p in self._files:
1047 if p in self._files:
1047 fullp = self._subpath(p)
1048 fullp = self._subpath(p)
1048 if match(fullp):
1049 if match(fullp):
1049 yield fullp
1050 yield fullp
1050 else:
1051 else:
1051 for f in self._dirs[p]._walk(match):
1052 if not visit or p[:-1] in visit:
1052 yield f
1053 for f in self._dirs[p]._walk(match):
1054 yield f
1053
1055
1054 def matches(self, match):
1056 def matches(self, match):
1055 '''generate a new manifest filtered by the match argument'''
1057 '''generate a new manifest filtered by the match argument'''
General Comments 0
You need to be logged in to leave comments. Login now