mercurial/store.py
changeset 46854 6afb5ef1e776
parent 46853 eed3e2b79b48
child 46895 6085b7f1536d
equal deleted inserted replaced
46853:eed3e2b79b48 46854:6afb5ef1e776
   409         self.opener = self.vfs
   409         self.opener = self.vfs
   410 
   410 
   411     def join(self, f):
   411     def join(self, f):
   412         return self.path + b'/' + encodedir(f)
   412         return self.path + b'/' + encodedir(f)
   413 
   413 
   414     def _walk(self, relpath, recurse, filefilter=isrevlog):
   414     def _walk(self, relpath, recurse):
   415         '''yields (unencoded, encoded, size)'''
   415         '''yields (unencoded, encoded, size)'''
   416         path = self.path
   416         path = self.path
   417         if relpath:
   417         if relpath:
   418             path += b'/' + relpath
   418             path += b'/' + relpath
   419         striplen = len(self.path) + 1
   419         striplen = len(self.path) + 1
   423             readdir = self.rawvfs.readdir
   423             readdir = self.rawvfs.readdir
   424             while visit:
   424             while visit:
   425                 p = visit.pop()
   425                 p = visit.pop()
   426                 for f, kind, st in readdir(p, stat=True):
   426                 for f, kind, st in readdir(p, stat=True):
   427                     fp = p + b'/' + f
   427                     fp = p + b'/' + f
   428                     if filefilter(f, kind, st):
   428                     if isrevlog(f, kind, st):
   429                         n = util.pconvert(fp[striplen:])
   429                         n = util.pconvert(fp[striplen:])
   430                         l.append((decodedir(n), n, st.st_size))
   430                         l.append((decodedir(n), n, st.st_size))
   431                     elif kind == stat.S_IFDIR and recurse:
   431                     elif kind == stat.S_IFDIR and recurse:
   432                         visit.append(fp)
   432                         visit.append(fp)
   433         l.sort()
   433         l.sort()