Show More
@@ -319,6 +319,9 b' def _calcmode(vfs):' | |||||
319 | _data = ('data meta 00manifest.d 00manifest.i 00changelog.d 00changelog.i' |
|
319 | _data = ('data meta 00manifest.d 00manifest.i 00changelog.d 00changelog.i' | |
320 | ' phaseroots obsstore') |
|
320 | ' phaseroots obsstore') | |
321 |
|
321 | |||
|
322 | def isrevlog(f, kind, st): | |||
|
323 | return kind == stat.S_IFREG and f[-2:] in ('.i', '.d') | |||
|
324 | ||||
322 | class basicstore(object): |
|
325 | class basicstore(object): | |
323 | '''base class for local repository stores''' |
|
326 | '''base class for local repository stores''' | |
324 | def __init__(self, path, vfstype): |
|
327 | def __init__(self, path, vfstype): | |
@@ -333,7 +336,7 b' class basicstore(object):' | |||||
333 | def join(self, f): |
|
336 | def join(self, f): | |
334 | return self.path + '/' + encodedir(f) |
|
337 | return self.path + '/' + encodedir(f) | |
335 |
|
338 | |||
336 | def _walk(self, relpath, recurse): |
|
339 | def _walk(self, relpath, recurse, filefilter=isrevlog): | |
337 | '''yields (unencoded, encoded, size)''' |
|
340 | '''yields (unencoded, encoded, size)''' | |
338 | path = self.path |
|
341 | path = self.path | |
339 | if relpath: |
|
342 | if relpath: | |
@@ -347,7 +350,7 b' class basicstore(object):' | |||||
347 | p = visit.pop() |
|
350 | p = visit.pop() | |
348 | for f, kind, st in readdir(p, stat=True): |
|
351 | for f, kind, st in readdir(p, stat=True): | |
349 | fp = p + '/' + f |
|
352 | fp = p + '/' + f | |
350 | if kind == stat.S_IFREG and f[-2:] in ('.d', '.i'): |
|
353 | if filefilter(f, kind, st): | |
351 | n = util.pconvert(fp[striplen:]) |
|
354 | n = util.pconvert(fp[striplen:]) | |
352 | l.append((decodedir(n), n, st.st_size)) |
|
355 | l.append((decodedir(n), n, st.st_size)) | |
353 | elif kind == stat.S_IFDIR and recurse: |
|
356 | elif kind == stat.S_IFDIR and recurse: |
General Comments 0
You need to be logged in to leave comments.
Login now