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