largefiles: refactoring - use findfile in localstore._getfile

This commit is contained in:
Mads Kiilerich 2013-04-15 23:35:43 +02:00
parent 9fb2d6a4da
commit cb8479f469

View File

@ -36,11 +36,8 @@ class localstore(basestore.basestore):
def _getfile(self, tmpfile, filename, hash):
if lfutil.instore(self.remote, hash):
path = lfutil.storepath(self.remote, hash)
elif lfutil.inusercache(self.ui, hash):
path = lfutil.usercachepath(self.ui, hash)
else:
path = lfutil.findfile(self.remote, hash)
if not path:
raise basestore.StoreError(filename, hash, self.url,
_("can't get file locally"))
fd = open(path, 'rb')