##// END OF EJS Templates
manifestdict: inline _intersectfiles()...
Martin von Zweigbergk -
r24666:3092885b default
parent child Browse files
Show More
@@ -198,17 +198,6 class manifestdict(object):
198 198 def keys(self):
199 199 return list(self.iterkeys())
200 200
201 def _intersectfiles(self, files):
202 '''make a new lazymanifest with the intersection of self with files
203
204 The algorithm assumes that files is much smaller than self.'''
205 ret = manifestdict()
206 lm = self._lm
207 for fn in files:
208 if fn in lm:
209 ret._lm[fn] = lm[fn]
210 return ret
211
212 201 def filesnotin(self, m2):
213 202 '''Set of files in this manifest that are not in the other'''
214 203 files = set(self)
@@ -265,7 +254,12 class manifestdict(object):
265 254 files = match.files()
266 255 if (len(files) < 100 and (match.isexact() or
267 256 (not match.anypats() and util.all(fn in self for fn in files)))):
268 return self._intersectfiles(files)
257 m = manifestdict()
258 lm = self._lm
259 for fn in match.files():
260 if fn in lm:
261 m._lm[fn] = lm[fn]
262 return m
269 263
270 264 m = manifestdict('')
271 265 m._lm = self._lm.filtercopy(match)
General Comments 0
You need to be logged in to leave comments. Login now