##// END OF EJS Templates
store: pass matcher to store.datafiles()...
Pulkit Goyal -
r40376:2d45b549 default
parent child Browse files
Show More
@@ -359,17 +359,21 b' class basicstore(object):'
359 359 l.sort()
360 360 return l
361 361
362 def datafiles(self):
362 def datafiles(self, matcher=None):
363 363 return self._walk('data', True) + self._walk('meta', True)
364 364
365 365 def topfiles(self):
366 366 # yield manifest before changelog
367 367 return reversed(self._walk('', False))
368 368
369 def walk(self):
370 '''yields (unencoded, encoded, size)'''
369 def walk(self, matcher=None):
370 '''yields (unencoded, encoded, size)
371
372 if a matcher is passed, storage files of only those tracked paths
373 are passed with matches the matcher
374 '''
371 375 # yield data files first
372 for x in self.datafiles():
376 for x in self.datafiles(matcher):
373 377 yield x
374 378 for x in self.topfiles():
375 379 yield x
@@ -407,7 +411,7 b' class encodedstore(basicstore):'
407 411 self.vfs = vfsmod.filtervfs(vfs, encodefilename)
408 412 self.opener = self.vfs
409 413
410 def datafiles(self):
414 def datafiles(self, matcher=None):
411 415 for a, b, size in super(encodedstore, self).datafiles():
412 416 try:
413 417 a = decodefilename(a)
@@ -536,7 +540,7 b' class fncachestore(basicstore):'
536 540 def getsize(self, path):
537 541 return self.rawvfs.stat(path).st_size
538 542
539 def datafiles(self):
543 def datafiles(self, matcher=None):
540 544 for f in sorted(self.fncache):
541 545 ef = self.encode(f)
542 546 try:
General Comments 0
You need to be logged in to leave comments. Login now