##// END OF EJS Templates
tests: port inline extensions in test-http.t to Python 3...
Augie Fackler -
r37751:d43810fe default
parent child Browse files
Show More
@@ -1,556 +1,556 b''
1 #require killdaemons serve
1 #require killdaemons serve
2
2
3 $ hg init test
3 $ hg init test
4 $ cd test
4 $ cd test
5 $ echo foo>foo
5 $ echo foo>foo
6 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
6 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
7 $ echo foo>foo.d/foo
7 $ echo foo>foo.d/foo
8 $ echo bar>foo.d/bAr.hg.d/BaR
8 $ echo bar>foo.d/bAr.hg.d/BaR
9 $ echo bar>foo.d/baR.d.hg/bAR
9 $ echo bar>foo.d/baR.d.hg/bAR
10 $ hg commit -A -m 1
10 $ hg commit -A -m 1
11 adding foo
11 adding foo
12 adding foo.d/bAr.hg.d/BaR
12 adding foo.d/bAr.hg.d/BaR
13 adding foo.d/baR.d.hg/bAR
13 adding foo.d/baR.d.hg/bAR
14 adding foo.d/foo
14 adding foo.d/foo
15 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
15 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
16 $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid
16 $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid
17
17
18 Test server address cannot be reused
18 Test server address cannot be reused
19
19
20 $ hg serve -p $HGPORT1 2>&1
20 $ hg serve -p $HGPORT1 2>&1
21 abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$
21 abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$
22 [255]
22 [255]
23
23
24 $ cd ..
24 $ cd ..
25 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
25 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
26
26
27 clone via stream
27 clone via stream
28
28
29 #if no-reposimplestore
29 #if no-reposimplestore
30 $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
30 $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
31 streaming all changes
31 streaming all changes
32 6 files to transfer, 606 bytes of data
32 6 files to transfer, 606 bytes of data
33 transferred * bytes in * seconds (*/sec) (glob)
33 transferred * bytes in * seconds (*/sec) (glob)
34 searching for changes
34 searching for changes
35 no changes found
35 no changes found
36 updating to branch default
36 updating to branch default
37 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
38 $ hg verify -R copy
38 $ hg verify -R copy
39 checking changesets
39 checking changesets
40 checking manifests
40 checking manifests
41 crosschecking files in changesets and manifests
41 crosschecking files in changesets and manifests
42 checking files
42 checking files
43 4 files, 1 changesets, 4 total revisions
43 4 files, 1 changesets, 4 total revisions
44 #endif
44 #endif
45
45
46 try to clone via stream, should use pull instead
46 try to clone via stream, should use pull instead
47
47
48 $ hg clone --stream http://localhost:$HGPORT1/ copy2
48 $ hg clone --stream http://localhost:$HGPORT1/ copy2
49 warning: stream clone requested but server has them disabled
49 warning: stream clone requested but server has them disabled
50 requesting all changes
50 requesting all changes
51 adding changesets
51 adding changesets
52 adding manifests
52 adding manifests
53 adding file changes
53 adding file changes
54 added 1 changesets with 4 changes to 4 files
54 added 1 changesets with 4 changes to 4 files
55 new changesets 8b6053c928fe
55 new changesets 8b6053c928fe
56 updating to branch default
56 updating to branch default
57 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
58
58
59 try to clone via stream but missing requirements, so should use pull instead
59 try to clone via stream but missing requirements, so should use pull instead
60
60
61 $ cat > $TESTTMP/removesupportedformat.py << EOF
61 $ cat > $TESTTMP/removesupportedformat.py << EOF
62 > from mercurial import localrepo
62 > from mercurial import localrepo
63 > def extsetup(ui):
63 > def extsetup(ui):
64 > localrepo.localrepository.supportedformats.remove('generaldelta')
64 > localrepo.localrepository.supportedformats.remove(b'generaldelta')
65 > EOF
65 > EOF
66
66
67 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
67 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
68 warning: stream clone requested but client is missing requirements: generaldelta
68 warning: stream clone requested but client is missing requirements: generaldelta
69 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
69 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
70 requesting all changes
70 requesting all changes
71 adding changesets
71 adding changesets
72 adding manifests
72 adding manifests
73 adding file changes
73 adding file changes
74 added 1 changesets with 4 changes to 4 files
74 added 1 changesets with 4 changes to 4 files
75 new changesets 8b6053c928fe
75 new changesets 8b6053c928fe
76 updating to branch default
76 updating to branch default
77 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
77 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
78
78
79 clone via pull
79 clone via pull
80
80
81 $ hg clone http://localhost:$HGPORT1/ copy-pull
81 $ hg clone http://localhost:$HGPORT1/ copy-pull
82 requesting all changes
82 requesting all changes
83 adding changesets
83 adding changesets
84 adding manifests
84 adding manifests
85 adding file changes
85 adding file changes
86 added 1 changesets with 4 changes to 4 files
86 added 1 changesets with 4 changes to 4 files
87 new changesets 8b6053c928fe
87 new changesets 8b6053c928fe
88 updating to branch default
88 updating to branch default
89 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
89 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 $ hg verify -R copy-pull
90 $ hg verify -R copy-pull
91 checking changesets
91 checking changesets
92 checking manifests
92 checking manifests
93 crosschecking files in changesets and manifests
93 crosschecking files in changesets and manifests
94 checking files
94 checking files
95 4 files, 1 changesets, 4 total revisions
95 4 files, 1 changesets, 4 total revisions
96 $ cd test
96 $ cd test
97 $ echo bar > bar
97 $ echo bar > bar
98 $ hg commit -A -d '1 0' -m 2
98 $ hg commit -A -d '1 0' -m 2
99 adding bar
99 adding bar
100 $ cd ..
100 $ cd ..
101
101
102 clone over http with --update
102 clone over http with --update
103
103
104 $ hg clone http://localhost:$HGPORT1/ updated --update 0
104 $ hg clone http://localhost:$HGPORT1/ updated --update 0
105 requesting all changes
105 requesting all changes
106 adding changesets
106 adding changesets
107 adding manifests
107 adding manifests
108 adding file changes
108 adding file changes
109 added 2 changesets with 5 changes to 5 files
109 added 2 changesets with 5 changes to 5 files
110 new changesets 8b6053c928fe:5fed3813f7f5
110 new changesets 8b6053c928fe:5fed3813f7f5
111 updating to branch default
111 updating to branch default
112 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
112 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
113 $ hg log -r . -R updated
113 $ hg log -r . -R updated
114 changeset: 0:8b6053c928fe
114 changeset: 0:8b6053c928fe
115 user: test
115 user: test
116 date: Thu Jan 01 00:00:00 1970 +0000
116 date: Thu Jan 01 00:00:00 1970 +0000
117 summary: 1
117 summary: 1
118
118
119 $ rm -rf updated
119 $ rm -rf updated
120
120
121 incoming via HTTP
121 incoming via HTTP
122
122
123 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
123 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
124 adding changesets
124 adding changesets
125 adding manifests
125 adding manifests
126 adding file changes
126 adding file changes
127 added 1 changesets with 4 changes to 4 files
127 added 1 changesets with 4 changes to 4 files
128 new changesets 8b6053c928fe
128 new changesets 8b6053c928fe
129 updating to branch default
129 updating to branch default
130 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
130 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
131 $ cd partial
131 $ cd partial
132 $ touch LOCAL
132 $ touch LOCAL
133 $ hg ci -qAm LOCAL
133 $ hg ci -qAm LOCAL
134 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
134 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
135 comparing with http://localhost:$HGPORT1/
135 comparing with http://localhost:$HGPORT1/
136 searching for changes
136 searching for changes
137 2
137 2
138 $ cd ..
138 $ cd ..
139
139
140 pull
140 pull
141
141
142 $ cd copy-pull
142 $ cd copy-pull
143 $ cat >> .hg/hgrc <<EOF
143 $ cat >> .hg/hgrc <<EOF
144 > [hooks]
144 > [hooks]
145 > changegroup = sh -c "printenv.py changegroup"
145 > changegroup = sh -c "printenv.py changegroup"
146 > EOF
146 > EOF
147 $ hg pull
147 $ hg pull
148 pulling from http://localhost:$HGPORT1/
148 pulling from http://localhost:$HGPORT1/
149 searching for changes
149 searching for changes
150 adding changesets
150 adding changesets
151 adding manifests
151 adding manifests
152 adding file changes
152 adding file changes
153 added 1 changesets with 1 changes to 1 files
153 added 1 changesets with 1 changes to 1 files
154 new changesets 5fed3813f7f5
154 new changesets 5fed3813f7f5
155 changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=http://localhost:$HGPORT1/
155 changegroup hook: HG_HOOKNAME=changegroup HG_HOOKTYPE=changegroup HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_URL=http://localhost:$HGPORT1/
156 (run 'hg update' to get a working copy)
156 (run 'hg update' to get a working copy)
157 $ cd ..
157 $ cd ..
158
158
159 clone from invalid URL
159 clone from invalid URL
160
160
161 $ hg clone http://localhost:$HGPORT/bad
161 $ hg clone http://localhost:$HGPORT/bad
162 abort: HTTP Error 404: Not Found
162 abort: HTTP Error 404: Not Found
163 [255]
163 [255]
164
164
165 test http authentication
165 test http authentication
166 + use the same server to test server side streaming preference
166 + use the same server to test server side streaming preference
167
167
168 $ cd test
168 $ cd test
169 $ cat << EOT > userpass.py
169 $ cat << EOT > userpass.py
170 > import base64
170 > import base64
171 > from mercurial.hgweb import common
171 > from mercurial.hgweb import common
172 > def perform_authentication(hgweb, req, op):
172 > def perform_authentication(hgweb, req, op):
173 > auth = req.headers.get('Authorization')
173 > auth = req.headers.get(b'Authorization')
174 > if not auth:
174 > if not auth:
175 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
175 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, b'who',
176 > [('WWW-Authenticate', 'Basic Realm="mercurial"')])
176 > [(b'WWW-Authenticate', b'Basic Realm="mercurial"')])
177 > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
177 > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user', b'pass']:
178 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
178 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, b'no')
179 > def extsetup():
179 > def extsetup():
180 > common.permhooks.insert(0, perform_authentication)
180 > common.permhooks.insert(0, perform_authentication)
181 > EOT
181 > EOT
182 $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
182 $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
183 > --config server.preferuncompressed=True \
183 > --config server.preferuncompressed=True \
184 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
184 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
185 $ cat pid >> $DAEMON_PIDS
185 $ cat pid >> $DAEMON_PIDS
186
186
187 $ cat << EOF > get_pass.py
187 $ cat << EOF > get_pass.py
188 > import getpass
188 > import getpass
189 > def newgetpass(arg):
189 > def newgetpass(arg):
190 > return "pass"
190 > return "pass"
191 > getpass.getpass = newgetpass
191 > getpass.getpass = newgetpass
192 > EOF
192 > EOF
193
193
194 $ hg id http://localhost:$HGPORT2/
194 $ hg id http://localhost:$HGPORT2/
195 abort: http authorization required for http://localhost:$HGPORT2/
195 abort: http authorization required for http://localhost:$HGPORT2/
196 [255]
196 [255]
197 $ hg id http://localhost:$HGPORT2/
197 $ hg id http://localhost:$HGPORT2/
198 abort: http authorization required for http://localhost:$HGPORT2/
198 abort: http authorization required for http://localhost:$HGPORT2/
199 [255]
199 [255]
200 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
200 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
201 http authorization required for http://localhost:$HGPORT2/
201 http authorization required for http://localhost:$HGPORT2/
202 realm: mercurial
202 realm: mercurial
203 user: user
203 user: user
204 password: 5fed3813f7f5
204 password: 5fed3813f7f5
205 $ hg id http://user:pass@localhost:$HGPORT2/
205 $ hg id http://user:pass@localhost:$HGPORT2/
206 5fed3813f7f5
206 5fed3813f7f5
207 $ echo '[auth]' >> .hg/hgrc
207 $ echo '[auth]' >> .hg/hgrc
208 $ echo 'l.schemes=http' >> .hg/hgrc
208 $ echo 'l.schemes=http' >> .hg/hgrc
209 $ echo 'l.prefix=lo' >> .hg/hgrc
209 $ echo 'l.prefix=lo' >> .hg/hgrc
210 $ echo 'l.username=user' >> .hg/hgrc
210 $ echo 'l.username=user' >> .hg/hgrc
211 $ echo 'l.password=pass' >> .hg/hgrc
211 $ echo 'l.password=pass' >> .hg/hgrc
212 $ hg id http://localhost:$HGPORT2/
212 $ hg id http://localhost:$HGPORT2/
213 5fed3813f7f5
213 5fed3813f7f5
214 $ hg id http://localhost:$HGPORT2/
214 $ hg id http://localhost:$HGPORT2/
215 5fed3813f7f5
215 5fed3813f7f5
216 $ hg id http://user@localhost:$HGPORT2/
216 $ hg id http://user@localhost:$HGPORT2/
217 5fed3813f7f5
217 5fed3813f7f5
218
218
219 #if no-reposimplestore
219 #if no-reposimplestore
220 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
220 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
221 streaming all changes
221 streaming all changes
222 7 files to transfer, 916 bytes of data
222 7 files to transfer, 916 bytes of data
223 transferred * bytes in * seconds (*/sec) (glob)
223 transferred * bytes in * seconds (*/sec) (glob)
224 searching for changes
224 searching for changes
225 no changes found
225 no changes found
226 updating to branch default
226 updating to branch default
227 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
227 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
228 #endif
228 #endif
229
229
230 --pull should override server's preferuncompressed
230 --pull should override server's preferuncompressed
231 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
231 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
232 requesting all changes
232 requesting all changes
233 adding changesets
233 adding changesets
234 adding manifests
234 adding manifests
235 adding file changes
235 adding file changes
236 added 2 changesets with 5 changes to 5 files
236 added 2 changesets with 5 changes to 5 files
237 new changesets 8b6053c928fe:5fed3813f7f5
237 new changesets 8b6053c928fe:5fed3813f7f5
238 updating to branch default
238 updating to branch default
239 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
239 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
240
240
241 $ hg id http://user2@localhost:$HGPORT2/
241 $ hg id http://user2@localhost:$HGPORT2/
242 abort: http authorization required for http://localhost:$HGPORT2/
242 abort: http authorization required for http://localhost:$HGPORT2/
243 [255]
243 [255]
244 $ hg id http://user:pass2@localhost:$HGPORT2/
244 $ hg id http://user:pass2@localhost:$HGPORT2/
245 abort: HTTP Error 403: no
245 abort: HTTP Error 403: no
246 [255]
246 [255]
247
247
248 $ hg -R dest-pull tag -r tip top
248 $ hg -R dest-pull tag -r tip top
249 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
249 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
250 pushing to http://user:***@localhost:$HGPORT2/
250 pushing to http://user:***@localhost:$HGPORT2/
251 searching for changes
251 searching for changes
252 remote: adding changesets
252 remote: adding changesets
253 remote: adding manifests
253 remote: adding manifests
254 remote: adding file changes
254 remote: adding file changes
255 remote: added 1 changesets with 1 changes to 1 files
255 remote: added 1 changesets with 1 changes to 1 files
256 $ hg rollback -q
256 $ hg rollback -q
257 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ --debug --config devel.debug.peer-request=yes
257 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ --debug --config devel.debug.peer-request=yes
258 pushing to http://user:***@localhost:$HGPORT2/
258 pushing to http://user:***@localhost:$HGPORT2/
259 using http://localhost:$HGPORT2/
259 using http://localhost:$HGPORT2/
260 http auth: user user, password ****
260 http auth: user user, password ****
261 sending capabilities command
261 sending capabilities command
262 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=capabilities
262 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=capabilities
263 http auth: user user, password ****
263 http auth: user user, password ****
264 devel-peer-request: finished in *.???? seconds (200) (glob)
264 devel-peer-request: finished in *.???? seconds (200) (glob)
265 query 1; heads
265 query 1; heads
266 devel-peer-request: batched-content
266 devel-peer-request: batched-content
267 devel-peer-request: - heads (0 arguments)
267 devel-peer-request: - heads (0 arguments)
268 devel-peer-request: - known (1 arguments)
268 devel-peer-request: - known (1 arguments)
269 sending batch command
269 sending batch command
270 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=batch
270 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=batch
271 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
271 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
272 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
272 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
273 devel-peer-request: 68 bytes of commands arguments in headers
273 devel-peer-request: 68 bytes of commands arguments in headers
274 devel-peer-request: finished in *.???? seconds (200) (glob)
274 devel-peer-request: finished in *.???? seconds (200) (glob)
275 searching for changes
275 searching for changes
276 all remote heads known locally
276 all remote heads known locally
277 preparing listkeys for "phases"
277 preparing listkeys for "phases"
278 sending listkeys command
278 sending listkeys command
279 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
279 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
280 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
280 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
281 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
281 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
282 devel-peer-request: 16 bytes of commands arguments in headers
282 devel-peer-request: 16 bytes of commands arguments in headers
283 devel-peer-request: finished in *.???? seconds (200) (glob)
283 devel-peer-request: finished in *.???? seconds (200) (glob)
284 received listkey for "phases": 58 bytes
284 received listkey for "phases": 58 bytes
285 checking for updated bookmarks
285 checking for updated bookmarks
286 preparing listkeys for "bookmarks"
286 preparing listkeys for "bookmarks"
287 sending listkeys command
287 sending listkeys command
288 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
288 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
289 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
289 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
290 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
290 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
291 devel-peer-request: 19 bytes of commands arguments in headers
291 devel-peer-request: 19 bytes of commands arguments in headers
292 devel-peer-request: finished in *.???? seconds (200) (glob)
292 devel-peer-request: finished in *.???? seconds (200) (glob)
293 received listkey for "bookmarks": 0 bytes
293 received listkey for "bookmarks": 0 bytes
294 sending branchmap command
294 sending branchmap command
295 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap
295 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap
296 devel-peer-request: Vary X-HgProto-1
296 devel-peer-request: Vary X-HgProto-1
297 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
297 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
298 devel-peer-request: finished in *.???? seconds (200) (glob)
298 devel-peer-request: finished in *.???? seconds (200) (glob)
299 preparing listkeys for "bookmarks"
299 preparing listkeys for "bookmarks"
300 sending listkeys command
300 sending listkeys command
301 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
301 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
302 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
302 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
303 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
303 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
304 devel-peer-request: 19 bytes of commands arguments in headers
304 devel-peer-request: 19 bytes of commands arguments in headers
305 devel-peer-request: finished in *.???? seconds (200) (glob)
305 devel-peer-request: finished in *.???? seconds (200) (glob)
306 received listkey for "bookmarks": 0 bytes
306 received listkey for "bookmarks": 0 bytes
307 1 changesets found
307 1 changesets found
308 list of changesets:
308 list of changesets:
309 7f4e523d01f2cc3765ac8934da3d14db775ff872
309 7f4e523d01f2cc3765ac8934da3d14db775ff872
310 bundle2-output-bundle: "HG20", 5 parts total
310 bundle2-output-bundle: "HG20", 5 parts total
311 bundle2-output-part: "replycaps" 205 bytes payload
311 bundle2-output-part: "replycaps" 205 bytes payload
312 bundle2-output-part: "check:phases" 24 bytes payload
312 bundle2-output-part: "check:phases" 24 bytes payload
313 bundle2-output-part: "check:heads" streamed payload
313 bundle2-output-part: "check:heads" streamed payload
314 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
314 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
315 bundle2-output-part: "phase-heads" 24 bytes payload
315 bundle2-output-part: "phase-heads" 24 bytes payload
316 sending unbundle command
316 sending unbundle command
317 sending 1013 bytes
317 sending 1013 bytes
318 devel-peer-request: POST http://localhost:$HGPORT2/?cmd=unbundle
318 devel-peer-request: POST http://localhost:$HGPORT2/?cmd=unbundle
319 devel-peer-request: Content-length 1013
319 devel-peer-request: Content-length 1013
320 devel-peer-request: Content-type application/mercurial-0.1
320 devel-peer-request: Content-type application/mercurial-0.1
321 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
321 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
322 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
322 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
323 devel-peer-request: 16 bytes of commands arguments in headers
323 devel-peer-request: 16 bytes of commands arguments in headers
324 devel-peer-request: 1013 bytes of data
324 devel-peer-request: 1013 bytes of data
325 devel-peer-request: finished in *.???? seconds (200) (glob)
325 devel-peer-request: finished in *.???? seconds (200) (glob)
326 bundle2-input-bundle: no-transaction
326 bundle2-input-bundle: no-transaction
327 bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
327 bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
328 bundle2-input-part: "output" (advisory) (params: 0 advisory) supported
328 bundle2-input-part: "output" (advisory) (params: 0 advisory) supported
329 bundle2-input-part: total payload size 100
329 bundle2-input-part: total payload size 100
330 remote: adding changesets
330 remote: adding changesets
331 remote: adding manifests
331 remote: adding manifests
332 remote: adding file changes
332 remote: adding file changes
333 remote: added 1 changesets with 1 changes to 1 files
333 remote: added 1 changesets with 1 changes to 1 files
334 bundle2-input-part: "output" (advisory) supported
334 bundle2-input-part: "output" (advisory) supported
335 bundle2-input-bundle: 2 parts total
335 bundle2-input-bundle: 2 parts total
336 preparing listkeys for "phases"
336 preparing listkeys for "phases"
337 sending listkeys command
337 sending listkeys command
338 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
338 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
339 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
339 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
340 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
340 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
341 devel-peer-request: 16 bytes of commands arguments in headers
341 devel-peer-request: 16 bytes of commands arguments in headers
342 devel-peer-request: finished in *.???? seconds (200) (glob)
342 devel-peer-request: finished in *.???? seconds (200) (glob)
343 received listkey for "phases": 15 bytes
343 received listkey for "phases": 15 bytes
344 $ hg rollback -q
344 $ hg rollback -q
345
345
346 $ sed 's/.*] "/"/' < ../access.log
346 $ sed 's/.*] "/"/' < ../access.log
347 "GET /?cmd=capabilities HTTP/1.1" 401 -
347 "GET /?cmd=capabilities HTTP/1.1" 401 -
348 "GET /?cmd=capabilities HTTP/1.1" 401 -
348 "GET /?cmd=capabilities HTTP/1.1" 401 -
349 "GET /?cmd=capabilities HTTP/1.1" 401 -
349 "GET /?cmd=capabilities HTTP/1.1" 401 -
350 "GET /?cmd=capabilities HTTP/1.1" 200 -
350 "GET /?cmd=capabilities HTTP/1.1" 200 -
351 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
351 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
352 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
352 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
353 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
353 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
354 "GET /?cmd=capabilities HTTP/1.1" 401 -
354 "GET /?cmd=capabilities HTTP/1.1" 401 -
355 "GET /?cmd=capabilities HTTP/1.1" 200 -
355 "GET /?cmd=capabilities HTTP/1.1" 200 -
356 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
356 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
357 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
357 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
358 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
358 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
359 "GET /?cmd=capabilities HTTP/1.1" 401 -
359 "GET /?cmd=capabilities HTTP/1.1" 401 -
360 "GET /?cmd=capabilities HTTP/1.1" 200 -
360 "GET /?cmd=capabilities HTTP/1.1" 200 -
361 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
361 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
362 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
362 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
363 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
363 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
364 "GET /?cmd=capabilities HTTP/1.1" 401 -
364 "GET /?cmd=capabilities HTTP/1.1" 401 -
365 "GET /?cmd=capabilities HTTP/1.1" 200 -
365 "GET /?cmd=capabilities HTTP/1.1" 200 -
366 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
366 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
367 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
367 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
368 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
368 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
369 "GET /?cmd=capabilities HTTP/1.1" 401 -
369 "GET /?cmd=capabilities HTTP/1.1" 401 -
370 "GET /?cmd=capabilities HTTP/1.1" 200 -
370 "GET /?cmd=capabilities HTTP/1.1" 200 -
371 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
371 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
372 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
372 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
373 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
373 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
374 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
374 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
375 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
375 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
376 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
376 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
377 "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
377 "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
378 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
378 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
379 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
379 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
380 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
380 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
381 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
381 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
382 "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
382 "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
383 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
383 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
384 "GET /?cmd=capabilities HTTP/1.1" 401 -
384 "GET /?cmd=capabilities HTTP/1.1" 401 -
385 "GET /?cmd=capabilities HTTP/1.1" 401 -
385 "GET /?cmd=capabilities HTTP/1.1" 401 -
386 "GET /?cmd=capabilities HTTP/1.1" 403 -
386 "GET /?cmd=capabilities HTTP/1.1" 403 -
387 "GET /?cmd=capabilities HTTP/1.1" 401 -
387 "GET /?cmd=capabilities HTTP/1.1" 401 -
388 "GET /?cmd=capabilities HTTP/1.1" 200 -
388 "GET /?cmd=capabilities HTTP/1.1" 200 -
389 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
389 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
390 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
390 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
391 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
391 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
392 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
392 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
393 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
393 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
394 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365* (glob)
394 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365* (glob)
395 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
395 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
396 "GET /?cmd=capabilities HTTP/1.1" 401 -
396 "GET /?cmd=capabilities HTTP/1.1" 401 -
397 "GET /?cmd=capabilities HTTP/1.1" 200 -
397 "GET /?cmd=capabilities HTTP/1.1" 200 -
398 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
398 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
399 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
399 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
400 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
400 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
401 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
401 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
402 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
402 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
403 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
403 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
404 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
404 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
405
405
406 $ cd ..
406 $ cd ..
407
407
408 clone of serve with repo in root and unserved subrepo (issue2970)
408 clone of serve with repo in root and unserved subrepo (issue2970)
409
409
410 $ hg --cwd test init sub
410 $ hg --cwd test init sub
411 $ echo empty > test/sub/empty
411 $ echo empty > test/sub/empty
412 $ hg --cwd test/sub add empty
412 $ hg --cwd test/sub add empty
413 $ hg --cwd test/sub commit -qm 'add empty'
413 $ hg --cwd test/sub commit -qm 'add empty'
414 $ hg --cwd test/sub tag -r 0 something
414 $ hg --cwd test/sub tag -r 0 something
415 $ echo sub = sub > test/.hgsub
415 $ echo sub = sub > test/.hgsub
416 $ hg --cwd test add .hgsub
416 $ hg --cwd test add .hgsub
417 $ hg --cwd test commit -qm 'add subrepo'
417 $ hg --cwd test commit -qm 'add subrepo'
418 $ hg clone http://localhost:$HGPORT noslash-clone
418 $ hg clone http://localhost:$HGPORT noslash-clone
419 requesting all changes
419 requesting all changes
420 adding changesets
420 adding changesets
421 adding manifests
421 adding manifests
422 adding file changes
422 adding file changes
423 added 3 changesets with 7 changes to 7 files
423 added 3 changesets with 7 changes to 7 files
424 new changesets 8b6053c928fe:56f9bc90cce6
424 new changesets 8b6053c928fe:56f9bc90cce6
425 updating to branch default
425 updating to branch default
426 abort: HTTP Error 404: Not Found
426 abort: HTTP Error 404: Not Found
427 [255]
427 [255]
428 $ hg clone http://localhost:$HGPORT/ slash-clone
428 $ hg clone http://localhost:$HGPORT/ slash-clone
429 requesting all changes
429 requesting all changes
430 adding changesets
430 adding changesets
431 adding manifests
431 adding manifests
432 adding file changes
432 adding file changes
433 added 3 changesets with 7 changes to 7 files
433 added 3 changesets with 7 changes to 7 files
434 new changesets 8b6053c928fe:56f9bc90cce6
434 new changesets 8b6053c928fe:56f9bc90cce6
435 updating to branch default
435 updating to branch default
436 abort: HTTP Error 404: Not Found
436 abort: HTTP Error 404: Not Found
437 [255]
437 [255]
438
438
439 check error log
439 check error log
440
440
441 $ cat error.log
441 $ cat error.log
442
442
443 check abort error reporting while pulling/cloning
443 check abort error reporting while pulling/cloning
444
444
445 $ $RUNTESTDIR/killdaemons.py
445 $ $RUNTESTDIR/killdaemons.py
446 $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
446 $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
447 $ cat hg3.pid >> $DAEMON_PIDS
447 $ cat hg3.pid >> $DAEMON_PIDS
448 $ hg clone http://localhost:$HGPORT/ abort-clone
448 $ hg clone http://localhost:$HGPORT/ abort-clone
449 requesting all changes
449 requesting all changes
450 remote: abort: this is an exercise
450 remote: abort: this is an exercise
451 abort: pull failed on remote
451 abort: pull failed on remote
452 [255]
452 [255]
453 $ cat error.log
453 $ cat error.log
454
454
455 disable pull-based clones
455 disable pull-based clones
456
456
457 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True
457 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True
458 $ cat hg4.pid >> $DAEMON_PIDS
458 $ cat hg4.pid >> $DAEMON_PIDS
459 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone
459 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone
460 requesting all changes
460 requesting all changes
461 remote: abort: server has pull-based clones disabled
461 remote: abort: server has pull-based clones disabled
462 abort: pull failed on remote
462 abort: pull failed on remote
463 (remove --pull if specified or upgrade Mercurial)
463 (remove --pull if specified or upgrade Mercurial)
464 [255]
464 [255]
465
465
466 #if no-reposimplestore
466 #if no-reposimplestore
467 ... but keep stream clones working
467 ... but keep stream clones working
468
468
469 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
469 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
470 streaming all changes
470 streaming all changes
471 * files to transfer, * of data (glob)
471 * files to transfer, * of data (glob)
472 transferred * in * seconds (*/sec) (glob)
472 transferred * in * seconds (*/sec) (glob)
473 searching for changes
473 searching for changes
474 no changes found
474 no changes found
475 $ cat error.log
475 $ cat error.log
476 #endif
476 #endif
477
477
478 ... and also keep partial clones and pulls working
478 ... and also keep partial clones and pulls working
479 $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone
479 $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone
480 adding changesets
480 adding changesets
481 adding manifests
481 adding manifests
482 adding file changes
482 adding file changes
483 added 1 changesets with 4 changes to 4 files
483 added 1 changesets with 4 changes to 4 files
484 new changesets 8b6053c928fe
484 new changesets 8b6053c928fe
485 updating to branch default
485 updating to branch default
486 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
486 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
487 $ hg pull -R test-partial-clone
487 $ hg pull -R test-partial-clone
488 pulling from http://localhost:$HGPORT1/
488 pulling from http://localhost:$HGPORT1/
489 searching for changes
489 searching for changes
490 adding changesets
490 adding changesets
491 adding manifests
491 adding manifests
492 adding file changes
492 adding file changes
493 added 2 changesets with 3 changes to 3 files
493 added 2 changesets with 3 changes to 3 files
494 new changesets 5fed3813f7f5:56f9bc90cce6
494 new changesets 5fed3813f7f5:56f9bc90cce6
495 (run 'hg update' to get a working copy)
495 (run 'hg update' to get a working copy)
496
496
497 corrupt cookies file should yield a warning
497 corrupt cookies file should yield a warning
498
498
499 $ cat > $TESTTMP/cookies.txt << EOF
499 $ cat > $TESTTMP/cookies.txt << EOF
500 > bad format
500 > bad format
501 > EOF
501 > EOF
502
502
503 $ hg --config auth.cookiefile=$TESTTMP/cookies.txt id http://localhost:$HGPORT/
503 $ hg --config auth.cookiefile=$TESTTMP/cookies.txt id http://localhost:$HGPORT/
504 (error loading cookie file $TESTTMP/cookies.txt: '*/cookies.txt' does not look like a Netscape format cookies file; continuing without cookies) (glob)
504 (error loading cookie file $TESTTMP/cookies.txt: '*/cookies.txt' does not look like a Netscape format cookies file; continuing without cookies) (glob)
505 56f9bc90cce6
505 56f9bc90cce6
506
506
507 $ killdaemons.py
507 $ killdaemons.py
508
508
509 Create dummy authentication handler that looks for cookies. It doesn't do anything
509 Create dummy authentication handler that looks for cookies. It doesn't do anything
510 useful. It just raises an HTTP 500 with details about the Cookie request header.
510 useful. It just raises an HTTP 500 with details about the Cookie request header.
511 We raise HTTP 500 because its message is printed in the abort message.
511 We raise HTTP 500 because its message is printed in the abort message.
512
512
513 $ cat > cookieauth.py << EOF
513 $ cat > cookieauth.py << EOF
514 > from mercurial import util
514 > from mercurial import util
515 > from mercurial.hgweb import common
515 > from mercurial.hgweb import common
516 > def perform_authentication(hgweb, req, op):
516 > def perform_authentication(hgweb, req, op):
517 > cookie = req.headers.get('Cookie')
517 > cookie = req.headers.get(b'Cookie')
518 > if not cookie:
518 > if not cookie:
519 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'no-cookie')
519 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, b'no-cookie')
520 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, 'Cookie: %s' % cookie)
520 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, b'Cookie: %s' % cookie)
521 > def extsetup():
521 > def extsetup():
522 > common.permhooks.insert(0, perform_authentication)
522 > common.permhooks.insert(0, perform_authentication)
523 > EOF
523 > EOF
524
524
525 $ hg serve --config extensions.cookieauth=cookieauth.py -R test -p $HGPORT -d --pid-file=pid
525 $ hg serve --config extensions.cookieauth=cookieauth.py -R test -p $HGPORT -d --pid-file=pid
526 $ cat pid > $DAEMON_PIDS
526 $ cat pid > $DAEMON_PIDS
527
527
528 Request without cookie sent should fail due to lack of cookie
528 Request without cookie sent should fail due to lack of cookie
529
529
530 $ hg id http://localhost:$HGPORT
530 $ hg id http://localhost:$HGPORT
531 abort: HTTP Error 500: no-cookie
531 abort: HTTP Error 500: no-cookie
532 [255]
532 [255]
533
533
534 Populate a cookies file
534 Populate a cookies file
535
535
536 $ cat > cookies.txt << EOF
536 $ cat > cookies.txt << EOF
537 > # HTTP Cookie File
537 > # HTTP Cookie File
538 > # Expiration is 2030-01-01 at midnight
538 > # Expiration is 2030-01-01 at midnight
539 > .example.com TRUE / FALSE 1893456000 hgkey examplevalue
539 > .example.com TRUE / FALSE 1893456000 hgkey examplevalue
540 > EOF
540 > EOF
541
541
542 Should not send a cookie for another domain
542 Should not send a cookie for another domain
543
543
544 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
544 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
545 abort: HTTP Error 500: no-cookie
545 abort: HTTP Error 500: no-cookie
546 [255]
546 [255]
547
547
548 Add a cookie entry for our test server and verify it is sent
548 Add a cookie entry for our test server and verify it is sent
549
549
550 $ cat >> cookies.txt << EOF
550 $ cat >> cookies.txt << EOF
551 > localhost.local FALSE / FALSE 1893456000 hgkey localhostvalue
551 > localhost.local FALSE / FALSE 1893456000 hgkey localhostvalue
552 > EOF
552 > EOF
553
553
554 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
554 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
555 abort: HTTP Error 500: Cookie: hgkey=localhostvalue
555 abort: HTTP Error 500: Cookie: hgkey=localhostvalue
556 [255]
556 [255]
General Comments 0
You need to be logged in to leave comments. Login now