Show More
@@ -1,194 +1,200 b'' | |||
|
1 | 1 | # common patterns in test at can safely be replaced |
|
2 | 2 | from __future__ import absolute_import |
|
3 | 3 | |
|
4 | 4 | import os |
|
5 | 5 | |
|
6 | 6 | substitutions = [ |
|
7 | 7 | # list of possible compressions |
|
8 | 8 | (br'(zstd,)?zlib,none,bzip2', |
|
9 | 9 | br'$USUAL_COMPRESSIONS$' |
|
10 | 10 | ), |
|
11 | 11 | (br'=(zstd,)?zlib', |
|
12 | 12 | br'=$BUNDLE2_COMPRESSIONS$' |
|
13 | 13 | ), |
|
14 | 14 | # capabilities sent through http |
|
15 | 15 | (br'bundlecaps=HG20%2Cbundle2%3DHG20%250A' |
|
16 | 16 | br'bookmarks%250A' |
|
17 | 17 | br'changegroup%253D01%252C02%250A' |
|
18 | 18 | br'digests%253Dmd5%252Csha1%252Csha512%250A' |
|
19 | 19 | br'error%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250A' |
|
20 | 20 | br'hgtagsfnodes%250A' |
|
21 | 21 | br'listkeys%250A' |
|
22 | 22 | br'phases%253Dheads%250A' |
|
23 | 23 | br'pushkey%250A' |
|
24 | 24 | br'remote-changegroup%253Dhttp%252Chttps%250A' |
|
25 | 25 | br'rev-branch-cache%250A' |
|
26 | 26 | br'stream%253Dv2', |
|
27 | 27 | # (the replacement patterns) |
|
28 | 28 | br'$USUAL_BUNDLE_CAPS$' |
|
29 | 29 | ), |
|
30 | 30 | (br'bundlecaps=HG20%2Cbundle2%3DHG20%250A' |
|
31 | 31 | br'bookmarks%250A' |
|
32 | 32 | br'changegroup%253D01%252C02%250A' |
|
33 | 33 | br'digests%253Dmd5%252Csha1%252Csha512%250A' |
|
34 | 34 | br'error%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250A' |
|
35 | 35 | br'hgtagsfnodes%250A' |
|
36 | 36 | br'listkeys%250A' |
|
37 | 37 | br'phases%253Dheads%250A' |
|
38 | 38 | br'pushkey%250A' |
|
39 | 39 | br'remote-changegroup%253Dhttp%252Chttps', |
|
40 | 40 | # (the replacement patterns) |
|
41 | 41 | br'$USUAL_BUNDLE_CAPS_SERVER$' |
|
42 | 42 | ), |
|
43 | 43 | # bundle2 capabilities sent through ssh |
|
44 | 44 | (br'bundle2=HG20%0A' |
|
45 | 45 | br'bookmarks%0A' |
|
46 | 46 | br'changegroup%3D01%2C02%0A' |
|
47 | 47 | br'digests%3Dmd5%2Csha1%2Csha512%0A' |
|
48 | 48 | br'error%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0A' |
|
49 | 49 | br'hgtagsfnodes%0A' |
|
50 | 50 | br'listkeys%0A' |
|
51 | 51 | br'phases%3Dheads%0A' |
|
52 | 52 | br'pushkey%0A' |
|
53 | 53 | br'remote-changegroup%3Dhttp%2Chttps%0A' |
|
54 | 54 | br'rev-branch-cache%0A' |
|
55 | 55 | br'stream%3Dv2', |
|
56 | 56 | # (replacement patterns) |
|
57 | 57 | br'$USUAL_BUNDLE2_CAPS$' |
|
58 | 58 | ), |
|
59 | 59 | # bundle2 capabilities advertised by the server |
|
60 | 60 | (br'bundle2=HG20%0A' |
|
61 | 61 | br'bookmarks%0A' |
|
62 | 62 | br'changegroup%3D01%2C02%0A' |
|
63 | 63 | br'digests%3Dmd5%2Csha1%2Csha512%0A' |
|
64 | 64 | br'error%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0A' |
|
65 | 65 | br'hgtagsfnodes%0A' |
|
66 | 66 | br'listkeys%0A' |
|
67 | 67 | br'phases%3Dheads%0A' |
|
68 | 68 | br'pushkey%0A' |
|
69 | 69 | br'remote-changegroup%3Dhttp%2Chttps%0A' |
|
70 | 70 | br'rev-branch-cache', |
|
71 | 71 | # (replacement patterns) |
|
72 | 72 | br'$USUAL_BUNDLE2_CAPS_SERVER$' |
|
73 | 73 | ), |
|
74 | 74 | ( |
|
75 | 75 | br'bundle2=HG20%0A' |
|
76 | 76 | br'bookmarks%0A' |
|
77 | 77 | br'changegroup%3D01%2C02%0A' |
|
78 | 78 | br'digests%3Dmd5%2Csha1%2Csha512%0A' |
|
79 | 79 | br'error%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0A' |
|
80 | 80 | br'hgtagsfnodes%0A' |
|
81 | 81 | br'listkeys%0A' |
|
82 | 82 | br'pushkey%0A' |
|
83 | 83 | br'remote-changegroup%3Dhttp%2Chttps%0A' |
|
84 | 84 | br'rev-branch-cache%0A' |
|
85 | 85 | br'stream%3Dv2', |
|
86 | 86 | # (replacement patterns) |
|
87 | 87 | br'$USUAL_BUNDLE2_CAPS_NO_PHASES$' |
|
88 | 88 | ), |
|
89 | 89 | # HTTP access log dates |
|
90 | 90 | (br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] "(GET|PUT|POST)', |
|
91 | 91 | lambda m: br' - - [$LOGDATE$] "' + m.group(1) |
|
92 | 92 | ), |
|
93 | 93 | # HTTP error log dates |
|
94 | 94 | (br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] (HG error:|Exception)', |
|
95 | 95 | lambda m: br' - - [$ERRDATE$] ' + m.group(1) |
|
96 | 96 | ), |
|
97 | 97 | # HTTP header dates- RFC 1123 |
|
98 | 98 | (br'([Dd]ate): [A-Za-z]{3}, \d\d [A-Za-z]{3} \d{4} \d\d:\d\d:\d\d GMT', |
|
99 | 99 | lambda m: br'%s: $HTTP_DATE$' % m.group(1) |
|
100 | 100 | ), |
|
101 | 101 | # LFS expiration value |
|
102 | 102 | (br'"expires_at": "\d{4}-\d\d-\d\dT\d\d:\d\d:\d\dZ"', |
|
103 | 103 | br'"expires_at": "$ISO_8601_DATE_TIME$"' |
|
104 | 104 | ), |
|
105 | 105 | # Windows has an extra '/' in the following lines that get globbed away: |
|
106 | 106 | # pushing to file:/*/$TESTTMP/r2 (glob) |
|
107 | 107 | # comparing with file:/*/$TESTTMP/r2 (glob) |
|
108 | 108 | # sub/maybelarge.dat: largefile 34..9c not available from |
|
109 | 109 | # file:/*/$TESTTMP/largefiles-repo (glob) |
|
110 | 110 | (br'(.*file:/)/?(/\$TESTTMP.*)', |
|
111 | 111 | lambda m: m.group(1) + b'*' + m.group(2) + b' (glob)' |
|
112 | 112 | ), |
|
113 | 113 | ] |
|
114 | 114 | |
|
115 | 115 | # Various platform error strings, keyed on a common replacement string |
|
116 | 116 | _errors = { |
|
117 | 117 | br'$ENOENT$': ( |
|
118 | 118 | # strerror() |
|
119 | 119 | br'No such file or directory', |
|
120 | 120 | |
|
121 | 121 | # FormatMessage(ERROR_FILE_NOT_FOUND) |
|
122 | 122 | br'The system cannot find the file specified', |
|
123 | 123 | ), |
|
124 | 124 | br'$ENOTDIR$': ( |
|
125 | 125 | # strerror() |
|
126 | 126 | br'Not a directory', |
|
127 | 127 | |
|
128 | 128 | # FormatMessage(ERROR_PATH_NOT_FOUND) |
|
129 | 129 | br'The system cannot find the path specified', |
|
130 | 130 | ), |
|
131 | 131 | br'$ECONNRESET$': ( |
|
132 | 132 | # strerror() |
|
133 | 133 | br'Connection reset by peer', |
|
134 | 134 | |
|
135 | 135 | # FormatMessage(WSAECONNRESET) |
|
136 | 136 | br'An existing connection was forcibly closed by the remote host', |
|
137 | 137 | ), |
|
138 | 138 | br'$EADDRINUSE$': ( |
|
139 | 139 | # strerror() |
|
140 | 140 | br'Address already in use', |
|
141 | 141 | |
|
142 | 142 | # FormatMessage(WSAEADDRINUSE) |
|
143 | 143 | br'Only one usage of each socket address' |
|
144 | 144 | br' \(protocol/network address/port\) is normally permitted', |
|
145 | 145 | ), |
|
146 | br'$EADDRNOTAVAIL$': ( | |
|
147 | # strerror() | |
|
148 | br'Cannot assign requested address', | |
|
149 | ||
|
150 | # FormatMessage(WSAEADDRNOTAVAIL) | |
|
151 | ) | |
|
146 | 152 | } |
|
147 | 153 | |
|
148 | 154 | for replace, msgs in _errors.items(): |
|
149 | 155 | substitutions.extend((m, replace) for m in msgs) |
|
150 | 156 | |
|
151 | 157 | # Output lines on Windows that can be autocorrected for '\' vs '/' path |
|
152 | 158 | # differences. |
|
153 | 159 | _winpathfixes = [ |
|
154 | 160 | # cloning subrepo s\ss from $TESTTMP/t/s/ss |
|
155 | 161 | # cloning subrepo foo\bar from http://localhost:$HGPORT/foo/bar |
|
156 | 162 | br'(?m)^cloning subrepo \S+\\.*', |
|
157 | 163 | |
|
158 | 164 | # pulling from $TESTTMP\issue1852a |
|
159 | 165 | br'(?m)^pulling from \$TESTTMP\\.*', |
|
160 | 166 | |
|
161 | 167 | # pushing to $TESTTMP\a |
|
162 | 168 | br'(?m)^pushing to \$TESTTMP\\.*', |
|
163 | 169 | |
|
164 | 170 | # pushing subrepo s\ss to $TESTTMP/t/s/ss |
|
165 | 171 | br'(?m)^pushing subrepo \S+\\\S+ to.*', |
|
166 | 172 | |
|
167 | 173 | # moving d1\d11\a1 to d3/d11/a1 |
|
168 | 174 | br'(?m)^moving \S+\\.*', |
|
169 | 175 | |
|
170 | 176 | # d1\a: not recording move - dummy does not exist |
|
171 | 177 | br'\S+\\\S+: not recording move .+', |
|
172 | 178 | |
|
173 | 179 | # reverting s\a |
|
174 | 180 | br'(?m)^reverting (?!subrepo ).*\\.*', |
|
175 | 181 | |
|
176 | 182 | # saved backup bundle to |
|
177 | 183 | # $TESTTMP\test\.hg\strip-backup/443431ffac4f-2fc5398a-backup.hg |
|
178 | 184 | br'(?m)^saved backup bundle to \$TESTTMP.*\.hg', |
|
179 | 185 | |
|
180 | 186 | # no changes made to subrepo s\ss since last push to ../tcc/s/ss |
|
181 | 187 | br'(?m)^no changes made to subrepo \S+\\\S+ since.*', |
|
182 | 188 | |
|
183 | 189 | # changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing |
|
184 | 190 | # $TESTTMP\largefiles-repo-hg\.hg\largefiles\76..38 |
|
185 | 191 | br'(?m)^changeset .* references (corrupted|missing) \$TESTTMP\\.*', |
|
186 | 192 | |
|
187 | 193 | # stuff/maybelarge.dat: largefile 76..38 not available from |
|
188 | 194 | # file:/*/$TESTTMP\largefiles-repo (glob) |
|
189 | 195 | br'.*: largefile \S+ not available from file:/\*/.+', |
|
190 | 196 | ] |
|
191 | 197 | |
|
192 | 198 | if os.name == 'nt': |
|
193 | 199 | substitutions.extend([(s, lambda match: match.group().replace(b'\\', b'/')) |
|
194 | 200 | for s in _winpathfixes]) |
@@ -1,934 +1,935 b'' | |||
|
1 | 1 | #require serve zstd |
|
2 | 2 | |
|
3 | 3 | Client version is embedded in HTTP request and is effectively dynamic. Pin the |
|
4 | 4 | version so behavior is deterministic. |
|
5 | 5 | |
|
6 | 6 | $ cat > fakeversion.py << EOF |
|
7 | 7 | > from mercurial import util |
|
8 | 8 | > util.version = lambda: '4.2' |
|
9 | 9 | > EOF |
|
10 | 10 | |
|
11 | 11 | $ cat >> $HGRCPATH << EOF |
|
12 | 12 | > [extensions] |
|
13 | 13 | > fakeversion = `pwd`/fakeversion.py |
|
14 | 14 | > [devel] |
|
15 | 15 | > legacy.exchange = phases |
|
16 | 16 | > EOF |
|
17 | 17 | |
|
18 | 18 | $ hg init server0 |
|
19 | 19 | $ cd server0 |
|
20 | 20 | $ touch foo |
|
21 | 21 | $ hg -q commit -A -m initial |
|
22 | 22 | |
|
23 | 23 | Also disable compression because zstd is optional and causes output to vary |
|
24 | 24 | and because debugging partial responses is hard when compression is involved |
|
25 | 25 | |
|
26 | 26 | $ cat > .hg/hgrc << EOF |
|
27 | 27 | > [extensions] |
|
28 | 28 | > badserver = $TESTDIR/badserverext.py |
|
29 | 29 | > [server] |
|
30 | 30 | > compressionengines = none |
|
31 | 31 | > EOF |
|
32 | 32 | |
|
33 | 33 | Failure to accept() socket should result in connection related error message |
|
34 | 34 | |
|
35 | 35 | $ hg serve --config badserver.closebeforeaccept=true -p $HGPORT -d --pid-file=hg.pid |
|
36 | 36 | $ cat hg.pid > $DAEMON_PIDS |
|
37 | 37 | |
|
38 | 38 | $ hg clone http://localhost:$HGPORT/ clone |
|
39 | abort: error: $ECONNRESET$ | |
|
39 | abort: error: $ECONNRESET$ (?) | |
|
40 | abort: error: $EADDRNOTAVAIL$ (?) | |
|
40 | 41 |
|
|
41 | 42 | |
|
42 | 43 |
|
|
43 | 44 | So ensure the process is dead.) |
|
44 | 45 | |
|
45 | 46 | $ killdaemons.py $DAEMON_PIDS |
|
46 | 47 | |
|
47 | 48 | Failure immediately after accept() should yield connection related error message |
|
48 | 49 | |
|
49 | 50 | $ hg serve --config badserver.closeafteraccept=true -p $HGPORT -d --pid-file=hg.pid |
|
50 | 51 | $ cat hg.pid > $DAEMON_PIDS |
|
51 | 52 | |
|
52 | 53 | TODO: this usually outputs good results, but sometimes emits abort: |
|
53 | 54 | error: '' on FreeBSD and OS X. |
|
54 | 55 | What we ideally want are: |
|
55 | 56 | |
|
56 | 57 | abort: error: $ECONNRESET$ |
|
57 | 58 | |
|
58 | 59 | The flakiness in this output was observable easily with |
|
59 | 60 | --runs-per-test=20 on macOS 10.12 during the freeze for 4.2. |
|
60 | 61 | $ hg clone http://localhost:$HGPORT/ clone |
|
61 | 62 | abort: error: * (glob) |
|
62 | 63 | [255] |
|
63 | 64 | |
|
64 | 65 | $ killdaemons.py $DAEMON_PIDS |
|
65 | 66 | |
|
66 | 67 | Failure to read all bytes in initial HTTP request should yield connection related error message |
|
67 | 68 | |
|
68 | 69 | $ hg serve --config badserver.closeafterrecvbytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
69 | 70 | $ cat hg.pid > $DAEMON_PIDS |
|
70 | 71 | |
|
71 | 72 | $ hg clone http://localhost:$HGPORT/ clone |
|
72 | 73 | abort: error: bad HTTP status line: '' |
|
73 | 74 | [255] |
|
74 | 75 | |
|
75 | 76 | $ killdaemons.py $DAEMON_PIDS |
|
76 | 77 | |
|
77 | 78 | $ cat error.log |
|
78 | 79 | readline(1 from 65537) -> (1) G |
|
79 | 80 | read limit reached; closing socket |
|
80 | 81 | |
|
81 | 82 | $ rm -f error.log |
|
82 | 83 | |
|
83 | 84 | Same failure, but server reads full HTTP request line |
|
84 | 85 | |
|
85 | 86 | $ hg serve --config badserver.closeafterrecvbytes=40 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
86 | 87 | $ cat hg.pid > $DAEMON_PIDS |
|
87 | 88 | $ hg clone http://localhost:$HGPORT/ clone |
|
88 | 89 | abort: error: bad HTTP status line: '' |
|
89 | 90 | [255] |
|
90 | 91 | |
|
91 | 92 | $ killdaemons.py $DAEMON_PIDS |
|
92 | 93 | |
|
93 | 94 | $ cat error.log |
|
94 | 95 | readline(40 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
|
95 | 96 | readline(7 from -1) -> (7) Accept- |
|
96 | 97 | read limit reached; closing socket |
|
97 | 98 | |
|
98 | 99 | $ rm -f error.log |
|
99 | 100 | |
|
100 | 101 | Failure on subsequent HTTP request on the same socket (cmd?batch) |
|
101 | 102 | |
|
102 | 103 | $ hg serve --config badserver.closeafterrecvbytes=210,223 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
103 | 104 | $ cat hg.pid > $DAEMON_PIDS |
|
104 | 105 | $ hg clone http://localhost:$HGPORT/ clone |
|
105 | 106 | abort: error: bad HTTP status line: '' |
|
106 | 107 | [255] |
|
107 | 108 | |
|
108 | 109 | $ killdaemons.py $DAEMON_PIDS |
|
109 | 110 | |
|
110 | 111 | $ cat error.log |
|
111 | 112 | readline(210 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
|
112 | 113 | readline(177 from -1) -> (27) Accept-Encoding: identity\r\n |
|
113 | 114 | readline(150 from -1) -> (35) accept: application/mercurial-0.1\r\n |
|
114 | 115 | readline(115 from -1) -> (*) host: localhost:$HGPORT\r\n (glob) |
|
115 | 116 | readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob) |
|
116 | 117 | readline(* from -1) -> (2) \r\n (glob) |
|
117 | 118 | write(36) -> HTTP/1.1 200 Script output follows\r\n |
|
118 | 119 | write(23) -> Server: badhttpserver\r\n |
|
119 | 120 | write(37) -> Date: $HTTP_DATE$\r\n |
|
120 | 121 | write(41) -> Content-Type: application/mercurial-0.1\r\n |
|
121 | 122 | write(21) -> Content-Length: 450\r\n |
|
122 | 123 | write(2) -> \r\n |
|
123 | 124 | write(450) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
124 | 125 | readline(4? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob) |
|
125 | 126 | readline(1? from -1) -> (1?) Accept-Encoding* (glob) |
|
126 | 127 | read limit reached; closing socket |
|
127 | 128 | readline(223 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n |
|
128 | 129 | readline(197 from -1) -> (27) Accept-Encoding: identity\r\n |
|
129 | 130 | readline(170 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
|
130 | 131 | readline(141 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n |
|
131 | 132 | readline(100 from -1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
132 | 133 | readline(39 from -1) -> (35) accept: application/mercurial-0.1\r\n |
|
133 | 134 | readline(4 from -1) -> (4) host |
|
134 | 135 | read limit reached; closing socket |
|
135 | 136 | |
|
136 | 137 | $ rm -f error.log |
|
137 | 138 | |
|
138 | 139 | Failure to read getbundle HTTP request |
|
139 | 140 | |
|
140 | 141 | $ hg serve --config badserver.closeafterrecvbytes=308,317,304 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
141 | 142 | $ cat hg.pid > $DAEMON_PIDS |
|
142 | 143 | $ hg clone http://localhost:$HGPORT/ clone |
|
143 | 144 | requesting all changes |
|
144 | 145 | abort: error: bad HTTP status line: '' |
|
145 | 146 | [255] |
|
146 | 147 | |
|
147 | 148 | $ killdaemons.py $DAEMON_PIDS |
|
148 | 149 | |
|
149 | 150 | $ cat error.log |
|
150 | 151 | readline(1 from -1) -> (1) x (?) |
|
151 | 152 | readline(1 from -1) -> (1) x (?) |
|
152 | 153 | readline(308 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
|
153 | 154 | readline(275 from -1) -> (27) Accept-Encoding: identity\r\n |
|
154 | 155 | readline(248 from -1) -> (35) accept: application/mercurial-0.1\r\n |
|
155 | 156 | readline(213 from -1) -> (*) host: localhost:$HGPORT\r\n (glob) |
|
156 | 157 | readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob) |
|
157 | 158 | readline(* from -1) -> (2) \r\n (glob) |
|
158 | 159 | write(36) -> HTTP/1.1 200 Script output follows\r\n |
|
159 | 160 | write(23) -> Server: badhttpserver\r\n |
|
160 | 161 | write(37) -> Date: $HTTP_DATE$\r\n |
|
161 | 162 | write(41) -> Content-Type: application/mercurial-0.1\r\n |
|
162 | 163 | write(21) -> Content-Length: 450\r\n |
|
163 | 164 | write(2) -> \r\n |
|
164 | 165 | write(450) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
165 | 166 | readline(13? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob) |
|
166 | 167 | readline(1?? from -1) -> (27) Accept-Encoding: identity\r\n (glob) |
|
167 | 168 | readline(8? from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob) |
|
168 | 169 | readline(5? from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob) |
|
169 | 170 | readline(1? from -1) -> (1?) x-hgproto-1:* (glob) |
|
170 | 171 | read limit reached; closing socket |
|
171 | 172 | readline(317 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n |
|
172 | 173 | readline(291 from -1) -> (27) Accept-Encoding: identity\r\n |
|
173 | 174 | readline(264 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
|
174 | 175 | readline(235 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n |
|
175 | 176 | readline(194 from -1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
176 | 177 | readline(133 from -1) -> (35) accept: application/mercurial-0.1\r\n |
|
177 | 178 | readline(98 from -1) -> (*) host: localhost:$HGPORT\r\n (glob) |
|
178 | 179 | readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob) |
|
179 | 180 | readline(* from -1) -> (2) \r\n (glob) |
|
180 | 181 | write(36) -> HTTP/1.1 200 Script output follows\r\n |
|
181 | 182 | write(23) -> Server: badhttpserver\r\n |
|
182 | 183 | write(37) -> Date: $HTTP_DATE$\r\n |
|
183 | 184 | write(41) -> Content-Type: application/mercurial-0.1\r\n |
|
184 | 185 | write(20) -> Content-Length: 42\r\n |
|
185 | 186 | write(2) -> \r\n |
|
186 | 187 | write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; |
|
187 | 188 | readline(* from 65537) -> (*) GET /?cmd=getbundle HTTP* (glob) |
|
188 | 189 | read limit reached; closing socket |
|
189 | 190 | readline(304 from 65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n |
|
190 | 191 | readline(274 from -1) -> (27) Accept-Encoding: identity\r\n |
|
191 | 192 | readline(247 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
|
192 | 193 | readline(218 from -1) -> (218) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtag |
|
193 | 194 | read limit reached; closing socket |
|
194 | 195 | |
|
195 | 196 | $ rm -f error.log |
|
196 | 197 | |
|
197 | 198 | Now do a variation using POST to send arguments |
|
198 | 199 | |
|
199 | 200 | $ hg serve --config experimental.httppostargs=true --config badserver.closeafterrecvbytes=329,344 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
200 | 201 | $ cat hg.pid > $DAEMON_PIDS |
|
201 | 202 | |
|
202 | 203 | $ hg clone http://localhost:$HGPORT/ clone |
|
203 | 204 | abort: error: bad HTTP status line: '' |
|
204 | 205 | [255] |
|
205 | 206 | |
|
206 | 207 | $ killdaemons.py $DAEMON_PIDS |
|
207 | 208 | |
|
208 | 209 | $ cat error.log |
|
209 | 210 | readline(329 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
|
210 | 211 | readline(296 from -1) -> (27) Accept-Encoding: identity\r\n |
|
211 | 212 | readline(269 from -1) -> (35) accept: application/mercurial-0.1\r\n |
|
212 | 213 | readline(234 from -1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
213 | 214 | readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob) |
|
214 | 215 | readline(* from -1) -> (2) \r\n (glob) |
|
215 | 216 | write(36) -> HTTP/1.1 200 Script output follows\r\n |
|
216 | 217 | write(23) -> Server: badhttpserver\r\n |
|
217 | 218 | write(37) -> Date: $HTTP_DATE$\r\n |
|
218 | 219 | write(41) -> Content-Type: application/mercurial-0.1\r\n |
|
219 | 220 | write(21) -> Content-Length: 463\r\n |
|
220 | 221 | write(2) -> \r\n |
|
221 | 222 | write(463) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx httppostargs known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
222 | 223 | readline(1?? from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n (glob) |
|
223 | 224 | readline(1?? from -1) -> (27) Accept-Encoding: identity\r\n (glob) |
|
224 | 225 | readline(1?? from -1) -> (41) content-type: application/mercurial-0.1\r\n (glob) |
|
225 | 226 | readline(6? from -1) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n (glob) |
|
226 | 227 | readline(3? from -1) -> (19) x-hgargs-post: 28\r\n (glob) |
|
227 | 228 | readline(1? from -1) -> (1?) x-hgproto-1: * (glob) |
|
228 | 229 | read limit reached; closing socket |
|
229 | 230 | readline(344 from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n |
|
230 | 231 | readline(317 from -1) -> (27) Accept-Encoding: identity\r\n |
|
231 | 232 | readline(290 from -1) -> (41) content-type: application/mercurial-0.1\r\n |
|
232 | 233 | readline(249 from -1) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n |
|
233 | 234 | readline(216 from -1) -> (19) x-hgargs-post: 28\r\n |
|
234 | 235 | readline(197 from -1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
235 | 236 | readline(136 from -1) -> (35) accept: application/mercurial-0.1\r\n |
|
236 | 237 | readline(101 from -1) -> (20) content-length: 28\r\n |
|
237 | 238 | readline(81 from -1) -> (*) host: localhost:$HGPORT\r\n (glob) |
|
238 | 239 | readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob) |
|
239 | 240 | readline(* from -1) -> (2) \r\n (glob) |
|
240 | 241 | read(* from 28) -> (*) cmds=* (glob) |
|
241 | 242 | read limit reached, closing socket |
|
242 | 243 | write(36) -> HTTP/1.1 500 Internal Server Error\r\n |
|
243 | 244 | |
|
244 | 245 | $ rm -f error.log |
|
245 | 246 | |
|
246 | 247 | Now move on to partial server responses |
|
247 | 248 | |
|
248 | 249 | Server sends a single character from the HTTP response line |
|
249 | 250 | |
|
250 | 251 | $ hg serve --config badserver.closeaftersendbytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
251 | 252 | $ cat hg.pid > $DAEMON_PIDS |
|
252 | 253 | |
|
253 | 254 | $ hg clone http://localhost:$HGPORT/ clone |
|
254 | 255 | abort: error: bad HTTP status line: H |
|
255 | 256 | [255] |
|
256 | 257 | |
|
257 | 258 | $ killdaemons.py $DAEMON_PIDS |
|
258 | 259 | |
|
259 | 260 | $ cat error.log |
|
260 | 261 | readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
|
261 | 262 | readline(-1) -> (27) Accept-Encoding: identity\r\n |
|
262 | 263 | readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
|
263 | 264 | readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
264 | 265 | readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
|
265 | 266 | readline(-1) -> (2) \r\n |
|
266 | 267 | write(1 from 36) -> (0) H |
|
267 | 268 | write limit reached; closing socket |
|
268 | 269 | write(36) -> HTTP/1.1 500 Internal Server Error\r\n |
|
269 | 270 | |
|
270 | 271 | $ rm -f error.log |
|
271 | 272 | |
|
272 | 273 | Server sends an incomplete capabilities response body |
|
273 | 274 | |
|
274 | 275 | $ hg serve --config badserver.closeaftersendbytes=180 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
275 | 276 | $ cat hg.pid > $DAEMON_PIDS |
|
276 | 277 | |
|
277 | 278 | $ hg clone http://localhost:$HGPORT/ clone |
|
278 | 279 | abort: HTTP request error (incomplete response; expected 450 bytes got 20) |
|
279 | 280 | (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) |
|
280 | 281 | [255] |
|
281 | 282 | |
|
282 | 283 | $ killdaemons.py $DAEMON_PIDS |
|
283 | 284 | |
|
284 | 285 | $ cat error.log |
|
285 | 286 | readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
|
286 | 287 | readline(-1) -> (27) Accept-Encoding: identity\r\n |
|
287 | 288 | readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
|
288 | 289 | readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
289 | 290 | readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
|
290 | 291 | readline(-1) -> (2) \r\n |
|
291 | 292 | write(36 from 36) -> (144) HTTP/1.1 200 Script output follows\r\n |
|
292 | 293 | write(23 from 23) -> (121) Server: badhttpserver\r\n |
|
293 | 294 | write(37 from 37) -> (84) Date: $HTTP_DATE$\r\n |
|
294 | 295 | write(41 from 41) -> (43) Content-Type: application/mercurial-0.1\r\n |
|
295 | 296 | write(21 from 21) -> (22) Content-Length: 450\r\n |
|
296 | 297 | write(2 from 2) -> (20) \r\n |
|
297 | 298 | write(20 from 450) -> (0) batch branchmap bund |
|
298 | 299 | write limit reached; closing socket |
|
299 | 300 | |
|
300 | 301 | $ rm -f error.log |
|
301 | 302 | |
|
302 | 303 | Server sends incomplete headers for batch request |
|
303 | 304 | |
|
304 | 305 | $ hg serve --config badserver.closeaftersendbytes=728 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
305 | 306 | $ cat hg.pid > $DAEMON_PIDS |
|
306 | 307 | |
|
307 | 308 | TODO this output is horrible |
|
308 | 309 | |
|
309 | 310 | $ hg clone http://localhost:$HGPORT/ clone |
|
310 | 311 | abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository: |
|
311 | 312 | ---%<--- (applicat) |
|
312 | 313 | |
|
313 | 314 | ---%<--- |
|
314 | 315 | ! |
|
315 | 316 | [255] |
|
316 | 317 | |
|
317 | 318 | $ killdaemons.py $DAEMON_PIDS |
|
318 | 319 | |
|
319 | 320 | $ cat error.log |
|
320 | 321 | readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
|
321 | 322 | readline(-1) -> (27) Accept-Encoding: identity\r\n |
|
322 | 323 | readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
|
323 | 324 | readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
324 | 325 | readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
|
325 | 326 | readline(-1) -> (2) \r\n |
|
326 | 327 | write(36 from 36) -> (692) HTTP/1.1 200 Script output follows\r\n |
|
327 | 328 | write(23 from 23) -> (669) Server: badhttpserver\r\n |
|
328 | 329 | write(37 from 37) -> (632) Date: $HTTP_DATE$\r\n |
|
329 | 330 | write(41 from 41) -> (591) Content-Type: application/mercurial-0.1\r\n |
|
330 | 331 | write(21 from 21) -> (570) Content-Length: 450\r\n |
|
331 | 332 | write(2 from 2) -> (568) \r\n |
|
332 | 333 | write(450 from 450) -> (118) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
333 | 334 | readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n |
|
334 | 335 | readline(-1) -> (27) Accept-Encoding: identity\r\n |
|
335 | 336 | readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
|
336 | 337 | readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n |
|
337 | 338 | readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
338 | 339 | readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
|
339 | 340 | readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
340 | 341 | readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
|
341 | 342 | readline(-1) -> (2) \r\n |
|
342 | 343 | write(36 from 36) -> (82) HTTP/1.1 200 Script output follows\r\n |
|
343 | 344 | write(23 from 23) -> (59) Server: badhttpserver\r\n |
|
344 | 345 | write(37 from 37) -> (22) Date: $HTTP_DATE$\r\n |
|
345 | 346 | write(22 from 41) -> (0) Content-Type: applicat |
|
346 | 347 | write limit reached; closing socket |
|
347 | 348 | write(36) -> HTTP/1.1 500 Internal Server Error\r\n |
|
348 | 349 | |
|
349 | 350 | $ rm -f error.log |
|
350 | 351 | |
|
351 | 352 | Server sends an incomplete HTTP response body to batch request |
|
352 | 353 | |
|
353 | 354 | $ hg serve --config badserver.closeaftersendbytes=793 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
354 | 355 | $ cat hg.pid > $DAEMON_PIDS |
|
355 | 356 | |
|
356 | 357 | TODO client spews a stack due to uncaught ValueError in batch.results() |
|
357 | 358 | #if no-chg |
|
358 | 359 | $ hg clone http://localhost:$HGPORT/ clone 2> /dev/null |
|
359 | 360 | [1] |
|
360 | 361 | #else |
|
361 | 362 | $ hg clone http://localhost:$HGPORT/ clone 2> /dev/null |
|
362 | 363 | [255] |
|
363 | 364 | #endif |
|
364 | 365 | |
|
365 | 366 | $ killdaemons.py $DAEMON_PIDS |
|
366 | 367 | |
|
367 | 368 | $ cat error.log |
|
368 | 369 | readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
|
369 | 370 | readline(-1) -> (27) Accept-Encoding: identity\r\n |
|
370 | 371 | readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
|
371 | 372 | readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
372 | 373 | readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
|
373 | 374 | readline(-1) -> (2) \r\n |
|
374 | 375 | write(36 from 36) -> (757) HTTP/1.1 200 Script output follows\r\n |
|
375 | 376 | write(23 from 23) -> (734) Server: badhttpserver\r\n |
|
376 | 377 | write(37 from 37) -> (697) Date: $HTTP_DATE$\r\n |
|
377 | 378 | write(41 from 41) -> (656) Content-Type: application/mercurial-0.1\r\n |
|
378 | 379 | write(21 from 21) -> (635) Content-Length: 450\r\n |
|
379 | 380 | write(2 from 2) -> (633) \r\n |
|
380 | 381 | write(450 from 450) -> (183) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
381 | 382 | readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n |
|
382 | 383 | readline(-1) -> (27) Accept-Encoding: identity\r\n |
|
383 | 384 | readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
|
384 | 385 | readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n |
|
385 | 386 | readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
386 | 387 | readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
|
387 | 388 | readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
388 | 389 | readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
|
389 | 390 | readline(-1) -> (2) \r\n |
|
390 | 391 | write(36 from 36) -> (147) HTTP/1.1 200 Script output follows\r\n |
|
391 | 392 | write(23 from 23) -> (124) Server: badhttpserver\r\n |
|
392 | 393 | write(37 from 37) -> (87) Date: $HTTP_DATE$\r\n |
|
393 | 394 | write(41 from 41) -> (46) Content-Type: application/mercurial-0.1\r\n |
|
394 | 395 | write(20 from 20) -> (26) Content-Length: 42\r\n |
|
395 | 396 | write(2 from 2) -> (24) \r\n |
|
396 | 397 | write(24 from 42) -> (0) 96ee1d7354c4ad7372047672 |
|
397 | 398 | write limit reached; closing socket |
|
398 | 399 | |
|
399 | 400 | $ rm -f error.log |
|
400 | 401 | |
|
401 | 402 | Server sends incomplete headers for getbundle response |
|
402 | 403 | |
|
403 | 404 | $ hg serve --config badserver.closeaftersendbytes=940 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
404 | 405 | $ cat hg.pid > $DAEMON_PIDS |
|
405 | 406 | |
|
406 | 407 | TODO this output is terrible |
|
407 | 408 | |
|
408 | 409 | $ hg clone http://localhost:$HGPORT/ clone |
|
409 | 410 | requesting all changes |
|
410 | 411 | abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository: |
|
411 | 412 | ---%<--- (application/mercuri) |
|
412 | 413 | |
|
413 | 414 | ---%<--- |
|
414 | 415 | ! |
|
415 | 416 | [255] |
|
416 | 417 | |
|
417 | 418 | $ killdaemons.py $DAEMON_PIDS |
|
418 | 419 | |
|
419 | 420 | $ cat error.log |
|
420 | 421 | readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
|
421 | 422 | readline(-1) -> (27) Accept-Encoding: identity\r\n |
|
422 | 423 | readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
|
423 | 424 | readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
424 | 425 | readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
|
425 | 426 | readline(-1) -> (2) \r\n |
|
426 | 427 | write(36 from 36) -> (904) HTTP/1.1 200 Script output follows\r\n |
|
427 | 428 | write(23 from 23) -> (881) Server: badhttpserver\r\n |
|
428 | 429 | write(37 from 37) -> (844) Date: $HTTP_DATE$\r\n |
|
429 | 430 | write(41 from 41) -> (803) Content-Type: application/mercurial-0.1\r\n |
|
430 | 431 | write(21 from 21) -> (782) Content-Length: 450\r\n |
|
431 | 432 | write(2 from 2) -> (780) \r\n |
|
432 | 433 | write(450 from 450) -> (330) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
433 | 434 | readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n |
|
434 | 435 | readline(-1) -> (27) Accept-Encoding: identity\r\n |
|
435 | 436 | readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
|
436 | 437 | readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n |
|
437 | 438 | readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
438 | 439 | readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
|
439 | 440 | readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
440 | 441 | readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
|
441 | 442 | readline(-1) -> (2) \r\n |
|
442 | 443 | write(36 from 36) -> (294) HTTP/1.1 200 Script output follows\r\n |
|
443 | 444 | write(23 from 23) -> (271) Server: badhttpserver\r\n |
|
444 | 445 | write(37 from 37) -> (234) Date: $HTTP_DATE$\r\n |
|
445 | 446 | write(41 from 41) -> (193) Content-Type: application/mercurial-0.1\r\n |
|
446 | 447 | write(20 from 20) -> (173) Content-Length: 42\r\n |
|
447 | 448 | write(2 from 2) -> (171) \r\n |
|
448 | 449 | write(42 from 42) -> (129) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; |
|
449 | 450 | readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n |
|
450 | 451 | readline(-1) -> (27) Accept-Encoding: identity\r\n |
|
451 | 452 | readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
|
452 | 453 | readline(-1) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n |
|
453 | 454 | readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
454 | 455 | readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
|
455 | 456 | readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
456 | 457 | readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
|
457 | 458 | readline(-1) -> (2) \r\n |
|
458 | 459 | write(36 from 36) -> (93) HTTP/1.1 200 Script output follows\r\n |
|
459 | 460 | write(23 from 23) -> (70) Server: badhttpserver\r\n |
|
460 | 461 | write(37 from 37) -> (33) Date: $HTTP_DATE$\r\n |
|
461 | 462 | write(33 from 41) -> (0) Content-Type: application/mercuri |
|
462 | 463 | write limit reached; closing socket |
|
463 | 464 | write(36) -> HTTP/1.1 500 Internal Server Error\r\n |
|
464 | 465 | |
|
465 | 466 | $ rm -f error.log |
|
466 | 467 | |
|
467 | 468 | Server stops before it sends transfer encoding |
|
468 | 469 | |
|
469 | 470 | $ hg serve --config badserver.closeaftersendbytes=973 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
470 | 471 | $ cat hg.pid > $DAEMON_PIDS |
|
471 | 472 | |
|
472 | 473 | $ hg clone http://localhost:$HGPORT/ clone |
|
473 | 474 | requesting all changes |
|
474 | 475 | abort: stream ended unexpectedly (got 0 bytes, expected 1) |
|
475 | 476 | [255] |
|
476 | 477 | |
|
477 | 478 | $ killdaemons.py $DAEMON_PIDS |
|
478 | 479 | |
|
479 | 480 | $ tail -4 error.log |
|
480 | 481 | write(41 from 41) -> (25) Content-Type: application/mercurial-0.2\r\n |
|
481 | 482 | write(25 from 28) -> (0) Transfer-Encoding: chunke |
|
482 | 483 | write limit reached; closing socket |
|
483 | 484 | write(36) -> HTTP/1.1 500 Internal Server Error\r\n |
|
484 | 485 | |
|
485 | 486 | $ rm -f error.log |
|
486 | 487 | |
|
487 | 488 | Server sends empty HTTP body for getbundle |
|
488 | 489 | |
|
489 | 490 | $ hg serve --config badserver.closeaftersendbytes=978 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
490 | 491 | $ cat hg.pid > $DAEMON_PIDS |
|
491 | 492 | |
|
492 | 493 | $ hg clone http://localhost:$HGPORT/ clone |
|
493 | 494 | requesting all changes |
|
494 | 495 | abort: HTTP request error (incomplete response) |
|
495 | 496 | (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) |
|
496 | 497 | [255] |
|
497 | 498 | |
|
498 | 499 | $ killdaemons.py $DAEMON_PIDS |
|
499 | 500 | |
|
500 | 501 | $ cat error.log |
|
501 | 502 | readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
|
502 | 503 | readline(-1) -> (27) Accept-Encoding: identity\r\n |
|
503 | 504 | readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
|
504 | 505 | readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
505 | 506 | readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
|
506 | 507 | readline(-1) -> (2) \r\n |
|
507 | 508 | write(36 from 36) -> (942) HTTP/1.1 200 Script output follows\r\n |
|
508 | 509 | write(23 from 23) -> (919) Server: badhttpserver\r\n |
|
509 | 510 | write(37 from 37) -> (882) Date: $HTTP_DATE$\r\n |
|
510 | 511 | write(41 from 41) -> (841) Content-Type: application/mercurial-0.1\r\n |
|
511 | 512 | write(21 from 21) -> (820) Content-Length: 450\r\n |
|
512 | 513 | write(2 from 2) -> (818) \r\n |
|
513 | 514 | write(450 from 450) -> (368) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
514 | 515 | readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n |
|
515 | 516 | readline(-1) -> (27) Accept-Encoding: identity\r\n |
|
516 | 517 | readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
|
517 | 518 | readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n |
|
518 | 519 | readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
519 | 520 | readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
|
520 | 521 | readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
521 | 522 | readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
|
522 | 523 | readline(-1) -> (2) \r\n |
|
523 | 524 | write(36 from 36) -> (332) HTTP/1.1 200 Script output follows\r\n |
|
524 | 525 | write(23 from 23) -> (309) Server: badhttpserver\r\n |
|
525 | 526 | write(37 from 37) -> (272) Date: $HTTP_DATE$\r\n |
|
526 | 527 | write(41 from 41) -> (231) Content-Type: application/mercurial-0.1\r\n |
|
527 | 528 | write(20 from 20) -> (211) Content-Length: 42\r\n |
|
528 | 529 | write(2 from 2) -> (209) \r\n |
|
529 | 530 | write(42 from 42) -> (167) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; |
|
530 | 531 | readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n |
|
531 | 532 | readline(-1) -> (27) Accept-Encoding: identity\r\n |
|
532 | 533 | readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
|
533 | 534 | readline(-1) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n |
|
534 | 535 | readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
535 | 536 | readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
|
536 | 537 | readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
537 | 538 | readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
|
538 | 539 | readline(-1) -> (2) \r\n |
|
539 | 540 | write(36 from 36) -> (131) HTTP/1.1 200 Script output follows\r\n |
|
540 | 541 | write(23 from 23) -> (108) Server: badhttpserver\r\n |
|
541 | 542 | write(37 from 37) -> (71) Date: $HTTP_DATE$\r\n |
|
542 | 543 | write(41 from 41) -> (30) Content-Type: application/mercurial-0.2\r\n |
|
543 | 544 | write(28 from 28) -> (2) Transfer-Encoding: chunked\r\n |
|
544 | 545 | write(2 from 2) -> (0) \r\n |
|
545 | 546 | write limit reached; closing socket |
|
546 | 547 | write(36) -> HTTP/1.1 500 Internal Server Error\r\n |
|
547 | 548 | |
|
548 | 549 | $ rm -f error.log |
|
549 | 550 | |
|
550 | 551 | Server sends partial compression string |
|
551 | 552 | |
|
552 | 553 | $ hg serve --config badserver.closeaftersendbytes=1002 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
553 | 554 | $ cat hg.pid > $DAEMON_PIDS |
|
554 | 555 | |
|
555 | 556 | $ hg clone http://localhost:$HGPORT/ clone |
|
556 | 557 | requesting all changes |
|
557 | 558 | abort: HTTP request error (incomplete response) |
|
558 | 559 | (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) |
|
559 | 560 | [255] |
|
560 | 561 | |
|
561 | 562 | $ killdaemons.py $DAEMON_PIDS |
|
562 | 563 | |
|
563 | 564 | $ cat error.log |
|
564 | 565 | readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
|
565 | 566 | readline(-1) -> (27) Accept-Encoding: identity\r\n |
|
566 | 567 | readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
|
567 | 568 | readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
568 | 569 | readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
|
569 | 570 | readline(-1) -> (2) \r\n |
|
570 | 571 | write(36 from 36) -> (966) HTTP/1.1 200 Script output follows\r\n |
|
571 | 572 | write(23 from 23) -> (943) Server: badhttpserver\r\n |
|
572 | 573 | write(37 from 37) -> (906) Date: $HTTP_DATE$\r\n |
|
573 | 574 | write(41 from 41) -> (865) Content-Type: application/mercurial-0.1\r\n |
|
574 | 575 | write(21 from 21) -> (844) Content-Length: 450\r\n |
|
575 | 576 | write(2 from 2) -> (842) \r\n |
|
576 | 577 | write(450 from 450) -> (392) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash |
|
577 | 578 | readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n |
|
578 | 579 | readline(-1) -> (27) Accept-Encoding: identity\r\n |
|
579 | 580 | readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
|
580 | 581 | readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n |
|
581 | 582 | readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
582 | 583 | readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
|
583 | 584 | readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
584 | 585 | readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
|
585 | 586 | readline(-1) -> (2) \r\n |
|
586 | 587 | write(36 from 36) -> (356) HTTP/1.1 200 Script output follows\r\n |
|
587 | 588 | write(23 from 23) -> (333) Server: badhttpserver\r\n |
|
588 | 589 | write(37 from 37) -> (296) Date: $HTTP_DATE$\r\n |
|
589 | 590 | write(41 from 41) -> (255) Content-Type: application/mercurial-0.1\r\n |
|
590 | 591 | write(20 from 20) -> (235) Content-Length: 42\r\n |
|
591 | 592 | write(2 from 2) -> (233) \r\n |
|
592 | 593 | write(42 from 42) -> (191) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; |
|
593 | 594 | readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n |
|
594 | 595 | readline(-1) -> (27) Accept-Encoding: identity\r\n |
|
595 | 596 | readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
|
596 | 597 | readline(-1) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n |
|
597 | 598 | readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n |
|
598 | 599 | readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
|
599 | 600 | readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
|
600 | 601 | readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
|
601 | 602 | readline(-1) -> (2) \r\n |
|
602 | 603 | write(36 from 36) -> (155) HTTP/1.1 200 Script output follows\r\n |
|
603 | 604 | write(23 from 23) -> (132) Server: badhttpserver\r\n |
|
604 | 605 | write(37 from 37) -> (95) Date: $HTTP_DATE$\r\n |
|
605 | 606 | write(41 from 41) -> (54) Content-Type: application/mercurial-0.2\r\n |
|
606 | 607 | write(28 from 28) -> (26) Transfer-Encoding: chunked\r\n |
|
607 | 608 | write(2 from 2) -> (24) \r\n |
|
608 | 609 | write(6 from 6) -> (18) 1\\r\\n\x04\\r\\n (esc) |
|
609 | 610 | write(9 from 9) -> (9) 4\r\nnone\r\n |
|
610 | 611 | write(9 from 9) -> (0) 4\r\nHG20\r\n |
|
611 | 612 | write limit reached; closing socket |
|
612 | 613 | write(27) -> 15\r\nInternal Server Error\r\n |
|
613 | 614 | |
|
614 | 615 | $ rm -f error.log |
|
615 | 616 | |
|
616 | 617 | Server sends partial bundle2 header magic |
|
617 | 618 | |
|
618 | 619 | $ hg serve --config badserver.closeaftersendbytes=999 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
619 | 620 | $ cat hg.pid > $DAEMON_PIDS |
|
620 | 621 | |
|
621 | 622 | $ hg clone http://localhost:$HGPORT/ clone |
|
622 | 623 | requesting all changes |
|
623 | 624 | abort: HTTP request error (incomplete response; expected 4 bytes got 3) |
|
624 | 625 | (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) |
|
625 | 626 | [255] |
|
626 | 627 | |
|
627 | 628 | $ killdaemons.py $DAEMON_PIDS |
|
628 | 629 | |
|
629 | 630 | $ tail -7 error.log |
|
630 | 631 | write(28 from 28) -> (23) Transfer-Encoding: chunked\r\n |
|
631 | 632 | write(2 from 2) -> (21) \r\n |
|
632 | 633 | write(6 from 6) -> (15) 1\\r\\n\x04\\r\\n (esc) |
|
633 | 634 | write(9 from 9) -> (6) 4\r\nnone\r\n |
|
634 | 635 | write(6 from 9) -> (0) 4\r\nHG2 |
|
635 | 636 | write limit reached; closing socket |
|
636 | 637 | write(27) -> 15\r\nInternal Server Error\r\n |
|
637 | 638 | |
|
638 | 639 | $ rm -f error.log |
|
639 | 640 | |
|
640 | 641 | Server sends incomplete bundle2 stream params length |
|
641 | 642 | |
|
642 | 643 | $ hg serve --config badserver.closeaftersendbytes=1008 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
643 | 644 | $ cat hg.pid > $DAEMON_PIDS |
|
644 | 645 | |
|
645 | 646 | $ hg clone http://localhost:$HGPORT/ clone |
|
646 | 647 | requesting all changes |
|
647 | 648 | abort: HTTP request error (incomplete response; expected 4 bytes got 3) |
|
648 | 649 | (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) |
|
649 | 650 | [255] |
|
650 | 651 | |
|
651 | 652 | $ killdaemons.py $DAEMON_PIDS |
|
652 | 653 | |
|
653 | 654 | $ tail -8 error.log |
|
654 | 655 | write(28 from 28) -> (32) Transfer-Encoding: chunked\r\n |
|
655 | 656 | write(2 from 2) -> (30) \r\n |
|
656 | 657 | write(6 from 6) -> (24) 1\\r\\n\x04\\r\\n (esc) |
|
657 | 658 | write(9 from 9) -> (15) 4\r\nnone\r\n |
|
658 | 659 | write(9 from 9) -> (6) 4\r\nHG20\r\n |
|
659 | 660 | write(6 from 9) -> (0) 4\\r\\n\x00\x00\x00 (esc) |
|
660 | 661 | write limit reached; closing socket |
|
661 | 662 | write(27) -> 15\r\nInternal Server Error\r\n |
|
662 | 663 | |
|
663 | 664 | $ rm -f error.log |
|
664 | 665 | |
|
665 | 666 | Servers stops after bundle2 stream params header |
|
666 | 667 | |
|
667 | 668 | $ hg serve --config badserver.closeaftersendbytes=1011 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
668 | 669 | $ cat hg.pid > $DAEMON_PIDS |
|
669 | 670 | |
|
670 | 671 | $ hg clone http://localhost:$HGPORT/ clone |
|
671 | 672 | requesting all changes |
|
672 | 673 | abort: HTTP request error (incomplete response) |
|
673 | 674 | (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) |
|
674 | 675 | [255] |
|
675 | 676 | |
|
676 | 677 | $ killdaemons.py $DAEMON_PIDS |
|
677 | 678 | |
|
678 | 679 | $ tail -8 error.log |
|
679 | 680 | write(28 from 28) -> (35) Transfer-Encoding: chunked\r\n |
|
680 | 681 | write(2 from 2) -> (33) \r\n |
|
681 | 682 | write(6 from 6) -> (27) 1\\r\\n\x04\\r\\n (esc) |
|
682 | 683 | write(9 from 9) -> (18) 4\r\nnone\r\n |
|
683 | 684 | write(9 from 9) -> (9) 4\r\nHG20\r\n |
|
684 | 685 | write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
685 | 686 | write limit reached; closing socket |
|
686 | 687 | write(27) -> 15\r\nInternal Server Error\r\n |
|
687 | 688 | |
|
688 | 689 | $ rm -f error.log |
|
689 | 690 | |
|
690 | 691 | Server stops sending after bundle2 part header length |
|
691 | 692 | |
|
692 | 693 | $ hg serve --config badserver.closeaftersendbytes=1020 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
693 | 694 | $ cat hg.pid > $DAEMON_PIDS |
|
694 | 695 | |
|
695 | 696 | $ hg clone http://localhost:$HGPORT/ clone |
|
696 | 697 | requesting all changes |
|
697 | 698 | abort: HTTP request error (incomplete response) |
|
698 | 699 | (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) |
|
699 | 700 | [255] |
|
700 | 701 | |
|
701 | 702 | $ killdaemons.py $DAEMON_PIDS |
|
702 | 703 | |
|
703 | 704 | $ tail -9 error.log |
|
704 | 705 | write(28 from 28) -> (44) Transfer-Encoding: chunked\r\n |
|
705 | 706 | write(2 from 2) -> (42) \r\n |
|
706 | 707 | write(6 from 6) -> (36) 1\\r\\n\x04\\r\\n (esc) |
|
707 | 708 | write(9 from 9) -> (27) 4\r\nnone\r\n |
|
708 | 709 | write(9 from 9) -> (18) 4\r\nHG20\r\n |
|
709 | 710 | write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
710 | 711 | write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00)\\r\\n (esc) |
|
711 | 712 | write limit reached; closing socket |
|
712 | 713 | write(27) -> 15\r\nInternal Server Error\r\n |
|
713 | 714 | |
|
714 | 715 | $ rm -f error.log |
|
715 | 716 | |
|
716 | 717 | Server stops sending after bundle2 part header |
|
717 | 718 | |
|
718 | 719 | $ hg serve --config badserver.closeaftersendbytes=1067 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
719 | 720 | $ cat hg.pid > $DAEMON_PIDS |
|
720 | 721 | |
|
721 | 722 | $ hg clone http://localhost:$HGPORT/ clone |
|
722 | 723 | requesting all changes |
|
723 | 724 | adding changesets |
|
724 | 725 | transaction abort! |
|
725 | 726 | rollback completed |
|
726 | 727 | abort: HTTP request error (incomplete response) |
|
727 | 728 | (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) |
|
728 | 729 | [255] |
|
729 | 730 | |
|
730 | 731 | $ killdaemons.py $DAEMON_PIDS |
|
731 | 732 | |
|
732 | 733 | $ tail -10 error.log |
|
733 | 734 | write(28 from 28) -> (91) Transfer-Encoding: chunked\r\n |
|
734 | 735 | write(2 from 2) -> (89) \r\n |
|
735 | 736 | write(6 from 6) -> (83) 1\\r\\n\x04\\r\\n (esc) |
|
736 | 737 | write(9 from 9) -> (74) 4\r\nnone\r\n |
|
737 | 738 | write(9 from 9) -> (65) 4\r\nHG20\r\n |
|
738 | 739 | write(9 from 9) -> (56) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
739 | 740 | write(9 from 9) -> (47) 4\\r\\n\x00\x00\x00)\\r\\n (esc) |
|
740 | 741 | write(47 from 47) -> (0) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) |
|
741 | 742 | write limit reached; closing socket |
|
742 | 743 | write(27) -> 15\r\nInternal Server Error\r\n |
|
743 | 744 | |
|
744 | 745 | $ rm -f error.log |
|
745 | 746 | |
|
746 | 747 | Server stops after bundle2 part payload chunk size |
|
747 | 748 | |
|
748 | 749 | $ hg serve --config badserver.closeaftersendbytes=1088 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
749 | 750 | $ cat hg.pid > $DAEMON_PIDS |
|
750 | 751 | |
|
751 | 752 | $ hg clone http://localhost:$HGPORT/ clone |
|
752 | 753 | requesting all changes |
|
753 | 754 | adding changesets |
|
754 | 755 | transaction abort! |
|
755 | 756 | rollback completed |
|
756 | 757 | abort: HTTP request error (incomplete response; expected 466 bytes got 7) |
|
757 | 758 | (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) |
|
758 | 759 | [255] |
|
759 | 760 | |
|
760 | 761 | $ killdaemons.py $DAEMON_PIDS |
|
761 | 762 | |
|
762 | 763 | $ tail -11 error.log |
|
763 | 764 | write(2 from 2) -> (110) \r\n |
|
764 | 765 | write(6 from 6) -> (104) 1\\r\\n\x04\\r\\n (esc) |
|
765 | 766 | write(9 from 9) -> (95) 4\r\nnone\r\n |
|
766 | 767 | write(9 from 9) -> (86) 4\r\nHG20\r\n |
|
767 | 768 | write(9 from 9) -> (77) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
768 | 769 | write(9 from 9) -> (68) 4\\r\\n\x00\x00\x00)\\r\\n (esc) |
|
769 | 770 | write(47 from 47) -> (21) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) |
|
770 | 771 | write(9 from 9) -> (12) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) |
|
771 | 772 | write(12 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1d (esc) |
|
772 | 773 | write limit reached; closing socket |
|
773 | 774 | write(27) -> 15\r\nInternal Server Error\r\n |
|
774 | 775 | |
|
775 | 776 | $ rm -f error.log |
|
776 | 777 | |
|
777 | 778 | Server stops sending in middle of bundle2 payload chunk |
|
778 | 779 | |
|
779 | 780 | $ hg serve --config badserver.closeaftersendbytes=1549 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
780 | 781 | $ cat hg.pid > $DAEMON_PIDS |
|
781 | 782 | |
|
782 | 783 | $ hg clone http://localhost:$HGPORT/ clone |
|
783 | 784 | requesting all changes |
|
784 | 785 | adding changesets |
|
785 | 786 | transaction abort! |
|
786 | 787 | rollback completed |
|
787 | 788 | abort: HTTP request error (incomplete response) |
|
788 | 789 | (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) |
|
789 | 790 | [255] |
|
790 | 791 | |
|
791 | 792 | $ killdaemons.py $DAEMON_PIDS |
|
792 | 793 | |
|
793 | 794 | $ tail -12 error.log |
|
794 | 795 | write(28 from 28) -> (573) Transfer-Encoding: chunked\r\n |
|
795 | 796 | write(2 from 2) -> (571) \r\n |
|
796 | 797 | write(6 from 6) -> (565) 1\\r\\n\x04\\r\\n (esc) |
|
797 | 798 | write(9 from 9) -> (556) 4\r\nnone\r\n |
|
798 | 799 | write(9 from 9) -> (547) 4\r\nHG20\r\n |
|
799 | 800 | write(9 from 9) -> (538) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
800 | 801 | write(9 from 9) -> (529) 4\\r\\n\x00\x00\x00)\\r\\n (esc) |
|
801 | 802 | write(47 from 47) -> (482) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) |
|
802 | 803 | write(9 from 9) -> (473) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) |
|
803 | 804 | write(473 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) |
|
804 | 805 | write limit reached; closing socket |
|
805 | 806 | write(27) -> 15\r\nInternal Server Error\r\n |
|
806 | 807 | |
|
807 | 808 | $ rm -f error.log |
|
808 | 809 | |
|
809 | 810 | Server stops sending after 0 length payload chunk size |
|
810 | 811 | |
|
811 | 812 | $ hg serve --config badserver.closeaftersendbytes=1580 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
812 | 813 | $ cat hg.pid > $DAEMON_PIDS |
|
813 | 814 | |
|
814 | 815 | $ hg clone http://localhost:$HGPORT/ clone |
|
815 | 816 | requesting all changes |
|
816 | 817 | adding changesets |
|
817 | 818 | adding manifests |
|
818 | 819 | adding file changes |
|
819 | 820 | added 1 changesets with 1 changes to 1 files |
|
820 | 821 | transaction abort! |
|
821 | 822 | rollback completed |
|
822 | 823 | abort: HTTP request error (incomplete response; expected 32 bytes got 9) |
|
823 | 824 | (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) |
|
824 | 825 | [255] |
|
825 | 826 | |
|
826 | 827 | $ killdaemons.py $DAEMON_PIDS |
|
827 | 828 | |
|
828 | 829 | $ tail -13 error.log |
|
829 | 830 | write(6 from 6) -> (596) 1\\r\\n\x04\\r\\n (esc) |
|
830 | 831 | write(9 from 9) -> (587) 4\r\nnone\r\n |
|
831 | 832 | write(9 from 9) -> (578) 4\r\nHG20\r\n |
|
832 | 833 | write(9 from 9) -> (569) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
833 | 834 | write(9 from 9) -> (560) 4\\r\\n\x00\x00\x00)\\r\\n (esc) |
|
834 | 835 | write(47 from 47) -> (513) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) |
|
835 | 836 | write(9 from 9) -> (504) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) |
|
836 | 837 | write(473 from 473) -> (31) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) |
|
837 | 838 | write(9 from 9) -> (22) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
838 | 839 | write(9 from 9) -> (13) 4\\r\\n\x00\x00\x00 \\r\\n (esc) |
|
839 | 840 | write(13 from 38) -> (0) 20\\r\\n\x08LISTKEYS (esc) |
|
840 | 841 | write limit reached; closing socket |
|
841 | 842 | write(27) -> 15\r\nInternal Server Error\r\n |
|
842 | 843 | |
|
843 | 844 | $ rm -f error.log |
|
844 | 845 | |
|
845 | 846 | Server stops sending after 0 part bundle part header (indicating end of bundle2 payload) |
|
846 | 847 | This is before the 0 size chunked transfer part that signals end of HTTP response. |
|
847 | 848 | |
|
848 | 849 | # $ hg serve --config badserver.closeaftersendbytes=1755 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
849 | 850 | $ hg serve --config badserver.closeaftersendbytes=1862 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
850 | 851 | $ cat hg.pid > $DAEMON_PIDS |
|
851 | 852 | |
|
852 | 853 | $ hg clone http://localhost:$HGPORT/ clone |
|
853 | 854 | requesting all changes |
|
854 | 855 | adding changesets |
|
855 | 856 | adding manifests |
|
856 | 857 | adding file changes |
|
857 | 858 | added 1 changesets with 1 changes to 1 files |
|
858 | 859 | new changesets 96ee1d7354c4 |
|
859 | 860 | updating to branch default |
|
860 | 861 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
861 | 862 | |
|
862 | 863 | $ killdaemons.py $DAEMON_PIDS |
|
863 | 864 | |
|
864 | 865 | $ tail -22 error.log |
|
865 | 866 | write(9 from 9) -> (851) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
866 | 867 | write(9 from 9) -> (842) 4\\r\\n\x00\x00\x00)\\r\\n (esc) |
|
867 | 868 | write(47 from 47) -> (795) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) |
|
868 | 869 | write(9 from 9) -> (786) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) |
|
869 | 870 | write(473 from 473) -> (313) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) |
|
870 | 871 | write(9 from 9) -> (304) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
871 | 872 | write(9 from 9) -> (295) 4\\r\\n\x00\x00\x00 \\r\\n (esc) |
|
872 | 873 | write(38 from 38) -> (257) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc) |
|
873 | 874 | write(9 from 9) -> (248) 4\\r\\n\x00\x00\x00:\\r\\n (esc) |
|
874 | 875 | write(64 from 64) -> (184) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n |
|
875 | 876 | write(9 from 9) -> (175) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
876 | 877 | write(9 from 9) -> (166) 4\\r\\n\x00\x00\x00#\\r\\n (esc) |
|
877 | 878 | write(41 from 41) -> (125) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc) |
|
878 | 879 | write(9 from 9) -> (116) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
879 | 880 | write(9 from 9) -> (107) 4\\r\\n\x00\x00\x00\x1d\\r\\n (esc) |
|
880 | 881 | write(35 from 35) -> (72) 1d\\r\\n\x16cache:rev-branch-cache\x00\x00\x00\x03\x00\x00\\r\\n (esc) |
|
881 | 882 | write(9 from 9) -> (63) 4\\r\\n\x00\x00\x00'\\r\\n (esc) |
|
882 | 883 | write(45 from 45) -> (18) 27\\r\\n\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x00default\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\\r\\n (esc) |
|
883 | 884 | write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
884 | 885 | write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
885 | 886 | write limit reached; closing socket |
|
886 | 887 | write(27) -> 15\r\nInternal Server Error\r\n |
|
887 | 888 | |
|
888 | 889 | $ rm -f error.log |
|
889 | 890 | $ rm -rf clone |
|
890 | 891 | |
|
891 | 892 | Server sends a size 0 chunked-transfer size without terminating \r\n |
|
892 | 893 | |
|
893 | 894 | $ hg serve --config badserver.closeaftersendbytes=1865 -p $HGPORT -d --pid-file=hg.pid -E error.log |
|
894 | 895 | $ cat hg.pid > $DAEMON_PIDS |
|
895 | 896 | |
|
896 | 897 | $ hg clone http://localhost:$HGPORT/ clone |
|
897 | 898 | requesting all changes |
|
898 | 899 | adding changesets |
|
899 | 900 | adding manifests |
|
900 | 901 | adding file changes |
|
901 | 902 | added 1 changesets with 1 changes to 1 files |
|
902 | 903 | new changesets 96ee1d7354c4 |
|
903 | 904 | updating to branch default |
|
904 | 905 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
905 | 906 | |
|
906 | 907 | $ killdaemons.py $DAEMON_PIDS |
|
907 | 908 | |
|
908 | 909 | $ tail -23 error.log |
|
909 | 910 | write(9 from 9) -> (854) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
910 | 911 | write(9 from 9) -> (845) 4\\r\\n\x00\x00\x00)\\r\\n (esc) |
|
911 | 912 | write(47 from 47) -> (798) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) |
|
912 | 913 | write(9 from 9) -> (789) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) |
|
913 | 914 | write(473 from 473) -> (316) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) |
|
914 | 915 | write(9 from 9) -> (307) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
915 | 916 | write(9 from 9) -> (298) 4\\r\\n\x00\x00\x00 \\r\\n (esc) |
|
916 | 917 | write(38 from 38) -> (260) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc) |
|
917 | 918 | write(9 from 9) -> (251) 4\\r\\n\x00\x00\x00:\\r\\n (esc) |
|
918 | 919 | write(64 from 64) -> (187) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n |
|
919 | 920 | write(9 from 9) -> (178) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
920 | 921 | write(9 from 9) -> (169) 4\\r\\n\x00\x00\x00#\\r\\n (esc) |
|
921 | 922 | write(41 from 41) -> (128) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc) |
|
922 | 923 | write(9 from 9) -> (119) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
923 | 924 | write(9 from 9) -> (110) 4\\r\\n\x00\x00\x00\x1d\\r\\n (esc) |
|
924 | 925 | write(35 from 35) -> (75) 1d\\r\\n\x16cache:rev-branch-cache\x00\x00\x00\x03\x00\x00\\r\\n (esc) |
|
925 | 926 | write(9 from 9) -> (66) 4\\r\\n\x00\x00\x00'\\r\\n (esc) |
|
926 | 927 | write(45 from 45) -> (21) 27\\r\\n\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x00default\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\\r\\n (esc) |
|
927 | 928 | write(9 from 9) -> (12) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
928 | 929 | write(9 from 9) -> (3) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
|
929 | 930 | write(3 from 5) -> (0) 0\r\n |
|
930 | 931 | write limit reached; closing socket |
|
931 | 932 | write(27) -> 15\r\nInternal Server Error\r\n |
|
932 | 933 | |
|
933 | 934 | $ rm -f error.log |
|
934 | 935 | $ rm -rf clone |
@@ -1,122 +1,123 b'' | |||
|
1 | 1 | #require serve |
|
2 | 2 | |
|
3 | 3 | $ hg init a |
|
4 | 4 | $ cd a |
|
5 | 5 | $ echo a > a |
|
6 | 6 | $ hg ci -Ama -d '1123456789 0' |
|
7 | 7 | adding a |
|
8 | 8 | $ hg serve --config server.uncompressed=True -p $HGPORT -d --pid-file=hg.pid |
|
9 | 9 | $ cat hg.pid >> $DAEMON_PIDS |
|
10 | 10 | $ cd .. |
|
11 | 11 | $ tinyproxy.py $HGPORT1 localhost 2>proxy.log >/dev/null </dev/null & |
|
12 | 12 | $ while [ ! -f proxy.pid ]; do sleep 0; done |
|
13 | 13 | $ cat proxy.pid >> $DAEMON_PIDS |
|
14 | 14 | |
|
15 | 15 | url for proxy, stream |
|
16 | 16 | |
|
17 | 17 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --stream http://localhost:$HGPORT/ b |
|
18 | 18 | streaming all changes |
|
19 | 19 | 6 files to transfer, 412 bytes of data (reporevlogstore !) |
|
20 | 20 | 4 files to transfer, 330 bytes of data (reposimplestore !) |
|
21 | 21 | transferred * bytes in * seconds (*/sec) (glob) |
|
22 | 22 | updating to branch default |
|
23 | 23 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
24 | 24 | $ cd b |
|
25 | 25 | $ hg verify |
|
26 | 26 | checking changesets |
|
27 | 27 | checking manifests |
|
28 | 28 | crosschecking files in changesets and manifests |
|
29 | 29 | checking files |
|
30 | 30 | checked 1 changesets with 1 changes to 1 files |
|
31 | 31 | $ cd .. |
|
32 | 32 | |
|
33 | 33 | url for proxy, pull |
|
34 | 34 | |
|
35 | 35 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull |
|
36 | 36 | requesting all changes |
|
37 | 37 | adding changesets |
|
38 | 38 | adding manifests |
|
39 | 39 | adding file changes |
|
40 | 40 | added 1 changesets with 1 changes to 1 files |
|
41 | 41 | new changesets 83180e7845de |
|
42 | 42 | updating to branch default |
|
43 | 43 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
44 | 44 | $ cd b-pull |
|
45 | 45 | $ hg verify |
|
46 | 46 | checking changesets |
|
47 | 47 | checking manifests |
|
48 | 48 | crosschecking files in changesets and manifests |
|
49 | 49 | checking files |
|
50 | 50 | checked 1 changesets with 1 changes to 1 files |
|
51 | 51 | $ cd .. |
|
52 | 52 | |
|
53 | 53 | host:port for proxy |
|
54 | 54 | |
|
55 | 55 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c |
|
56 | 56 | requesting all changes |
|
57 | 57 | adding changesets |
|
58 | 58 | adding manifests |
|
59 | 59 | adding file changes |
|
60 | 60 | added 1 changesets with 1 changes to 1 files |
|
61 | 61 | new changesets 83180e7845de |
|
62 | 62 | updating to branch default |
|
63 | 63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
64 | 64 | |
|
65 | 65 | proxy url with user name and password |
|
66 | 66 | |
|
67 | 67 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d |
|
68 | 68 | requesting all changes |
|
69 | 69 | adding changesets |
|
70 | 70 | adding manifests |
|
71 | 71 | adding file changes |
|
72 | 72 | added 1 changesets with 1 changes to 1 files |
|
73 | 73 | new changesets 83180e7845de |
|
74 | 74 | updating to branch default |
|
75 | 75 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
76 | 76 | |
|
77 | 77 | url with user name and password |
|
78 | 78 | |
|
79 | 79 | $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e |
|
80 | 80 | requesting all changes |
|
81 | 81 | adding changesets |
|
82 | 82 | adding manifests |
|
83 | 83 | adding file changes |
|
84 | 84 | added 1 changesets with 1 changes to 1 files |
|
85 | 85 | new changesets 83180e7845de |
|
86 | 86 | updating to branch default |
|
87 | 87 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
88 | 88 | |
|
89 | 89 | bad host:port for proxy ("Protocol not supported" can happen on |
|
90 | 90 | misconfigured hosts) |
|
91 | 91 | |
|
92 | 92 | $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f |
|
93 |
abort: error: (Connection refused|Protocol not supported|.* actively refused it |
|
|
93 | abort: error: (Connection refused|Protocol not supported|.* actively refused it) (re) (?) | |
|
94 | abort: error: $EADDRNOTAVAIL$ (?) | |
|
94 | 95 | [255] |
|
95 | 96 | |
|
96 | 97 | do not use the proxy if it is in the no list |
|
97 | 98 | |
|
98 | 99 | $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g |
|
99 | 100 | requesting all changes |
|
100 | 101 | adding changesets |
|
101 | 102 | adding manifests |
|
102 | 103 | adding file changes |
|
103 | 104 | added 1 changesets with 1 changes to 1 files |
|
104 | 105 | new changesets 83180e7845de |
|
105 | 106 | updating to branch default |
|
106 | 107 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
107 | 108 | $ cat proxy.log |
|
108 | 109 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
109 | 110 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
110 | 111 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&stream=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
111 | 112 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
112 | 113 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
113 | 114 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
114 | 115 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
115 | 116 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
116 | 117 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
117 | 118 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
118 | 119 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
119 | 120 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
120 | 121 | * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) |
|
121 | 122 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
122 | 123 | $LOCALIP - - [$LOGDATE$] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
@@ -1,480 +1,481 b'' | |||
|
1 | 1 | #require serve no-reposimplestore no-chg |
|
2 | 2 | |
|
3 | 3 | $ cat >> $HGRCPATH <<EOF |
|
4 | 4 | > [extensions] |
|
5 | 5 | > lfs= |
|
6 | 6 | > [lfs] |
|
7 | 7 | > track=all() |
|
8 | 8 | > [web] |
|
9 | 9 | > push_ssl = False |
|
10 | 10 | > allow-push = * |
|
11 | 11 | > EOF |
|
12 | 12 | |
|
13 | 13 | Serving LFS files can experimentally be turned off. The long term solution is |
|
14 | 14 | to support the 'verify' action in both client and server, so that the server can |
|
15 | 15 | tell the client to store files elsewhere. |
|
16 | 16 | |
|
17 | 17 | $ hg init server |
|
18 | 18 | $ hg --config "lfs.usercache=$TESTTMP/servercache" \ |
|
19 | 19 | > --config experimental.lfs.serve=False -R server serve -d \ |
|
20 | 20 | > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
21 | 21 | $ cat hg.pid >> $DAEMON_PIDS |
|
22 | 22 | |
|
23 | 23 | Uploads fail... |
|
24 | 24 | |
|
25 | 25 | $ hg init client |
|
26 | 26 | $ echo 'this-is-an-lfs-file' > client/lfs.bin |
|
27 | 27 | $ hg -R client ci -Am 'initial commit' |
|
28 | 28 | adding lfs.bin |
|
29 | 29 | $ hg -R client push http://localhost:$HGPORT |
|
30 | 30 | pushing to http://localhost:$HGPORT/ |
|
31 | 31 | searching for changes |
|
32 | 32 | abort: LFS HTTP error: HTTP Error 400: no such method: .git! |
|
33 | 33 | (check that lfs serving is enabled on http://localhost:$HGPORT/.git/info/lfs and "upload" is supported) |
|
34 | 34 | [255] |
|
35 | 35 | |
|
36 | 36 | ... so do a local push to make the data available. Remove the blob from the |
|
37 | 37 | default cache, so it attempts to download. |
|
38 | 38 | $ hg --config "lfs.usercache=$TESTTMP/servercache" \ |
|
39 | 39 | > --config "lfs.url=null://" \ |
|
40 | 40 | > -R client push -q server |
|
41 | 41 | $ mv `hg config lfs.usercache` $TESTTMP/servercache |
|
42 | 42 | |
|
43 | 43 | Downloads fail... |
|
44 | 44 | |
|
45 | 45 | $ hg clone http://localhost:$HGPORT httpclone |
|
46 | 46 | (remote is using large file support (lfs); lfs will be enabled for this repository) |
|
47 | 47 | requesting all changes |
|
48 | 48 | adding changesets |
|
49 | 49 | adding manifests |
|
50 | 50 | adding file changes |
|
51 | 51 | added 1 changesets with 1 changes to 1 files |
|
52 | 52 | new changesets 525251863cad |
|
53 | 53 | updating to branch default |
|
54 | 54 | abort: LFS HTTP error: HTTP Error 400: no such method: .git! |
|
55 | 55 | (check that lfs serving is enabled on http://localhost:$HGPORT/.git/info/lfs and "download" is supported) |
|
56 | 56 | [255] |
|
57 | 57 | |
|
58 | 58 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
59 | 59 | |
|
60 | 60 | $ cat $TESTTMP/access.log $TESTTMP/errors.log |
|
61 | 61 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
62 | 62 | $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) |
|
63 | 63 | $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) |
|
64 | 64 | $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) |
|
65 | 65 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob) |
|
66 | 66 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
67 | 67 | $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) |
|
68 | 68 | $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) |
|
69 | 69 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 400 - (glob) |
|
70 | 70 | |
|
71 | 71 | $ rm -f $TESTTMP/access.log $TESTTMP/errors.log |
|
72 | 72 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R server serve -d \ |
|
73 | 73 | > -p $HGPORT --pid-file=hg.pid --prefix=subdir/mount/point \ |
|
74 | 74 | > -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
75 | 75 | $ cat hg.pid >> $DAEMON_PIDS |
|
76 | 76 | |
|
77 | 77 | Reasonable hint for a misconfigured blob server |
|
78 | 78 | |
|
79 | 79 | $ hg -R httpclone update default --config lfs.url=http://localhost:$HGPORT/missing |
|
80 | 80 | abort: LFS HTTP error: HTTP Error 404: Not Found! |
|
81 | 81 | (the "lfs.url" config may be used to override http://localhost:$HGPORT/missing) |
|
82 | 82 | [255] |
|
83 | 83 | |
|
84 | 84 | $ hg -R httpclone update default --config lfs.url=http://localhost:$HGPORT2/missing |
|
85 | abort: LFS error: *onnection *refused*! (glob) | |
|
85 | abort: LFS error: *onnection *refused*! (glob) (?) | |
|
86 | abort: LFS error: $EADDRNOTAVAIL$! (glob) (?) | |
|
86 | 87 | (the "lfs.url" config may be used to override http://localhost:$HGPORT2/missing) |
|
87 | 88 | [255] |
|
88 | 89 | |
|
89 | 90 | Blob URIs are correct when --prefix is used |
|
90 | 91 | |
|
91 | 92 | $ hg clone --debug http://localhost:$HGPORT/subdir/mount/point cloned2 |
|
92 | 93 | using http://localhost:$HGPORT/subdir/mount/point |
|
93 | 94 | sending capabilities command |
|
94 | 95 | (remote is using large file support (lfs); lfs will be enabled for this repository) |
|
95 | 96 | query 1; heads |
|
96 | 97 | sending batch command |
|
97 | 98 | requesting all changes |
|
98 | 99 | sending getbundle command |
|
99 | 100 | bundle2-input-bundle: with-transaction |
|
100 | 101 | bundle2-input-part: "changegroup" (params: 1 mandatory 1 advisory) supported |
|
101 | 102 | adding changesets |
|
102 | 103 | add changeset 525251863cad |
|
103 | 104 | adding manifests |
|
104 | 105 | adding file changes |
|
105 | 106 | adding lfs.bin revisions |
|
106 | 107 | added 1 changesets with 1 changes to 1 files |
|
107 | 108 | bundle2-input-part: total payload size 648 |
|
108 | 109 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
109 | 110 | bundle2-input-part: "phase-heads" supported |
|
110 | 111 | bundle2-input-part: total payload size 24 |
|
111 | 112 | bundle2-input-part: "cache:rev-branch-cache" (advisory) supported |
|
112 | 113 | bundle2-input-part: total payload size 39 |
|
113 | 114 | bundle2-input-bundle: 3 parts total |
|
114 | 115 | checking for updated bookmarks |
|
115 | 116 | updating the branch cache |
|
116 | 117 | new changesets 525251863cad |
|
117 | 118 | updating to branch default |
|
118 | 119 | resolving manifests |
|
119 | 120 | branchmerge: False, force: False, partial: False |
|
120 | 121 | ancestor: 000000000000, local: 000000000000+, remote: 525251863cad |
|
121 | 122 | lfs: assuming remote store: http://localhost:$HGPORT/subdir/mount/point/.git/info/lfs |
|
122 | 123 | Status: 200 |
|
123 | 124 | Content-Length: 371 |
|
124 | 125 | Content-Type: application/vnd.git-lfs+json |
|
125 | 126 | Date: $HTTP_DATE$ |
|
126 | 127 | Server: testing stub value |
|
127 | 128 | { |
|
128 | 129 | "objects": [ |
|
129 | 130 | { |
|
130 | 131 | "actions": { |
|
131 | 132 | "download": { |
|
132 | 133 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
133 | 134 | "header": { |
|
134 | 135 | "Accept": "application/vnd.git-lfs" |
|
135 | 136 | } |
|
136 | 137 | "href": "http://localhost:$HGPORT/subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e" |
|
137 | 138 | } |
|
138 | 139 | } |
|
139 | 140 | "oid": "f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e" |
|
140 | 141 | "size": 20 |
|
141 | 142 | } |
|
142 | 143 | ] |
|
143 | 144 | "transfer": "basic" |
|
144 | 145 | } |
|
145 | 146 | lfs: downloading f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e (20 bytes) |
|
146 | 147 | Status: 200 |
|
147 | 148 | Content-Length: 20 |
|
148 | 149 | Content-Type: application/octet-stream |
|
149 | 150 | Date: $HTTP_DATE$ |
|
150 | 151 | Server: testing stub value |
|
151 | 152 | lfs: adding f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e to the usercache |
|
152 | 153 | lfs: processed: f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e |
|
153 | 154 | lfs: downloaded 1 files (20 bytes) |
|
154 | 155 | lfs.bin: remote created -> g |
|
155 | 156 | getting lfs.bin |
|
156 | 157 | lfs: found f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e in the local lfs store |
|
157 | 158 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
158 | 159 | (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
159 | 160 | |
|
160 | 161 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
161 | 162 | |
|
162 | 163 | $ cat $TESTTMP/access.log $TESTTMP/errors.log |
|
163 | 164 | $LOCALIP - - [$LOGDATE$] "POST /missing/objects/batch HTTP/1.1" 404 - (glob) |
|
164 | 165 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
165 | 166 | $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) |
|
166 | 167 | $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) |
|
167 | 168 | $LOCALIP - - [$LOGDATE$] "POST /subdir/mount/point/.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
168 | 169 | $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e HTTP/1.1" 200 - (glob) |
|
169 | 170 | |
|
170 | 171 | Blobs that already exist in the usercache are linked into the repo store, even |
|
171 | 172 | though the client doesn't send the blob. |
|
172 | 173 | |
|
173 | 174 | $ hg init server2 |
|
174 | 175 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R server2 serve -d \ |
|
175 | 176 | > -p $HGPORT --pid-file=hg.pid \ |
|
176 | 177 | > -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
177 | 178 | $ cat hg.pid >> $DAEMON_PIDS |
|
178 | 179 | |
|
179 | 180 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R cloned2 --debug \ |
|
180 | 181 | > push http://localhost:$HGPORT | grep '^[{} ]' |
|
181 | 182 | { |
|
182 | 183 | "objects": [ |
|
183 | 184 | { |
|
184 | 185 | "oid": "f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e" |
|
185 | 186 | "size": 20 |
|
186 | 187 | } |
|
187 | 188 | ] |
|
188 | 189 | "transfer": "basic" |
|
189 | 190 | } |
|
190 | 191 | $ find server2/.hg/store/lfs/objects | sort |
|
191 | 192 | server2/.hg/store/lfs/objects |
|
192 | 193 | server2/.hg/store/lfs/objects/f0 |
|
193 | 194 | server2/.hg/store/lfs/objects/f0/3217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e |
|
194 | 195 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
195 | 196 | $ cat $TESTTMP/errors.log |
|
196 | 197 | |
|
197 | 198 | $ cat >> $TESTTMP/lfsstoreerror.py <<EOF |
|
198 | 199 | > import errno |
|
199 | 200 | > from hgext.lfs import blobstore |
|
200 | 201 | > |
|
201 | 202 | > _numverifies = 0 |
|
202 | 203 | > _readerr = True |
|
203 | 204 | > |
|
204 | 205 | > def reposetup(ui, repo): |
|
205 | 206 | > # Nothing to do with a remote repo |
|
206 | 207 | > if not repo.local(): |
|
207 | 208 | > return |
|
208 | 209 | > |
|
209 | 210 | > store = repo.svfs.lfslocalblobstore |
|
210 | 211 | > class badstore(store.__class__): |
|
211 | 212 | > def download(self, oid, src): |
|
212 | 213 | > '''Called in the server to handle reading from the client in a |
|
213 | 214 | > PUT request.''' |
|
214 | 215 | > origread = src.read |
|
215 | 216 | > def _badread(nbytes): |
|
216 | 217 | > # Simulate bad data/checksum failure from the client |
|
217 | 218 | > return b'0' * len(origread(nbytes)) |
|
218 | 219 | > src.read = _badread |
|
219 | 220 | > super(badstore, self).download(oid, src) |
|
220 | 221 | > |
|
221 | 222 | > def _read(self, vfs, oid, verify): |
|
222 | 223 | > '''Called in the server to read data for a GET request, and then |
|
223 | 224 | > calls self._verify() on it before returning.''' |
|
224 | 225 | > global _readerr |
|
225 | 226 | > # One time simulation of a read error |
|
226 | 227 | > if _readerr: |
|
227 | 228 | > _readerr = False |
|
228 | 229 | > raise IOError(errno.EIO, '%s: I/O error' % oid) |
|
229 | 230 | > # Simulate corrupt content on client download |
|
230 | 231 | > blobstore._verify(oid, 'dummy content') |
|
231 | 232 | > |
|
232 | 233 | > def verify(self, oid): |
|
233 | 234 | > '''Called in the server to populate the Batch API response, |
|
234 | 235 | > letting the client re-upload if the file is corrupt.''' |
|
235 | 236 | > # Fail verify in Batch API for one clone command and one push |
|
236 | 237 | > # command with an IOError. Then let it through to access other |
|
237 | 238 | > # functions. Checksum failure is tested elsewhere. |
|
238 | 239 | > global _numverifies |
|
239 | 240 | > _numverifies += 1 |
|
240 | 241 | > if _numverifies <= 2: |
|
241 | 242 | > raise IOError(errno.EIO, '%s: I/O error' % oid) |
|
242 | 243 | > return super(badstore, self).verify(oid) |
|
243 | 244 | > |
|
244 | 245 | > store.__class__ = badstore |
|
245 | 246 | > EOF |
|
246 | 247 | |
|
247 | 248 | $ rm -rf `hg config lfs.usercache` |
|
248 | 249 | $ rm -f $TESTTMP/access.log $TESTTMP/errors.log |
|
249 | 250 | $ hg --config "lfs.usercache=$TESTTMP/servercache" \ |
|
250 | 251 | > --config extensions.lfsstoreerror=$TESTTMP/lfsstoreerror.py \ |
|
251 | 252 | > -R server serve -d \ |
|
252 | 253 | > -p $HGPORT1 --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
253 | 254 | $ cat hg.pid >> $DAEMON_PIDS |
|
254 | 255 | |
|
255 | 256 | Test an I/O error in localstore.verify() (Batch API) with GET |
|
256 | 257 | |
|
257 | 258 | $ hg clone http://localhost:$HGPORT1 httpclone2 |
|
258 | 259 | (remote is using large file support (lfs); lfs will be enabled for this repository) |
|
259 | 260 | requesting all changes |
|
260 | 261 | adding changesets |
|
261 | 262 | adding manifests |
|
262 | 263 | adding file changes |
|
263 | 264 | added 1 changesets with 1 changes to 1 files |
|
264 | 265 | new changesets 525251863cad |
|
265 | 266 | updating to branch default |
|
266 | 267 | abort: LFS server error for "lfs.bin": Internal server error! |
|
267 | 268 | [255] |
|
268 | 269 | |
|
269 | 270 | Test an I/O error in localstore.verify() (Batch API) with PUT |
|
270 | 271 | |
|
271 | 272 | $ echo foo > client/lfs.bin |
|
272 | 273 | $ hg -R client ci -m 'mod lfs' |
|
273 | 274 | $ hg -R client push http://localhost:$HGPORT1 |
|
274 | 275 | pushing to http://localhost:$HGPORT1/ |
|
275 | 276 | searching for changes |
|
276 | 277 | abort: LFS server error for "unknown": Internal server error! |
|
277 | 278 | [255] |
|
278 | 279 | TODO: figure out how to associate the file name in the error above |
|
279 | 280 | |
|
280 | 281 | Test a bad checksum sent by the client in the transfer API |
|
281 | 282 | |
|
282 | 283 | $ hg -R client push http://localhost:$HGPORT1 |
|
283 | 284 | pushing to http://localhost:$HGPORT1/ |
|
284 | 285 | searching for changes |
|
285 | 286 | abort: LFS HTTP error: HTTP Error 422: corrupt blob (oid=b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c, action=upload)! |
|
286 | 287 | [255] |
|
287 | 288 | |
|
288 | 289 | $ echo 'test lfs file' > server/lfs3.bin |
|
289 | 290 | $ hg --config experimental.lfs.disableusercache=True \ |
|
290 | 291 | > -R server ci -Aqm 'another lfs file' |
|
291 | 292 | $ hg -R client pull -q http://localhost:$HGPORT1 |
|
292 | 293 | |
|
293 | 294 | Test an I/O error during the processing of the GET request |
|
294 | 295 | |
|
295 | 296 | $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs \ |
|
296 | 297 | > -R client update -r tip |
|
297 | 298 | abort: LFS HTTP error: HTTP Error 500: Internal Server Error (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! |
|
298 | 299 | [255] |
|
299 | 300 | |
|
300 | 301 | Test a checksum failure during the processing of the GET request |
|
301 | 302 | |
|
302 | 303 | $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs \ |
|
303 | 304 | > -R client update -r tip |
|
304 | 305 | abort: LFS HTTP error: HTTP Error 422: corrupt blob (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! |
|
305 | 306 | [255] |
|
306 | 307 | |
|
307 | 308 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
308 | 309 | |
|
309 | 310 | $ cat $TESTTMP/access.log |
|
310 | 311 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
311 | 312 | $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) |
|
312 | 313 | $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) |
|
313 | 314 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
314 | 315 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
315 | 316 | $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) |
|
316 | 317 | $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) |
|
317 | 318 | $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) |
|
318 | 319 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
319 | 320 | $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) |
|
320 | 321 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
321 | 322 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
322 | 323 | $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) |
|
323 | 324 | $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) |
|
324 | 325 | $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) |
|
325 | 326 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
326 | 327 | $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) |
|
327 | 328 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
328 | 329 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c HTTP/1.1" 422 - (glob) |
|
329 | 330 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
330 | 331 | $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) |
|
331 | 332 | $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) |
|
332 | 333 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
333 | 334 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 500 - (glob) |
|
334 | 335 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
335 | 336 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 422 - (glob) |
|
336 | 337 | |
|
337 | 338 | $ grep -v ' File "' $TESTTMP/errors.log |
|
338 | 339 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob) |
|
339 | 340 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
|
340 | 341 | $LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob) |
|
341 | 342 | $LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, '%s: I/O error' % oid) (glob) |
|
342 | 343 | $LOCALIP - - [$ERRDATE$] HG error: IOError: [Errno 5] f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e: I/O error (glob) |
|
343 | 344 | $LOCALIP - - [$ERRDATE$] HG error: (glob) |
|
344 | 345 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.git/info/lfs/objects/batch': (glob) |
|
345 | 346 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
|
346 | 347 | $LOCALIP - - [$ERRDATE$] HG error: verifies = store.verify(oid) (glob) |
|
347 | 348 | $LOCALIP - - [$ERRDATE$] HG error: raise IOError(errno.EIO, '%s: I/O error' % oid) (glob) |
|
348 | 349 | $LOCALIP - - [$ERRDATE$] HG error: IOError: [Errno 5] b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c: I/O error (glob) |
|
349 | 350 | $LOCALIP - - [$ERRDATE$] HG error: (glob) |
|
350 | 351 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.hg/lfs/objects/b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c': (glob) |
|
351 | 352 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
|
352 | 353 | $LOCALIP - - [$ERRDATE$] HG error: localstore.download(oid, req.bodyfh) (glob) |
|
353 | 354 | $LOCALIP - - [$ERRDATE$] HG error: super(badstore, self).download(oid, src) (glob) |
|
354 | 355 | $LOCALIP - - [$ERRDATE$] HG error: % oid) (glob) |
|
355 | 356 | $LOCALIP - - [$ERRDATE$] HG error: LfsCorruptionError: corrupt remote lfs object: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c (glob) |
|
356 | 357 | $LOCALIP - - [$ERRDATE$] HG error: (glob) |
|
357 | 358 | $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob) |
|
358 | 359 | Traceback (most recent call last): |
|
359 | 360 | self.do_write() |
|
360 | 361 | self.do_hgweb() |
|
361 | 362 | for chunk in self.server.application(env, self._start_response): |
|
362 | 363 | for r in self._runwsgi(req, res, repo): |
|
363 | 364 | rctx, req, res, self.check_perm) |
|
364 | 365 | return func(*(args + a), **kw) |
|
365 | 366 | lambda perm: |
|
366 | 367 | res.setbodybytes(localstore.read(oid)) |
|
367 | 368 | blob = self._read(self.vfs, oid, verify) |
|
368 | 369 | raise IOError(errno.EIO, '%s: I/O error' % oid) |
|
369 | 370 | IOError: [Errno 5] 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d: I/O error |
|
370 | 371 | |
|
371 | 372 | $LOCALIP - - [$ERRDATE$] HG error: Exception happened while processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob) |
|
372 | 373 | $LOCALIP - - [$ERRDATE$] HG error: Traceback (most recent call last): (glob) |
|
373 | 374 | $LOCALIP - - [$ERRDATE$] HG error: res.setbodybytes(localstore.read(oid)) (glob) |
|
374 | 375 | $LOCALIP - - [$ERRDATE$] HG error: blob = self._read(self.vfs, oid, verify) (glob) |
|
375 | 376 | $LOCALIP - - [$ERRDATE$] HG error: blobstore._verify(oid, 'dummy content') (glob) |
|
376 | 377 | $LOCALIP - - [$ERRDATE$] HG error: hint=_('run hg verify')) (glob) |
|
377 | 378 | $LOCALIP - - [$ERRDATE$] HG error: LfsCorruptionError: detected corrupt lfs object: 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d (glob) |
|
378 | 379 | $LOCALIP - - [$ERRDATE$] HG error: (glob) |
|
379 | 380 | |
|
380 | 381 | Basic Authorization headers are returned by the Batch API, and sent back with |
|
381 | 382 | the GET/PUT request. |
|
382 | 383 | |
|
383 | 384 | $ rm -f $TESTTMP/access.log $TESTTMP/errors.log |
|
384 | 385 | |
|
385 | 386 | $ cat >> $HGRCPATH << EOF |
|
386 | 387 | > [experimental] |
|
387 | 388 | > lfs.disableusercache = True |
|
388 | 389 | > [auth] |
|
389 | 390 | > l.schemes=http |
|
390 | 391 | > l.prefix=lo |
|
391 | 392 | > l.username=user |
|
392 | 393 | > l.password=pass |
|
393 | 394 | > EOF |
|
394 | 395 | |
|
395 | 396 | $ cat << EOF > userpass.py |
|
396 | 397 | > import base64 |
|
397 | 398 | > from mercurial.hgweb import common |
|
398 | 399 | > def perform_authentication(hgweb, req, op): |
|
399 | 400 | > auth = req.headers.get(b'Authorization') |
|
400 | 401 | > if not auth: |
|
401 | 402 | > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, b'who', |
|
402 | 403 | > [(b'WWW-Authenticate', b'Basic Realm="mercurial"')]) |
|
403 | 404 | > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', |
|
404 | 405 | > b'pass']: |
|
405 | 406 | > raise common.ErrorResponse(common.HTTP_FORBIDDEN, b'no') |
|
406 | 407 | > def extsetup(): |
|
407 | 408 | > common.permhooks.insert(0, perform_authentication) |
|
408 | 409 | > EOF |
|
409 | 410 | |
|
410 | 411 | $ hg --config extensions.x=$TESTTMP/userpass.py \ |
|
411 | 412 | > -R server serve -d -p $HGPORT1 --pid-file=hg.pid \ |
|
412 | 413 | > -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
413 | 414 | $ mv hg.pid $DAEMON_PIDS |
|
414 | 415 | |
|
415 | 416 | $ hg clone --debug http://localhost:$HGPORT1 auth_clone | egrep '^[{}]| ' |
|
416 | 417 | { |
|
417 | 418 | "objects": [ |
|
418 | 419 | { |
|
419 | 420 | "actions": { |
|
420 | 421 | "download": { |
|
421 | 422 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
422 | 423 | "header": { |
|
423 | 424 | "Accept": "application/vnd.git-lfs" |
|
424 | 425 | "Authorization": "Basic dXNlcjpwYXNz" |
|
425 | 426 | } |
|
426 | 427 | "href": "http://localhost:$HGPORT1/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d" |
|
427 | 428 | } |
|
428 | 429 | } |
|
429 | 430 | "oid": "276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d" |
|
430 | 431 | "size": 14 |
|
431 | 432 | } |
|
432 | 433 | ] |
|
433 | 434 | "transfer": "basic" |
|
434 | 435 | } |
|
435 | 436 | |
|
436 | 437 | $ echo 'another blob' > auth_clone/lfs.blob |
|
437 | 438 | $ hg -R auth_clone ci -Aqm 'add blob' |
|
438 | 439 | $ hg -R auth_clone --debug push | egrep '^[{}]| ' |
|
439 | 440 | { |
|
440 | 441 | "objects": [ |
|
441 | 442 | { |
|
442 | 443 | "actions": { |
|
443 | 444 | "upload": { |
|
444 | 445 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
445 | 446 | "header": { |
|
446 | 447 | "Accept": "application/vnd.git-lfs" |
|
447 | 448 | "Authorization": "Basic dXNlcjpwYXNz" |
|
448 | 449 | } |
|
449 | 450 | "href": "http://localhost:$HGPORT1/.hg/lfs/objects/df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3" |
|
450 | 451 | } |
|
451 | 452 | } |
|
452 | 453 | "oid": "df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3" |
|
453 | 454 | "size": 13 |
|
454 | 455 | } |
|
455 | 456 | ] |
|
456 | 457 | "transfer": "basic" |
|
457 | 458 | } |
|
458 | 459 | |
|
459 | 460 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
460 | 461 | |
|
461 | 462 | $ cat $TESTTMP/access.log $TESTTMP/errors.log |
|
462 | 463 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 401 - (glob) |
|
463 | 464 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
464 | 465 | $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) |
|
465 | 466 | $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=506bf3d83f78c54b89e81c6411adee19fdf02156+525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
466 | 467 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 401 - (glob) |
|
467 | 468 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
468 | 469 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d HTTP/1.1" 200 - (glob) |
|
469 | 470 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 401 - (glob) |
|
470 | 471 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
471 | 472 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D525251863cad618e55d483555f3d00a2ca99597e+4d9397055dc0c205f3132f331f36353ab1a525a3 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
472 | 473 | $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) |
|
473 | 474 | $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) |
|
474 | 475 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
475 | 476 | $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) |
|
476 | 477 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 401 - (glob) |
|
477 | 478 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
478 | 479 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/df14287d8d75f076a6459e7a3703ca583ca9fb3f4918caed10c77ac8622d49b3 HTTP/1.1" 201 - (glob) |
|
479 | 480 | $LOCALIP - - [$LOGDATE$] "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) |
|
480 | 481 | $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) |
General Comments 0
You need to be logged in to leave comments.
Login now