mercurial/store.py
changeset 6890 fddef0602859
parent 6840 80e51429cb9a
child 6892 dab95717058d
equal deleted inserted replaced
6889:c0bd7d8b69ef 6890:fddef0602859
    67         '''yields (filename, size)'''
    67         '''yields (filename, size)'''
    68         if relpath:
    68         if relpath:
    69             path = os.path.join(self.path, relpath)
    69             path = os.path.join(self.path, relpath)
    70         else:
    70         else:
    71             path = self.path
    71             path = self.path
       
    72         if not os.path.isdir(path):
       
    73             return
    72         striplen = len(self.path) + len(os.sep)
    74         striplen = len(self.path) + len(os.sep)
    73         filetypes = ('.d', '.i')
    75         filetypes = ('.d', '.i')
    74         for f, size in _dirwalk(path, recurse):
    76         for f, size in _dirwalk(path, recurse):
    75             if (len(f) > 2) and f[-2:] in filetypes:
    77             if (len(f) > 2) and f[-2:] in filetypes:
    76                 yield util.pconvert(f[striplen:]), size
    78                 yield util.pconvert(f[striplen:]), size