Mercurial > hg > mercurial-source
annotate tests/test-lfs-serve-access.t @ 38551:ab04972a33ef
lfs: enable the final download count status message
At this point, I think all of the core commands are prefetching, except grep and
verify. Verify will need some special handling, in case the revlogs are
corrupt.
Grep has an issue that still needs to be debugged, but we probably need to give
the behavior some thought too- it would be a shame to have to download
everything in order to search. I think the benefit of having this info for all
commands outweighs extra printing in a command that is arguably not well
behaved in this context anyway.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 14 Apr 2018 21:16:35 -0400 |
parents | 10e5bb9678f4 |
children | 925707ac2855 |
rev | line source |
---|---|
38134
f4e84dfc06fd
tests: skip largefiles and lfs tests when using simple store
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38034
diff
changeset
|
1 #require serve no-reposimplestore |
38034
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
2 |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
3 $ cat >> $HGRCPATH <<EOF |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
4 > [extensions] |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
5 > lfs= |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
6 > [lfs] |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
7 > track=all() |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
8 > [web] |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
9 > push_ssl = False |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
10 > allow-push = * |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
11 > EOF |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
12 |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
13 Serving LFS files can experimentally be turned off. The long term solution is |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
14 to support the 'verify' action in both client and server, so that the server can |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
15 tell the client to store files elsewhere. |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
16 |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
17 $ hg init server |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
18 $ hg --config "lfs.usercache=$TESTTMP/servercache" \ |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
19 > --config experimental.lfs.serve=False -R server serve -d \ |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
20 > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
21 $ cat hg.pid >> $DAEMON_PIDS |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
22 |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
23 Uploads fail... |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
24 |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
25 $ hg init client |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
26 $ echo 'this-is-an-lfs-file' > client/lfs.bin |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
27 $ hg -R client ci -Am 'initial commit' |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
28 adding lfs.bin |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
29 $ hg -R client push http://localhost:$HGPORT |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
30 pushing to http://localhost:$HGPORT/ |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
31 searching for changes |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
32 abort: LFS HTTP error: HTTP Error 400: no such method: .git (action=upload)! |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
33 [255] |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
34 |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
35 ... so do a local push to make the data available. Remove the blob from the |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
36 default cache, so it attempts to download. |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
37 $ hg --config "lfs.usercache=$TESTTMP/servercache" \ |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
38 > --config "lfs.url=null://" \ |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
39 > -R client push -q server |
38403
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
40 $ mv `hg config lfs.usercache` $TESTTMP/servercache |
38034
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
41 |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
42 Downloads fail... |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
43 |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
44 $ hg clone http://localhost:$HGPORT httpclone |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
45 requesting all changes |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
46 adding changesets |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
47 adding manifests |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
48 adding file changes |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
49 added 1 changesets with 1 changes to 1 files |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
50 new changesets 525251863cad |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
51 updating to branch default |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
52 abort: LFS HTTP error: HTTP Error 400: no such method: .git (action=download)! |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
53 [255] |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
54 |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
55 $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
56 |
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
57 $ cat $TESTTMP/access.log $TESTTMP/errors.log |
38342
b77aa48ba690
httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38284
diff
changeset
|
58 $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
38284
aacfca6f9767
wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents:
38134
diff
changeset
|
59 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
aacfca6f9767
wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents:
38134
diff
changeset
|
60 $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
aacfca6f9767
wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents:
38134
diff
changeset
|
61 $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
38034
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
62 $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob) |
38342
b77aa48ba690
httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38284
diff
changeset
|
63 $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
38284
aacfca6f9767
wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents:
38134
diff
changeset
|
64 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
aacfca6f9767
wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents:
38134
diff
changeset
|
65 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
38034
dfb38c4850a9
lfs: add an experimental knob to disable blob serving
Matt Harbison <matt_harbison@yahoo.com>
parents:
diff
changeset
|
66 $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob) |
38403
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
67 |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
68 Blob URIs are correct when --prefix is used |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
69 |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
70 $ rm -f $TESTTMP/access.log $TESTTMP/errors.log |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
71 $ hg --config "lfs.usercache=$TESTTMP/servercache" -R server serve -d \ |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
72 > -p $HGPORT --pid-file=hg.pid --prefix=subdir/mount/point \ |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
73 > -A $TESTTMP/access.log -E $TESTTMP/errors.log |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
74 $ cat hg.pid >> $DAEMON_PIDS |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
75 |
38477
d241e6632669
lfs: fix the inferred remote store path when using a --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38476
diff
changeset
|
76 $ hg clone --debug http://localhost:$HGPORT/subdir/mount/point cloned2 |
38403
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
77 using http://localhost:$HGPORT/subdir/mount/point |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
78 sending capabilities command |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
79 query 1; heads |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
80 sending batch command |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
81 requesting all changes |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
82 sending getbundle command |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
83 bundle2-input-bundle: with-transaction |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
84 bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
85 adding changesets |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
86 add changeset 525251863cad |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
87 adding manifests |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
88 adding file changes |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
89 adding lfs.bin revisions |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
90 added 1 changesets with 1 changes to 1 files |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
91 calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
92 bundle2-input-part: total payload size 648 |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
93 bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
94 bundle2-input-part: "phase-heads" supported |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
95 bundle2-input-part: total payload size 24 |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
96 bundle2-input-part: "cache:rev-branch-cache" supported |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
97 bundle2-input-part: total payload size 39 |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
98 bundle2-input-bundle: 3 parts total |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
99 checking for updated bookmarks |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
100 updating the branch cache |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
101 new changesets 525251863cad |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
102 updating to branch default |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
103 resolving manifests |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
104 branchmerge: False, force: False, partial: False |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
105 ancestor: 000000000000, local: 000000000000+, remote: 525251863cad |
38477
d241e6632669
lfs: fix the inferred remote store path when using a --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38476
diff
changeset
|
106 lfs: assuming remote store: http://localhost:$HGPORT/subdir/mount/point/.git/info/lfs |
38403
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
107 Status: 200 |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
108 Content-Length: 371 |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
109 Content-Type: application/vnd.git-lfs+json |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
110 Date: $HTTP_DATE$ |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
111 Server: testing stub value |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
112 { |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
113 "objects": [ |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
114 { |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
115 "actions": { |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
116 "download": { |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
117 "expires_at": "$ISO_8601_DATE_TIME$" |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
118 "header": { |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
119 "Accept": "application/vnd.git-lfs" |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
120 } |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
121 "href": "http://localhost:$HGPORT/subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e" |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
122 } |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
123 } |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
124 "oid": "f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e" |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
125 "size": 20 |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
126 } |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
127 ] |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
128 "transfer": "basic" |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
129 } |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
130 lfs: downloading f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e (20 bytes) |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
131 Status: 200 |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
132 Content-Length: 20 |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
133 Content-Type: application/octet-stream |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
134 Date: $HTTP_DATE$ |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
135 Server: testing stub value |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
136 lfs: adding f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e to the usercache |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
137 lfs: processed: f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e |
38551
ab04972a33ef
lfs: enable the final download count status message
Matt Harbison <matt_harbison@yahoo.com>
parents:
38478
diff
changeset
|
138 lfs: downloaded 1 files (20 bytes) |
38403
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
139 lfs.bin: remote created -> g |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
140 getting lfs.bin |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
141 lfs: found f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e in the local lfs store |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
142 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
143 |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
144 $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
145 |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
146 $ cat $TESTTMP/access.log $TESTTMP/errors.log |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
147 $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=capabilities HTTP/1.1" 200 - (glob) |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
148 $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
149 $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
150 $LOCALIP - - [$LOGDATE$] "POST /subdir/mount/point/.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
b03f2e0fdb88
lfs: teach the blob server to handle --prefix
Matt Harbison <matt_harbison@yahoo.com>
parents:
38342
diff
changeset
|
151 $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e HTTP/1.1" 200 - (glob) |
38475
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
152 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
153 $ cat >> $TESTTMP/lfsstoreerror.py <<EOF |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
154 > import errno |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
155 > from hgext.lfs import blobstore |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
156 > |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
157 > _numverifies = 0 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
158 > _readerr = True |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
159 > |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
160 > def reposetup(ui, repo): |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
161 > # Nothing to do with a remote repo |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
162 > if not repo.local(): |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
163 > return |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
164 > |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
165 > store = repo.svfs.lfslocalblobstore |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
166 > class badstore(store.__class__): |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
167 > def download(self, oid, src): |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
168 > '''Called in the server to handle reading from the client in a |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
169 > PUT request.''' |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
170 > origread = src.read |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
171 > def _badread(nbytes): |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
172 > # Simulate bad data/checksum failure from the client |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
173 > return b'0' * len(origread(nbytes)) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
174 > src.read = _badread |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
175 > super(badstore, self).download(oid, src) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
176 > |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
177 > def _read(self, vfs, oid, verify): |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
178 > '''Called in the server to read data for a GET request, and then |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
179 > calls self._verify() on it before returning.''' |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
180 > global _readerr |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
181 > # One time simulation of a read error |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
182 > if _readerr: |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
183 > _readerr = False |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
184 > raise IOError(errno.EIO, '%s: I/O error' % oid) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
185 > # Simulate corrupt content on client download |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
186 > blobstore._verify(oid, 'dummy content') |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
187 > |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
188 > def verify(self, oid): |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
189 > '''Called in the server to populate the Batch API response, |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
190 > letting the client re-upload if the file is corrupt.''' |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
191 > # Fail verify in Batch API for one clone command and one push |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
192 > # command with an IOError. Then let it through to access other |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
193 > # functions. Checksum failure is tested elsewhere. |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
194 > global _numverifies |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
195 > _numverifies += 1 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
196 > if _numverifies <= 2: |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
197 > raise IOError(errno.EIO, '%s: I/O error' % oid) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
198 > return super(badstore, self).verify(oid) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
199 > |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
200 > store.__class__ = badstore |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
201 > EOF |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
202 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
203 $ rm -rf `hg config lfs.usercache` |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
204 $ rm -f $TESTTMP/access.log $TESTTMP/errors.log |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
205 $ hg --config "lfs.usercache=$TESTTMP/servercache" \ |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
206 > --config extensions.lfsstoreerror=$TESTTMP/lfsstoreerror.py \ |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
207 > -R server serve -d \ |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
208 > -p $HGPORT1 --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
209 $ cat hg.pid >> $DAEMON_PIDS |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
210 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
211 Test an I/O error in localstore.verify() (Batch API) with GET |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
212 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
213 $ hg clone http://localhost:$HGPORT1 httpclone2 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
214 requesting all changes |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
215 adding changesets |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
216 adding manifests |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
217 adding file changes |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
218 added 1 changesets with 1 changes to 1 files |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
219 new changesets 525251863cad |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
220 updating to branch default |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
221 abort: LFS server error for "lfs.bin": Internal server error! |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
222 [255] |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
223 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
224 Test an I/O error in localstore.verify() (Batch API) with PUT |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
225 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
226 $ echo foo > client/lfs.bin |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
227 $ hg -R client ci -m 'mod lfs' |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
228 $ hg -R client push http://localhost:$HGPORT1 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
229 pushing to http://localhost:$HGPORT1/ |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
230 searching for changes |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
231 abort: LFS server error for "unknown": Internal server error! |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
232 [255] |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
233 TODO: figure out how to associate the file name in the error above |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
234 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
235 Test a bad checksum sent by the client in the transfer API |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
236 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
237 $ hg -R client push http://localhost:$HGPORT1 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
238 pushing to http://localhost:$HGPORT1/ |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
239 searching for changes |
38478
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
240 abort: HTTP error: HTTP Error 422: corrupt blob (oid=b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c, action=upload)! |
38475
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
241 [255] |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
242 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
243 $ echo 'test lfs file' > server/lfs3.bin |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
244 $ hg --config experimental.lfs.disableusercache=True \ |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
245 > -R server ci -Aqm 'another lfs file' |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
246 $ hg -R client pull -q http://localhost:$HGPORT1 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
247 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
248 Test an I/O error during the processing of the GET request |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
249 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
250 $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs \ |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
251 > -R client update -r tip |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
252 abort: HTTP error: HTTP Error 500: Internal Server Error (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
253 [255] |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
254 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
255 Test a checksum failure during the processing of the GET request |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
256 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
257 $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs \ |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
258 > -R client update -r tip |
38478
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
259 abort: HTTP error: HTTP Error 422: corrupt blob (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! |
38475
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
260 [255] |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
261 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
262 $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
263 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
264 $ cat $TESTTMP/access.log |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
265 $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
266 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
267 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
268 $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
269 $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
270 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
271 $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
272 $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
273 $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
274 $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
275 $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
276 $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
277 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
278 $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
279 $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
280 $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
281 $LOCALIP - - [$LOGDATE$] "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
282 $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
38478
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
283 $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c HTTP/1.1" 422 - (glob) |
38475
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
284 $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
285 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D392c05922088bacf8e68a6939b480017afbf245d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
286 $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=525251863cad618e55d483555f3d00a2ca99597e&heads=506bf3d83f78c54b89e81c6411adee19fdf02156+525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
287 $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
288 $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 500 - (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
289 $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
38478
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
290 $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 422 - (glob) |
38475
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
291 |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
292 $ grep -v ' File "' $TESTTMP/errors.log |
38476
726c4102db9e
lfs: log information about Internal Server Errors reported in the Batch API
Matt Harbison <matt_harbison@yahoo.com>
parents:
38475
diff
changeset
|
293 $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob) |
726c4102db9e
lfs: log information about Internal Server Errors reported in the Batch API
Matt Harbison <matt_harbison@yahoo.com>
parents:
38475
diff
changeset
|
294 $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
726c4102db9e
lfs: log information about Internal Server Errors reported in the Batch API
Matt Harbison <matt_harbison@yahoo.com>
parents:
38475
diff
changeset
|
295 $LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob) |
726c4102db9e
lfs: log information about Internal Server Errors reported in the Batch API
Matt Harbison <matt_harbison@yahoo.com>
parents:
38475
diff
changeset
|
296 $LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, '%s: I/O error' % oid) (glob) |
726c4102db9e
lfs: log information about Internal Server Errors reported in the Batch API
Matt Harbison <matt_harbison@yahoo.com>
parents:
38475
diff
changeset
|
297 $LOCALIP - - [$ERRDATE$] HG error: IOError: [Errno 5] f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e: I/O error (glob) |
726c4102db9e
lfs: log information about Internal Server Errors reported in the Batch API
Matt Harbison <matt_harbison@yahoo.com>
parents:
38475
diff
changeset
|
298 $LOCALIP - - [$ERRDATE$] HG error: (glob) |
726c4102db9e
lfs: log information about Internal Server Errors reported in the Batch API
Matt Harbison <matt_harbison@yahoo.com>
parents:
38475
diff
changeset
|
299 $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob) |
726c4102db9e
lfs: log information about Internal Server Errors reported in the Batch API
Matt Harbison <matt_harbison@yahoo.com>
parents:
38475
diff
changeset
|
300 $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
726c4102db9e
lfs: log information about Internal Server Errors reported in the Batch API
Matt Harbison <matt_harbison@yahoo.com>
parents:
38475
diff
changeset
|
301 $LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob) |
726c4102db9e
lfs: log information about Internal Server Errors reported in the Batch API
Matt Harbison <matt_harbison@yahoo.com>
parents:
38475
diff
changeset
|
302 $LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, '%s: I/O error' % oid) (glob) |
726c4102db9e
lfs: log information about Internal Server Errors reported in the Batch API
Matt Harbison <matt_harbison@yahoo.com>
parents:
38475
diff
changeset
|
303 $LOCALIP - - [$ERRDATE$] HG error: IOError: [Errno 5] b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c: I/O error (glob) |
726c4102db9e
lfs: log information about Internal Server Errors reported in the Batch API
Matt Harbison <matt_harbison@yahoo.com>
parents:
38475
diff
changeset
|
304 $LOCALIP - - [$ERRDATE$] HG error: (glob) |
38478
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
305 $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c': (glob) |
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
306 $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
307 $LOCALIP - - [$ERRDATE$] HG error: localstore.download(oid, req.bodyfh) (glob) |
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
308 $LOCALIP - - [$ERRDATE$] HG error: super(badstore, self).download(oid, src) (glob) |
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
309 $LOCALIP - - [$ERRDATE$] HG error: % oid) (glob) |
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
310 $LOCALIP - - [$ERRDATE$] HG error: LfsCorruptionError: corrupt remote lfs object: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c (glob) |
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
311 $LOCALIP - - [$ERRDATE$] HG error: (glob) |
38475
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
312 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
313 Traceback (most recent call last): |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
314 self.do_write() |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
315 self.do_hgweb() |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
316 for chunk in self.server.application(env, self._start_response): |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
317 for r in self._runwsgi(req, res, repo): |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
318 rctx, req, res, self.check_perm) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
319 return func(*(args + a), **kw) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
320 lambda perm: |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
321 res.setbodybytes(localstore.read(oid)) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
322 blob = self._read(self.vfs, oid, verify) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
323 raise IOError(errno.EIO, '%s: I/O error' % oid) |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
324 IOError: [Errno 5] 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d: I/O error |
a7dbda94c86a
test-lfs: add tests to force server error path coverage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38403
diff
changeset
|
325 |
38478
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
326 $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob) |
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
327 $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
328 $LOCALIP - - [$ERRDATE$] HG error: res.setbodybytes(localstore.read(oid)) (glob) |
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
329 $LOCALIP - - [$ERRDATE$] HG error: blob = self._read(self.vfs, oid, verify) (glob) |
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
330 $LOCALIP - - [$ERRDATE$] HG error: blobstore._verify(oid, 'dummy content') (glob) |
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
331 $LOCALIP - - [$ERRDATE$] HG error: hint=_('run hg verify')) (glob) |
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
332 $LOCALIP - - [$ERRDATE$] HG error: LfsCorruptionError: detected corrupt lfs object: 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d (glob) |
10e5bb9678f4
lfs: gracefully handle aborts on the server when corrupt blobs are detected
Matt Harbison <matt_harbison@yahoo.com>
parents:
38477
diff
changeset
|
333 $LOCALIP - - [$ERRDATE$] HG error: (glob) |