comparison tests/test-lfs-serve.t @ 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 be1cc65bdb1c
children b54404d66f7e
comparison
equal deleted inserted replaced
37563:be1cc65bdb1c 37564:31a4ea773369
240 lfs content, and the extension enabled. 240 lfs content, and the extension enabled.
241 241
242 $ echo 'this is another lfs file' > lfs2.txt 242 $ echo 'this is another lfs file' > lfs2.txt
243 $ hg ci -Aqm 'lfs file with lfs client' 243 $ hg ci -Aqm 'lfs file with lfs client'
244 244
245 $ hg push -q 245 $ hg --config paths.default= push -v http://localhost:$HGPORT
246 pushing to http://localhost:$HGPORT/
247 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
248 searching for changes
249 remote has heads on branch 'default' that are not known locally: 8374dc4052cb
250 lfs: uploading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
251 lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
252 lfs: uploaded 1 files (25 bytes)
253 1 changesets found
254 uncompressed size of bundle content:
255 206 (changelog)
256 172 (manifests)
257 275 lfs2.txt
258 remote: adding changesets
259 remote: adding manifests
260 remote: adding file changes
261 remote: added 1 changesets with 1 changes to 1 files
246 $ grep 'lfs' .hg/requires $SERVER_REQUIRES 262 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
247 .hg/requires:lfs 263 .hg/requires:lfs
248 $TESTTMP/server/.hg/requires:lfs 264 $TESTTMP/server/.hg/requires:lfs
249 265
250 $ hg clone -q http://localhost:$HGPORT $TESTTMP/client6_clone 266 $ hg clone -q http://localhost:$HGPORT $TESTTMP/client6_clone