##// END OF EJS Templates
test: use `printenv.py --line` in `test-http-bundle1.t`...
Boris Feld -
r41789:e06d91bc default
parent child Browse files
Show More
@@ -1,401 +1,408
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 checked 1 changesets with 4 changes to 4 files
52 checked 1 changesets with 4 changes to 4 files
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 checked 1 changesets with 4 changes to 4 files
104 checked 1 changesets with 4 changes to 4 files
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 --line 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
165 HG_HOOKTYPE=changegroup
166 HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d
167 HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d
168 HG_SOURCE=pull
169 HG_TXNID=TXN:$ID$
170 HG_URL=http://localhost:$HGPORT1/
171
165 (run 'hg update' to get a working copy)
172 (run 'hg update' to get a working copy)
166 $ cd ..
173 $ cd ..
167
174
168 clone from invalid URL
175 clone from invalid URL
169
176
170 $ hg clone http://localhost:$HGPORT/bad
177 $ hg clone http://localhost:$HGPORT/bad
171 abort: HTTP Error 404: Not Found
178 abort: HTTP Error 404: Not Found
172 [255]
179 [255]
173
180
174 test http authentication
181 test http authentication
175 + use the same server to test server side streaming preference
182 + use the same server to test server side streaming preference
176
183
177 $ cd test
184 $ cd test
178
185
179 $ hg serve --config extensions.x=$TESTDIR/httpserverauth.py -p $HGPORT2 -d \
186 $ hg serve --config extensions.x=$TESTDIR/httpserverauth.py -p $HGPORT2 -d \
180 > --pid-file=pid --config server.preferuncompressed=True \
187 > --pid-file=pid --config server.preferuncompressed=True \
181 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
188 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
182 $ cat pid >> $DAEMON_PIDS
189 $ cat pid >> $DAEMON_PIDS
183
190
184 $ cat << EOF > get_pass.py
191 $ cat << EOF > get_pass.py
185 > import getpass
192 > import getpass
186 > def newgetpass(arg):
193 > def newgetpass(arg):
187 > return "pass"
194 > return "pass"
188 > getpass.getpass = newgetpass
195 > getpass.getpass = newgetpass
189 > EOF
196 > EOF
190
197
191 $ hg id http://localhost:$HGPORT2/
198 $ hg id http://localhost:$HGPORT2/
192 abort: http authorization required for http://localhost:$HGPORT2/
199 abort: http authorization required for http://localhost:$HGPORT2/
193 [255]
200 [255]
194 $ hg id http://localhost:$HGPORT2/
201 $ hg id http://localhost:$HGPORT2/
195 abort: http authorization required for http://localhost:$HGPORT2/
202 abort: http authorization required for http://localhost:$HGPORT2/
196 [255]
203 [255]
197 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
204 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
198 http authorization required for http://localhost:$HGPORT2/
205 http authorization required for http://localhost:$HGPORT2/
199 realm: mercurial
206 realm: mercurial
200 user: user
207 user: user
201 password: 5fed3813f7f5
208 password: 5fed3813f7f5
202 $ hg id http://user:pass@localhost:$HGPORT2/
209 $ hg id http://user:pass@localhost:$HGPORT2/
203 5fed3813f7f5
210 5fed3813f7f5
204 $ echo '[auth]' >> .hg/hgrc
211 $ echo '[auth]' >> .hg/hgrc
205 $ echo 'l.schemes=http' >> .hg/hgrc
212 $ echo 'l.schemes=http' >> .hg/hgrc
206 $ echo 'l.prefix=lo' >> .hg/hgrc
213 $ echo 'l.prefix=lo' >> .hg/hgrc
207 $ echo 'l.username=user' >> .hg/hgrc
214 $ echo 'l.username=user' >> .hg/hgrc
208 $ echo 'l.password=pass' >> .hg/hgrc
215 $ echo 'l.password=pass' >> .hg/hgrc
209 $ hg id http://localhost:$HGPORT2/
216 $ hg id http://localhost:$HGPORT2/
210 5fed3813f7f5
217 5fed3813f7f5
211 $ hg id http://localhost:$HGPORT2/
218 $ hg id http://localhost:$HGPORT2/
212 5fed3813f7f5
219 5fed3813f7f5
213 $ hg id http://user@localhost:$HGPORT2/
220 $ hg id http://user@localhost:$HGPORT2/
214 5fed3813f7f5
221 5fed3813f7f5
215
222
216 #if no-reposimplestore
223 #if no-reposimplestore
217 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
224 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
218 streaming all changes
225 streaming all changes
219 7 files to transfer, 916 bytes of data
226 7 files to transfer, 916 bytes of data
220 transferred * bytes in * seconds (*/sec) (glob)
227 transferred * bytes in * seconds (*/sec) (glob)
221 searching for changes
228 searching for changes
222 no changes found
229 no changes found
223 updating to branch default
230 updating to branch default
224 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
231 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
225 #endif
232 #endif
226
233
227 --pull should override server's preferuncompressed
234 --pull should override server's preferuncompressed
228
235
229 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
236 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
230 requesting all changes
237 requesting all changes
231 adding changesets
238 adding changesets
232 adding manifests
239 adding manifests
233 adding file changes
240 adding file changes
234 added 2 changesets with 5 changes to 5 files
241 added 2 changesets with 5 changes to 5 files
235 new changesets 8b6053c928fe:5fed3813f7f5
242 new changesets 8b6053c928fe:5fed3813f7f5
236 updating to branch default
243 updating to branch default
237 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
244 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
238
245
239 $ hg id http://user2@localhost:$HGPORT2/
246 $ hg id http://user2@localhost:$HGPORT2/
240 abort: http authorization required for http://localhost:$HGPORT2/
247 abort: http authorization required for http://localhost:$HGPORT2/
241 [255]
248 [255]
242 $ hg id http://user:pass2@localhost:$HGPORT2/
249 $ hg id http://user:pass2@localhost:$HGPORT2/
243 abort: HTTP Error 403: no
250 abort: HTTP Error 403: no
244 [255]
251 [255]
245
252
246 $ hg -R dest-pull tag -r tip top
253 $ hg -R dest-pull tag -r tip top
247 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
254 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
248 pushing to http://user:***@localhost:$HGPORT2/
255 pushing to http://user:***@localhost:$HGPORT2/
249 searching for changes
256 searching for changes
250 remote: adding changesets
257 remote: adding changesets
251 remote: adding manifests
258 remote: adding manifests
252 remote: adding file changes
259 remote: adding file changes
253 remote: added 1 changesets with 1 changes to 1 files
260 remote: added 1 changesets with 1 changes to 1 files
254 $ hg rollback -q
261 $ hg rollback -q
255
262
256 $ sed 's/.*] "/"/' < ../access.log
263 $ sed 's/.*] "/"/' < ../access.log
257 "GET /?cmd=capabilities HTTP/1.1" 401 -
264 "GET /?cmd=capabilities HTTP/1.1" 401 -
258 "GET /?cmd=capabilities HTTP/1.1" 401 -
265 "GET /?cmd=capabilities HTTP/1.1" 401 -
259 "GET /?cmd=capabilities HTTP/1.1" 401 -
266 "GET /?cmd=capabilities HTTP/1.1" 401 -
260 "GET /?cmd=capabilities HTTP/1.1" 200 -
267 "GET /?cmd=capabilities HTTP/1.1" 200 -
261 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
268 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
262 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
269 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
263 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
270 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
264 "GET /?cmd=capabilities HTTP/1.1" 401 -
271 "GET /?cmd=capabilities HTTP/1.1" 401 -
265 "GET /?cmd=capabilities HTTP/1.1" 200 -
272 "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$ partial-pull
273 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
267 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
274 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
268 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
275 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
269 "GET /?cmd=capabilities HTTP/1.1" 401 -
276 "GET /?cmd=capabilities HTTP/1.1" 401 -
270 "GET /?cmd=capabilities HTTP/1.1" 200 -
277 "GET /?cmd=capabilities HTTP/1.1" 200 -
271 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
278 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
272 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
279 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
273 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
280 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
274 "GET /?cmd=capabilities HTTP/1.1" 401 -
281 "GET /?cmd=capabilities HTTP/1.1" 401 -
275 "GET /?cmd=capabilities HTTP/1.1" 200 -
282 "GET /?cmd=capabilities HTTP/1.1" 200 -
276 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
283 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
277 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
284 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
278 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
285 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
279 "GET /?cmd=capabilities HTTP/1.1" 401 -
286 "GET /?cmd=capabilities HTTP/1.1" 401 -
280 "GET /?cmd=capabilities HTTP/1.1" 200 -
287 "GET /?cmd=capabilities HTTP/1.1" 200 -
281 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
288 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
282 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
289 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
283 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
290 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
284 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
291 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
285 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
292 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
286 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
293 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
287 "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
294 "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
288 "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 !)
295 "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 !)
289 "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 !)
296 "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 !)
290 "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 !)
297 "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 !)
291 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
298 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
292 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
299 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
293 "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 !)
300 "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 !)
294 "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
301 "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
295 "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
302 "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
296 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
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
297 "GET /?cmd=capabilities HTTP/1.1" 401 -
304 "GET /?cmd=capabilities HTTP/1.1" 401 -
298 "GET /?cmd=capabilities HTTP/1.1" 401 -
305 "GET /?cmd=capabilities HTTP/1.1" 401 -
299 "GET /?cmd=capabilities HTTP/1.1" 403 -
306 "GET /?cmd=capabilities HTTP/1.1" 403 -
300 "GET /?cmd=capabilities HTTP/1.1" 401 -
307 "GET /?cmd=capabilities HTTP/1.1" 401 -
301 "GET /?cmd=capabilities HTTP/1.1" 200 -
308 "GET /?cmd=capabilities HTTP/1.1" 200 -
302 "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
309 "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
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
310 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
304 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
311 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
305 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
312 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
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
313 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
307 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524* (glob)
314 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524* (glob)
308 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
315 "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
316
310 $ cd ..
317 $ cd ..
311
318
312 clone of serve with repo in root and unserved subrepo (issue2970)
319 clone of serve with repo in root and unserved subrepo (issue2970)
313
320
314 $ hg --cwd test init sub
321 $ hg --cwd test init sub
315 $ echo empty > test/sub/empty
322 $ echo empty > test/sub/empty
316 $ hg --cwd test/sub add empty
323 $ hg --cwd test/sub add empty
317 $ hg --cwd test/sub commit -qm 'add empty'
324 $ hg --cwd test/sub commit -qm 'add empty'
318 $ hg --cwd test/sub tag -r 0 something
325 $ hg --cwd test/sub tag -r 0 something
319 $ echo sub = sub > test/.hgsub
326 $ echo sub = sub > test/.hgsub
320 $ hg --cwd test add .hgsub
327 $ hg --cwd test add .hgsub
321 $ hg --cwd test commit -qm 'add subrepo'
328 $ hg --cwd test commit -qm 'add subrepo'
322 $ hg clone http://localhost:$HGPORT noslash-clone
329 $ hg clone http://localhost:$HGPORT noslash-clone
323 requesting all changes
330 requesting all changes
324 adding changesets
331 adding changesets
325 adding manifests
332 adding manifests
326 adding file changes
333 adding file changes
327 added 3 changesets with 7 changes to 7 files
334 added 3 changesets with 7 changes to 7 files
328 new changesets 8b6053c928fe:56f9bc90cce6
335 new changesets 8b6053c928fe:56f9bc90cce6
329 updating to branch default
336 updating to branch default
330 cloning subrepo sub from http://localhost:$HGPORT/sub
337 cloning subrepo sub from http://localhost:$HGPORT/sub
331 abort: HTTP Error 404: Not Found
338 abort: HTTP Error 404: Not Found
332 [255]
339 [255]
333 $ hg clone http://localhost:$HGPORT/ slash-clone
340 $ hg clone http://localhost:$HGPORT/ slash-clone
334 requesting all changes
341 requesting all changes
335 adding changesets
342 adding changesets
336 adding manifests
343 adding manifests
337 adding file changes
344 adding file changes
338 added 3 changesets with 7 changes to 7 files
345 added 3 changesets with 7 changes to 7 files
339 new changesets 8b6053c928fe:56f9bc90cce6
346 new changesets 8b6053c928fe:56f9bc90cce6
340 updating to branch default
347 updating to branch default
341 cloning subrepo sub from http://localhost:$HGPORT/sub
348 cloning subrepo sub from http://localhost:$HGPORT/sub
342 abort: HTTP Error 404: Not Found
349 abort: HTTP Error 404: Not Found
343 [255]
350 [255]
344
351
345 check error log
352 check error log
346
353
347 $ cat error.log
354 $ cat error.log
348
355
349 Check error reporting while pulling/cloning
356 Check error reporting while pulling/cloning
350
357
351 $ $RUNTESTDIR/killdaemons.py
358 $ $RUNTESTDIR/killdaemons.py
352 $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
359 $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
353 $ cat hg3.pid >> $DAEMON_PIDS
360 $ cat hg3.pid >> $DAEMON_PIDS
354 $ hg clone http://localhost:$HGPORT/ abort-clone
361 $ hg clone http://localhost:$HGPORT/ abort-clone
355 requesting all changes
362 requesting all changes
356 abort: remote error:
363 abort: remote error:
357 this is an exercise
364 this is an exercise
358 [255]
365 [255]
359 $ cat error.log
366 $ cat error.log
360
367
361 disable pull-based clones
368 disable pull-based clones
362
369
363 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True
370 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True
364 $ cat hg4.pid >> $DAEMON_PIDS
371 $ cat hg4.pid >> $DAEMON_PIDS
365 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone
372 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone
366 requesting all changes
373 requesting all changes
367 abort: remote error:
374 abort: remote error:
368 server has pull-based clones disabled
375 server has pull-based clones disabled
369 [255]
376 [255]
370
377
371 #if no-reposimplestore
378 #if no-reposimplestore
372 ... but keep stream clones working
379 ... but keep stream clones working
373
380
374 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
381 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
375 streaming all changes
382 streaming all changes
376 * files to transfer, * of data (glob)
383 * files to transfer, * of data (glob)
377 transferred * in * seconds (* KB/sec) (glob)
384 transferred * in * seconds (* KB/sec) (glob)
378 searching for changes
385 searching for changes
379 no changes found
386 no changes found
380 #endif
387 #endif
381
388
382 ... and also keep partial clones and pulls working
389 ... and also keep partial clones and pulls working
383 $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone
390 $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone
384 adding changesets
391 adding changesets
385 adding manifests
392 adding manifests
386 adding file changes
393 adding file changes
387 added 1 changesets with 4 changes to 4 files
394 added 1 changesets with 4 changes to 4 files
388 new changesets 8b6053c928fe
395 new changesets 8b6053c928fe
389 updating to branch default
396 updating to branch default
390 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
397 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
391 $ hg pull -R test-partial-clone
398 $ hg pull -R test-partial-clone
392 pulling from http://localhost:$HGPORT1/
399 pulling from http://localhost:$HGPORT1/
393 searching for changes
400 searching for changes
394 adding changesets
401 adding changesets
395 adding manifests
402 adding manifests
396 adding file changes
403 adding file changes
397 added 2 changesets with 3 changes to 3 files
404 added 2 changesets with 3 changes to 3 files
398 new changesets 5fed3813f7f5:56f9bc90cce6
405 new changesets 5fed3813f7f5:56f9bc90cce6
399 (run 'hg update' to get a working copy)
406 (run 'hg update' to get a working copy)
400
407
401 $ cat error.log
408 $ cat error.log
General Comments 0
You need to be logged in to leave comments. Login now