##// END OF EJS Templates
tests: port inline extension in test-http-bundle1.t to py3...
Augie Fackler -
r37701:e481d54f default
parent child Browse files
Show More
@@ -1,412 +1,412
1 #require serve
1 #require serve
2
2
3 This test is a duplicate of 'test-http.t', feel free to factor out
3 This test is a duplicate of 'test-http.t', feel free to factor out
4 parts that are not bundle1/bundle2 specific.
4 parts that are not bundle1/bundle2 specific.
5
5
6 $ cat << EOF >> $HGRCPATH
6 $ cat << EOF >> $HGRCPATH
7 > [devel]
7 > [devel]
8 > # This test is dedicated to interaction through old bundle
8 > # This test is dedicated to interaction through old bundle
9 > legacy.exchange = bundle1
9 > legacy.exchange = bundle1
10 > EOF
10 > EOF
11
11
12 $ hg init test
12 $ hg init test
13 $ cd test
13 $ cd test
14 $ echo foo>foo
14 $ echo foo>foo
15 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
15 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
16 $ echo foo>foo.d/foo
16 $ echo foo>foo.d/foo
17 $ echo bar>foo.d/bAr.hg.d/BaR
17 $ echo bar>foo.d/bAr.hg.d/BaR
18 $ echo bar>foo.d/baR.d.hg/bAR
18 $ echo bar>foo.d/baR.d.hg/bAR
19 $ hg commit -A -m 1
19 $ hg commit -A -m 1
20 adding foo
20 adding foo
21 adding foo.d/bAr.hg.d/BaR
21 adding foo.d/bAr.hg.d/BaR
22 adding foo.d/baR.d.hg/bAR
22 adding foo.d/baR.d.hg/bAR
23 adding foo.d/foo
23 adding foo.d/foo
24 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
24 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
25 $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid
25 $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid
26
26
27 Test server address cannot be reused
27 Test server address cannot be reused
28
28
29 $ hg serve -p $HGPORT1 2>&1
29 $ hg serve -p $HGPORT1 2>&1
30 abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$
30 abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$
31 [255]
31 [255]
32
32
33 $ cd ..
33 $ cd ..
34 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
34 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
35
35
36 clone via stream
36 clone via stream
37
37
38 #if no-reposimplestore
38 #if no-reposimplestore
39 $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
39 $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
40 streaming all changes
40 streaming all changes
41 6 files to transfer, 606 bytes of data
41 6 files to transfer, 606 bytes of data
42 transferred * bytes in * seconds (*/sec) (glob)
42 transferred * bytes in * seconds (*/sec) (glob)
43 searching for changes
43 searching for changes
44 no changes found
44 no changes found
45 updating to branch default
45 updating to branch default
46 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 $ hg verify -R copy
47 $ hg verify -R copy
48 checking changesets
48 checking changesets
49 checking manifests
49 checking manifests
50 crosschecking files in changesets and manifests
50 crosschecking files in changesets and manifests
51 checking files
51 checking files
52 4 files, 1 changesets, 4 total revisions
52 4 files, 1 changesets, 4 total revisions
53 #endif
53 #endif
54
54
55 try to clone via stream, should use pull instead
55 try to clone via stream, should use pull instead
56
56
57 $ hg clone --stream http://localhost:$HGPORT1/ copy2
57 $ hg clone --stream http://localhost:$HGPORT1/ copy2
58 warning: stream clone requested but server has them disabled
58 warning: stream clone requested but server has them disabled
59 requesting all changes
59 requesting all changes
60 adding changesets
60 adding changesets
61 adding manifests
61 adding manifests
62 adding file changes
62 adding file changes
63 added 1 changesets with 4 changes to 4 files
63 added 1 changesets with 4 changes to 4 files
64 new changesets 8b6053c928fe
64 new changesets 8b6053c928fe
65 updating to branch default
65 updating to branch default
66 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
66 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
67
67
68 try to clone via stream but missing requirements, so should use pull instead
68 try to clone via stream but missing requirements, so should use pull instead
69
69
70 $ cat > $TESTTMP/removesupportedformat.py << EOF
70 $ cat > $TESTTMP/removesupportedformat.py << EOF
71 > from mercurial import localrepo
71 > from mercurial import localrepo
72 > def extsetup(ui):
72 > def extsetup(ui):
73 > localrepo.localrepository.supportedformats.remove(b'generaldelta')
73 > localrepo.localrepository.supportedformats.remove(b'generaldelta')
74 > EOF
74 > EOF
75
75
76 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
76 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
77 warning: stream clone requested but client is missing requirements: generaldelta
77 warning: stream clone requested but client is missing requirements: generaldelta
78 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
78 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
79 requesting all changes
79 requesting all changes
80 adding changesets
80 adding changesets
81 adding manifests
81 adding manifests
82 adding file changes
82 adding file changes
83 added 1 changesets with 4 changes to 4 files
83 added 1 changesets with 4 changes to 4 files
84 new changesets 8b6053c928fe
84 new changesets 8b6053c928fe
85 updating to branch default
85 updating to branch default
86 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
86 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
87
87
88 clone via pull
88 clone via pull
89
89
90 $ hg clone http://localhost:$HGPORT1/ copy-pull
90 $ hg clone http://localhost:$HGPORT1/ copy-pull
91 requesting all changes
91 requesting all changes
92 adding changesets
92 adding changesets
93 adding manifests
93 adding manifests
94 adding file changes
94 adding file changes
95 added 1 changesets with 4 changes to 4 files
95 added 1 changesets with 4 changes to 4 files
96 new changesets 8b6053c928fe
96 new changesets 8b6053c928fe
97 updating to branch default
97 updating to branch default
98 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
98 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
99 $ hg verify -R copy-pull
99 $ hg verify -R copy-pull
100 checking changesets
100 checking changesets
101 checking manifests
101 checking manifests
102 crosschecking files in changesets and manifests
102 crosschecking files in changesets and manifests
103 checking files
103 checking files
104 4 files, 1 changesets, 4 total revisions
104 4 files, 1 changesets, 4 total revisions
105 $ cd test
105 $ cd test
106 $ echo bar > bar
106 $ echo bar > bar
107 $ hg commit -A -d '1 0' -m 2
107 $ hg commit -A -d '1 0' -m 2
108 adding bar
108 adding bar
109 $ cd ..
109 $ cd ..
110
110
111 clone over http with --update
111 clone over http with --update
112
112
113 $ hg clone http://localhost:$HGPORT1/ updated --update 0
113 $ hg clone http://localhost:$HGPORT1/ updated --update 0
114 requesting all changes
114 requesting all changes
115 adding changesets
115 adding changesets
116 adding manifests
116 adding manifests
117 adding file changes
117 adding file changes
118 added 2 changesets with 5 changes to 5 files
118 added 2 changesets with 5 changes to 5 files
119 new changesets 8b6053c928fe:5fed3813f7f5
119 new changesets 8b6053c928fe:5fed3813f7f5
120 updating to branch default
120 updating to branch default
121 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
121 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
122 $ hg log -r . -R updated
122 $ hg log -r . -R updated
123 changeset: 0:8b6053c928fe
123 changeset: 0:8b6053c928fe
124 user: test
124 user: test
125 date: Thu Jan 01 00:00:00 1970 +0000
125 date: Thu Jan 01 00:00:00 1970 +0000
126 summary: 1
126 summary: 1
127
127
128 $ rm -rf updated
128 $ rm -rf updated
129
129
130 incoming via HTTP
130 incoming via HTTP
131
131
132 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
132 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
133 adding changesets
133 adding changesets
134 adding manifests
134 adding manifests
135 adding file changes
135 adding file changes
136 added 1 changesets with 4 changes to 4 files
136 added 1 changesets with 4 changes to 4 files
137 new changesets 8b6053c928fe
137 new changesets 8b6053c928fe
138 updating to branch default
138 updating to branch default
139 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
139 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
140 $ cd partial
140 $ cd partial
141 $ touch LOCAL
141 $ touch LOCAL
142 $ hg ci -qAm LOCAL
142 $ hg ci -qAm LOCAL
143 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
143 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
144 comparing with http://localhost:$HGPORT1/
144 comparing with http://localhost:$HGPORT1/
145 searching for changes
145 searching for changes
146 2
146 2
147 $ cd ..
147 $ cd ..
148
148
149 pull
149 pull
150
150
151 $ cd copy-pull
151 $ cd copy-pull
152 $ cat >> .hg/hgrc <<EOF
152 $ cat >> .hg/hgrc <<EOF
153 > [hooks]
153 > [hooks]
154 > changegroup = sh -c "printenv.py changegroup"
154 > changegroup = sh -c "printenv.py changegroup"
155 > EOF
155 > EOF
156 $ hg pull
156 $ hg pull
157 pulling from http://localhost:$HGPORT1/
157 pulling from http://localhost:$HGPORT1/
158 searching for changes
158 searching for changes
159 adding changesets
159 adding changesets
160 adding manifests
160 adding manifests
161 adding file changes
161 adding file changes
162 added 1 changesets with 1 changes to 1 files
162 added 1 changesets with 1 changes to 1 files
163 new changesets 5fed3813f7f5
163 new changesets 5fed3813f7f5
164 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/
164 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/
165 (run 'hg update' to get a working copy)
165 (run 'hg update' to get a working copy)
166 $ cd ..
166 $ cd ..
167
167
168 clone from invalid URL
168 clone from invalid URL
169
169
170 $ hg clone http://localhost:$HGPORT/bad
170 $ hg clone http://localhost:$HGPORT/bad
171 abort: HTTP Error 404: Not Found
171 abort: HTTP Error 404: Not Found
172 [255]
172 [255]
173
173
174 test http authentication
174 test http authentication
175 + use the same server to test server side streaming preference
175 + use the same server to test server side streaming preference
176
176
177 $ cd test
177 $ cd test
178 $ cat << EOT > userpass.py
178 $ cat << EOT > userpass.py
179 > import base64
179 > import base64
180 > from mercurial.hgweb import common
180 > from mercurial.hgweb import common
181 > def perform_authentication(hgweb, req, op):
181 > def perform_authentication(hgweb, req, op):
182 > auth = req.headers.get('Authorization')
182 > auth = req.headers.get(b'Authorization')
183 > if not auth:
183 > if not auth:
184 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
184 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, b'who',
185 > [('WWW-Authenticate', 'Basic Realm="mercurial"')])
185 > [(b'WWW-Authenticate', b'Basic Realm="mercurial"')])
186 > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user',
186 > if base64.b64decode(auth.split()[1]).split(b':', 1) != [b'user',
187 > b'pass']:
187 > b'pass']:
188 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
188 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, b'no')
189 > def extsetup():
189 > def extsetup():
190 > common.permhooks.insert(0, perform_authentication)
190 > common.permhooks.insert(0, perform_authentication)
191 > EOT
191 > EOT
192 $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
192 $ hg serve --config extensions.x=userpass.py -p $HGPORT2 -d --pid-file=pid \
193 > --config server.preferuncompressed=True \
193 > --config server.preferuncompressed=True \
194 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
194 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
195 $ cat pid >> $DAEMON_PIDS
195 $ cat pid >> $DAEMON_PIDS
196
196
197 $ cat << EOF > get_pass.py
197 $ cat << EOF > get_pass.py
198 > import getpass
198 > import getpass
199 > def newgetpass(arg):
199 > def newgetpass(arg):
200 > return "pass"
200 > return "pass"
201 > getpass.getpass = newgetpass
201 > getpass.getpass = newgetpass
202 > EOF
202 > EOF
203
203
204 $ hg id http://localhost:$HGPORT2/
204 $ hg id http://localhost:$HGPORT2/
205 abort: http authorization required for http://localhost:$HGPORT2/
205 abort: http authorization required for http://localhost:$HGPORT2/
206 [255]
206 [255]
207 $ hg id http://localhost:$HGPORT2/
207 $ hg id http://localhost:$HGPORT2/
208 abort: http authorization required for http://localhost:$HGPORT2/
208 abort: http authorization required for http://localhost:$HGPORT2/
209 [255]
209 [255]
210 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
210 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
211 http authorization required for http://localhost:$HGPORT2/
211 http authorization required for http://localhost:$HGPORT2/
212 realm: mercurial
212 realm: mercurial
213 user: user
213 user: user
214 password: 5fed3813f7f5
214 password: 5fed3813f7f5
215 $ hg id http://user:pass@localhost:$HGPORT2/
215 $ hg id http://user:pass@localhost:$HGPORT2/
216 5fed3813f7f5
216 5fed3813f7f5
217 $ echo '[auth]' >> .hg/hgrc
217 $ echo '[auth]' >> .hg/hgrc
218 $ echo 'l.schemes=http' >> .hg/hgrc
218 $ echo 'l.schemes=http' >> .hg/hgrc
219 $ echo 'l.prefix=lo' >> .hg/hgrc
219 $ echo 'l.prefix=lo' >> .hg/hgrc
220 $ echo 'l.username=user' >> .hg/hgrc
220 $ echo 'l.username=user' >> .hg/hgrc
221 $ echo 'l.password=pass' >> .hg/hgrc
221 $ echo 'l.password=pass' >> .hg/hgrc
222 $ hg id http://localhost:$HGPORT2/
222 $ hg id http://localhost:$HGPORT2/
223 5fed3813f7f5
223 5fed3813f7f5
224 $ hg id http://localhost:$HGPORT2/
224 $ hg id http://localhost:$HGPORT2/
225 5fed3813f7f5
225 5fed3813f7f5
226 $ hg id http://user@localhost:$HGPORT2/
226 $ hg id http://user@localhost:$HGPORT2/
227 5fed3813f7f5
227 5fed3813f7f5
228
228
229 #if no-reposimplestore
229 #if no-reposimplestore
230 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
230 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
231 streaming all changes
231 streaming all changes
232 7 files to transfer, 916 bytes of data
232 7 files to transfer, 916 bytes of data
233 transferred * bytes in * seconds (*/sec) (glob)
233 transferred * bytes in * seconds (*/sec) (glob)
234 searching for changes
234 searching for changes
235 no changes found
235 no changes found
236 updating to branch default
236 updating to branch default
237 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
237 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
238 #endif
238 #endif
239
239
240 --pull should override server's preferuncompressed
240 --pull should override server's preferuncompressed
241
241
242 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
242 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
243 requesting all changes
243 requesting all changes
244 adding changesets
244 adding changesets
245 adding manifests
245 adding manifests
246 adding file changes
246 adding file changes
247 added 2 changesets with 5 changes to 5 files
247 added 2 changesets with 5 changes to 5 files
248 new changesets 8b6053c928fe:5fed3813f7f5
248 new changesets 8b6053c928fe:5fed3813f7f5
249 updating to branch default
249 updating to branch default
250 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
250 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
251
251
252 $ hg id http://user2@localhost:$HGPORT2/
252 $ hg id http://user2@localhost:$HGPORT2/
253 abort: http authorization required for http://localhost:$HGPORT2/
253 abort: http authorization required for http://localhost:$HGPORT2/
254 [255]
254 [255]
255 $ hg id http://user:pass2@localhost:$HGPORT2/
255 $ hg id http://user:pass2@localhost:$HGPORT2/
256 abort: HTTP Error 403: no
256 abort: HTTP Error 403: no
257 [255]
257 [255]
258
258
259 $ hg -R dest-pull tag -r tip top
259 $ hg -R dest-pull tag -r tip top
260 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
260 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
261 pushing to http://user:***@localhost:$HGPORT2/
261 pushing to http://user:***@localhost:$HGPORT2/
262 searching for changes
262 searching for changes
263 remote: adding changesets
263 remote: adding changesets
264 remote: adding manifests
264 remote: adding manifests
265 remote: adding file changes
265 remote: adding file changes
266 remote: added 1 changesets with 1 changes to 1 files
266 remote: added 1 changesets with 1 changes to 1 files
267 $ hg rollback -q
267 $ hg rollback -q
268
268
269 $ sed 's/.*] "/"/' < ../access.log
269 $ sed 's/.*] "/"/' < ../access.log
270 "GET /?cmd=capabilities HTTP/1.1" 401 -
270 "GET /?cmd=capabilities HTTP/1.1" 401 -
271 "GET /?cmd=capabilities HTTP/1.1" 401 -
271 "GET /?cmd=capabilities HTTP/1.1" 401 -
272 "GET /?cmd=capabilities HTTP/1.1" 401 -
272 "GET /?cmd=capabilities HTTP/1.1" 401 -
273 "GET /?cmd=capabilities HTTP/1.1" 200 -
273 "GET /?cmd=capabilities HTTP/1.1" 200 -
274 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
274 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
275 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
275 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
276 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
276 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
277 "GET /?cmd=capabilities HTTP/1.1" 401 -
277 "GET /?cmd=capabilities HTTP/1.1" 401 -
278 "GET /?cmd=capabilities HTTP/1.1" 200 -
278 "GET /?cmd=capabilities HTTP/1.1" 200 -
279 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
279 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
280 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
280 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
281 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
281 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
282 "GET /?cmd=capabilities HTTP/1.1" 401 -
282 "GET /?cmd=capabilities HTTP/1.1" 401 -
283 "GET /?cmd=capabilities HTTP/1.1" 200 -
283 "GET /?cmd=capabilities HTTP/1.1" 200 -
284 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
284 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
285 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
285 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
286 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
286 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
287 "GET /?cmd=capabilities HTTP/1.1" 401 -
287 "GET /?cmd=capabilities HTTP/1.1" 401 -
288 "GET /?cmd=capabilities HTTP/1.1" 200 -
288 "GET /?cmd=capabilities HTTP/1.1" 200 -
289 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
289 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
290 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
290 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
291 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
291 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
292 "GET /?cmd=capabilities HTTP/1.1" 401 -
292 "GET /?cmd=capabilities HTTP/1.1" 401 -
293 "GET /?cmd=capabilities HTTP/1.1" 200 -
293 "GET /?cmd=capabilities HTTP/1.1" 200 -
294 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
294 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
295 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
295 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
296 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
296 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
297 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
297 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
298 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
298 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
299 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
299 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
300 "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
300 "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
301 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
301 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
302 "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 !)
302 "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 !)
303 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
303 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
304 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
304 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
305 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
305 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
306 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
306 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
307 "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
307 "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
308 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
308 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
309 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
309 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
310 "GET /?cmd=capabilities HTTP/1.1" 401 -
310 "GET /?cmd=capabilities HTTP/1.1" 401 -
311 "GET /?cmd=capabilities HTTP/1.1" 401 -
311 "GET /?cmd=capabilities HTTP/1.1" 401 -
312 "GET /?cmd=capabilities HTTP/1.1" 403 -
312 "GET /?cmd=capabilities HTTP/1.1" 403 -
313 "GET /?cmd=capabilities HTTP/1.1" 401 -
313 "GET /?cmd=capabilities HTTP/1.1" 401 -
314 "GET /?cmd=capabilities HTTP/1.1" 200 -
314 "GET /?cmd=capabilities HTTP/1.1" 200 -
315 "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
315 "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
316 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
316 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
317 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
317 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
318 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
318 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
319 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
319 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
320 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524* (glob)
320 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524* (glob)
321 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
321 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
322
322
323 $ cd ..
323 $ cd ..
324
324
325 clone of serve with repo in root and unserved subrepo (issue2970)
325 clone of serve with repo in root and unserved subrepo (issue2970)
326
326
327 $ hg --cwd test init sub
327 $ hg --cwd test init sub
328 $ echo empty > test/sub/empty
328 $ echo empty > test/sub/empty
329 $ hg --cwd test/sub add empty
329 $ hg --cwd test/sub add empty
330 $ hg --cwd test/sub commit -qm 'add empty'
330 $ hg --cwd test/sub commit -qm 'add empty'
331 $ hg --cwd test/sub tag -r 0 something
331 $ hg --cwd test/sub tag -r 0 something
332 $ echo sub = sub > test/.hgsub
332 $ echo sub = sub > test/.hgsub
333 $ hg --cwd test add .hgsub
333 $ hg --cwd test add .hgsub
334 $ hg --cwd test commit -qm 'add subrepo'
334 $ hg --cwd test commit -qm 'add subrepo'
335 $ hg clone http://localhost:$HGPORT noslash-clone
335 $ hg clone http://localhost:$HGPORT noslash-clone
336 requesting all changes
336 requesting all changes
337 adding changesets
337 adding changesets
338 adding manifests
338 adding manifests
339 adding file changes
339 adding file changes
340 added 3 changesets with 7 changes to 7 files
340 added 3 changesets with 7 changes to 7 files
341 new changesets 8b6053c928fe:56f9bc90cce6
341 new changesets 8b6053c928fe:56f9bc90cce6
342 updating to branch default
342 updating to branch default
343 abort: HTTP Error 404: Not Found
343 abort: HTTP Error 404: Not Found
344 [255]
344 [255]
345 $ hg clone http://localhost:$HGPORT/ slash-clone
345 $ hg clone http://localhost:$HGPORT/ slash-clone
346 requesting all changes
346 requesting all changes
347 adding changesets
347 adding changesets
348 adding manifests
348 adding manifests
349 adding file changes
349 adding file changes
350 added 3 changesets with 7 changes to 7 files
350 added 3 changesets with 7 changes to 7 files
351 new changesets 8b6053c928fe:56f9bc90cce6
351 new changesets 8b6053c928fe:56f9bc90cce6
352 updating to branch default
352 updating to branch default
353 abort: HTTP Error 404: Not Found
353 abort: HTTP Error 404: Not Found
354 [255]
354 [255]
355
355
356 check error log
356 check error log
357
357
358 $ cat error.log
358 $ cat error.log
359
359
360 Check error reporting while pulling/cloning
360 Check error reporting while pulling/cloning
361
361
362 $ $RUNTESTDIR/killdaemons.py
362 $ $RUNTESTDIR/killdaemons.py
363 $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
363 $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
364 $ cat hg3.pid >> $DAEMON_PIDS
364 $ cat hg3.pid >> $DAEMON_PIDS
365 $ hg clone http://localhost:$HGPORT/ abort-clone
365 $ hg clone http://localhost:$HGPORT/ abort-clone
366 requesting all changes
366 requesting all changes
367 abort: remote error:
367 abort: remote error:
368 this is an exercise
368 this is an exercise
369 [255]
369 [255]
370 $ cat error.log
370 $ cat error.log
371
371
372 disable pull-based clones
372 disable pull-based clones
373
373
374 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True
374 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True
375 $ cat hg4.pid >> $DAEMON_PIDS
375 $ cat hg4.pid >> $DAEMON_PIDS
376 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone
376 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone
377 requesting all changes
377 requesting all changes
378 abort: remote error:
378 abort: remote error:
379 server has pull-based clones disabled
379 server has pull-based clones disabled
380 [255]
380 [255]
381
381
382 #if no-reposimplestore
382 #if no-reposimplestore
383 ... but keep stream clones working
383 ... but keep stream clones working
384
384
385 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
385 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
386 streaming all changes
386 streaming all changes
387 * files to transfer, * of data (glob)
387 * files to transfer, * of data (glob)
388 transferred * in * seconds (* KB/sec) (glob)
388 transferred * in * seconds (* KB/sec) (glob)
389 searching for changes
389 searching for changes
390 no changes found
390 no changes found
391 #endif
391 #endif
392
392
393 ... and also keep partial clones and pulls working
393 ... and also keep partial clones and pulls working
394 $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone
394 $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone
395 adding changesets
395 adding changesets
396 adding manifests
396 adding manifests
397 adding file changes
397 adding file changes
398 added 1 changesets with 4 changes to 4 files
398 added 1 changesets with 4 changes to 4 files
399 new changesets 8b6053c928fe
399 new changesets 8b6053c928fe
400 updating to branch default
400 updating to branch default
401 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
401 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
402 $ hg pull -R test-partial-clone
402 $ hg pull -R test-partial-clone
403 pulling from http://localhost:$HGPORT1/
403 pulling from http://localhost:$HGPORT1/
404 searching for changes
404 searching for changes
405 adding changesets
405 adding changesets
406 adding manifests
406 adding manifests
407 adding file changes
407 adding file changes
408 added 2 changesets with 3 changes to 3 files
408 added 2 changesets with 3 changes to 3 files
409 new changesets 5fed3813f7f5:56f9bc90cce6
409 new changesets 5fed3813f7f5:56f9bc90cce6
410 (run 'hg update' to get a working copy)
410 (run 'hg update' to get a working copy)
411
411
412 $ cat error.log
412 $ cat error.log
General Comments 0
You need to be logged in to leave comments. Login now