mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
largefiles: refactoring - use findfile in localstore._getfile
This commit is contained in:
parent
9fb2d6a4da
commit
cb8479f469
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user