##// END OF EJS Templates
lfs: use the local store method for opening a blob...
Matt Harbison -
r35544:e8f80529 default
parent child Browse files
Show More
@@ -262,9 +262,9 b' class _gitlfsremote(object):'
262 request = util.urlreq.request(href)
262 request = util.urlreq.request(href)
263 if action == 'upload':
263 if action == 'upload':
264 # If uploading blobs, read data from local blobstore.
264 # If uploading blobs, read data from local blobstore.
265 with localstore.vfs(oid) as fp:
265 with localstore.open(oid) as fp:
266 _verifyfile(oid, fp)
266 _verifyfile(oid, fp)
267 request.data = filewithprogress(localstore.vfs(oid), None)
267 request.data = filewithprogress(localstore.open(oid), None)
268 request.get_method = lambda: 'PUT'
268 request.get_method = lambda: 'PUT'
269
269
270 for k, v in headers:
270 for k, v in headers:
@@ -38,7 +38,11 b''
38 $ echo THIS-IS-LFS > a
38 $ echo THIS-IS-LFS > a
39 $ hg commit -m a -A a
39 $ hg commit -m a -A a
40
40
41 A push can be serviced directly from the usercache if it isn't in the local
42 store.
43
41 $ hg init ../repo2
44 $ hg init ../repo2
45 $ mv .hg/store/lfs .hg/store/lfs_
42 $ hg push ../repo2 -v
46 $ hg push ../repo2 -v
43 pushing to ../repo2
47 pushing to ../repo2
44 searching for changes
48 searching for changes
@@ -54,6 +58,7 b''
54 adding file changes
58 adding file changes
55 added 1 changesets with 1 changes to 1 files
59 added 1 changesets with 1 changes to 1 files
56 calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs
60 calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs
61 $ mv .hg/store/lfs_ .hg/store/lfs
57
62
58 Clear the cache to force a download
63 Clear the cache to force a download
59 $ rm -rf `hg config lfs.usercache`
64 $ rm -rf `hg config lfs.usercache`
General Comments 0
You need to be logged in to leave comments. Login now