comparison hgext/lfs/__init__.py @ 37564:31a4ea773369

lfs: infer the blob store URL from an explicit push dest or default-push Unlike pull, the blobs are uploaded within the exchange.push() window, so simply wrap it and swap in a properly configured remote store. The '_subtoppath' field shouldn't be available during this window, but give the passed path priority for clarity. At one point I hit an AttributeError in one of the convert tests when trying to save the original remote blobstore when the swap was run unconditionally. I wrapped it in a util.safehasattr(), but then today I wasn't able to reproduce it. But now the whole thing is tucked under the requirement guard because without the requirement, there are no blobs in the repo, even if the extension is loaded.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 08 Apr 2018 14:22:12 -0400
parents e5cd8d1a094d
children b4d85bc122bd
comparison
equal deleted inserted replaced
37563:be1cc65bdb1c 37564:31a4ea773369
85 # Remote endpoint. Multiple protocols are supported: 85 # Remote endpoint. Multiple protocols are supported:
86 # - http(s)://user:pass@example.com/path 86 # - http(s)://user:pass@example.com/path
87 # git-lfs endpoint 87 # git-lfs endpoint
88 # - file:///tmp/path 88 # - file:///tmp/path
89 # local filesystem, usually for testing 89 # local filesystem, usually for testing
90 # if unset, lfs will assume the repository at ``paths.default`` also handles 90 # if unset, lfs will assume the remote repository also handles blob storage
91 # blob storage for http(s) URLs. Otherwise, lfs will prompt to set this 91 # for http(s) URLs. Otherwise, lfs will prompt to set this when it must
92 # when it must use this value. 92 # use this value.
93 # (default: unset) 93 # (default: unset)
94 url = https://example.com/repo.git/info/lfs 94 url = https://example.com/repo.git/info/lfs
95 95
96 # Which files to track in LFS. Path tests are "**.extname" for file 96 # Which files to track in LFS. Path tests are "**.extname" for file
97 # extensions, and "path:under/some/directory" for path prefix. Both 97 # extensions, and "path:under/some/directory" for path prefix. Both