hgext/lfs/blobstore.py
changeset 35526 e8f80529abeb
parent 35525 83903433c2eb
child 35537 58fda95a0202
equal deleted inserted replaced
35525:83903433c2eb 35526:e8f80529abeb
   260         headers = obj['actions'][action].get('header', {}).items()
   260         headers = obj['actions'][action].get('header', {}).items()
   261 
   261 
   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:
   271             request.add_header(k, v)
   271             request.add_header(k, v)
   272 
   272