comparison tests/test-lfs-serve-access.t @ 40659:8863f08c1630

lfs: provide more Batch API error info via a hint in the raised exception A coworker had a typo in `lfs.url`, forgot it was even set because usually the blob server is inferred, and then got a 404. It would have been easier to debug with the failing URL printed.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 15 Nov 2018 17:55:01 -0500
parents 6637b079ae45
children 9f78d10742af
comparison
equal deleted inserted replaced
40658:4ec8bee15930 40659:8863f08c1630
27 $ hg -R client ci -Am 'initial commit' 27 $ hg -R client ci -Am 'initial commit'
28 adding lfs.bin 28 adding lfs.bin
29 $ hg -R client push http://localhost:$HGPORT 29 $ hg -R client push http://localhost:$HGPORT
30 pushing to http://localhost:$HGPORT/ 30 pushing to http://localhost:$HGPORT/
31 searching for changes 31 searching for changes
32 abort: LFS HTTP error: HTTP Error 400: no such method: .git (action=upload)! 32 abort: LFS HTTP error: HTTP Error 400: no such method: .git!
33 (api=http://localhost:$HGPORT/.git/info/lfs/objects/batch, action=upload)
33 [255] 34 [255]
34 35
35 ... so do a local push to make the data available. Remove the blob from the 36 ... so do a local push to make the data available. Remove the blob from the
36 default cache, so it attempts to download. 37 default cache, so it attempts to download.
37 $ hg --config "lfs.usercache=$TESTTMP/servercache" \ 38 $ hg --config "lfs.usercache=$TESTTMP/servercache" \
48 adding manifests 49 adding manifests
49 adding file changes 50 adding file changes
50 added 1 changesets with 1 changes to 1 files 51 added 1 changesets with 1 changes to 1 files
51 new changesets 525251863cad 52 new changesets 525251863cad
52 updating to branch default 53 updating to branch default
53 abort: LFS HTTP error: HTTP Error 400: no such method: .git (action=download)! 54 abort: LFS HTTP error: HTTP Error 400: no such method: .git!
55 (api=http://localhost:$HGPORT/.git/info/lfs/objects/batch, action=download)
54 [255] 56 [255]
55 57
56 $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS 58 $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
57 59
58 $ cat $TESTTMP/access.log $TESTTMP/errors.log 60 $ cat $TESTTMP/access.log $TESTTMP/errors.log