##// END OF EJS Templates
lfs: add a local store method for opening a blob...
Matt Harbison -
r35543:83903433 default
parent child Browse files
Show More
@@ -100,6 +100,14 b' class local(object):'
100 self.cachevfs = lfsvfs(usercache)
100 self.cachevfs = lfsvfs(usercache)
101 self.ui = repo.ui
101 self.ui = repo.ui
102
102
103 def open(self, oid):
104 """Open a read-only file descriptor to the named blob, in either the
105 usercache or the local store."""
106 if self.cachevfs.exists(oid):
107 return self.cachevfs(oid, 'rb')
108
109 return self.vfs(oid, 'rb')
110
103 def write(self, oid, data, verify=True):
111 def write(self, oid, data, verify=True):
104 """Write blob to local blobstore."""
112 """Write blob to local blobstore."""
105 if verify:
113 if verify:
General Comments 0
You need to be logged in to leave comments. Login now