mercurial/store.py
changeset 17731 c85dbae29684
parent 17728 004bd533880d
child 17738 b8424c92ba2b
equal deleted inserted replaced
17730:6c6987761e42 17731:c85dbae29684
   468         self.opener = self.vfs
   468         self.opener = self.vfs
   469 
   469 
   470     def join(self, f):
   470     def join(self, f):
   471         return self.pathsep + self.encode(f)
   471         return self.pathsep + self.encode(f)
   472 
   472 
       
   473     def getsize(self, path):
       
   474         return self.rawvfs.stat(path).st_size
       
   475 
   473     def datafiles(self):
   476     def datafiles(self):
   474         rewrite = False
   477         rewrite = False
   475         existing = []
   478         existing = []
   476         getstat = self.rawvfs.stat
       
   477         for f in sorted(self.fncache):
   479         for f in sorted(self.fncache):
   478             ef = self.encode(f)
   480             ef = self.encode(f)
   479             try:
   481             try:
   480                 yield f, ef, getstat(ef).st_size
   482                 yield f, ef, self.getsize(ef)
   481                 existing.append(f)
   483                 existing.append(f)
   482             except OSError, err:
   484             except OSError, err:
   483                 if err.errno != errno.ENOENT:
   485                 if err.errno != errno.ENOENT:
   484                     raise
   486                     raise
   485                 # nonexistent entry
   487                 # nonexistent entry