##// END OF EJS Templates
tests: monkeypatch `util.get_password()` to avoid deadlocks on Windows...
Matt Harbison -
r48103:5ac0f2a8 stable
parent child Browse files
Show More
@@ -1,412 +1,412 b''
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 (no-zstd !)
41 6 files to transfer, 606 bytes of data (no-zstd !)
42 6 files to transfer, 608 bytes of data (zstd !)
42 6 files to transfer, 608 bytes of data (zstd !)
43 transferred * bytes in * seconds (*/sec) (glob)
43 transferred * bytes in * seconds (*/sec) (glob)
44 searching for changes
44 searching for changes
45 no changes found
45 no changes found
46 updating to branch default
46 updating to branch default
47 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 $ hg verify -R copy
48 $ hg verify -R copy
49 checking changesets
49 checking changesets
50 checking manifests
50 checking manifests
51 crosschecking files in changesets and manifests
51 crosschecking files in changesets and manifests
52 checking files
52 checking files
53 checked 1 changesets with 4 changes to 4 files
53 checked 1 changesets with 4 changes to 4 files
54 #endif
54 #endif
55
55
56 try to clone via stream, should use pull instead
56 try to clone via stream, should use pull instead
57
57
58 $ hg clone --stream http://localhost:$HGPORT1/ copy2
58 $ hg clone --stream http://localhost:$HGPORT1/ copy2
59 warning: stream clone requested but server has them disabled
59 warning: stream clone requested but server has them disabled
60 requesting all changes
60 requesting all changes
61 adding changesets
61 adding changesets
62 adding manifests
62 adding manifests
63 adding file changes
63 adding file changes
64 added 1 changesets with 4 changes to 4 files
64 added 1 changesets with 4 changes to 4 files
65 new changesets 8b6053c928fe
65 new changesets 8b6053c928fe
66 updating to branch default
66 updating to branch default
67 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
67 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
68
68
69 try to clone via stream but missing requirements, so should use pull instead
69 try to clone via stream but missing requirements, so should use pull instead
70
70
71 $ cat > $TESTTMP/removesupportedformat.py << EOF
71 $ cat > $TESTTMP/removesupportedformat.py << EOF
72 > from mercurial import localrepo
72 > from mercurial import localrepo
73 > def extsetup(ui):
73 > def extsetup(ui):
74 > localrepo.localrepository.supportedformats.remove(b'generaldelta')
74 > localrepo.localrepository.supportedformats.remove(b'generaldelta')
75 > EOF
75 > EOF
76
76
77 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
77 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
78 warning: stream clone requested but client is missing requirements: generaldelta
78 warning: stream clone requested but client is missing requirements: generaldelta
79 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
79 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
80 requesting all changes
80 requesting all changes
81 adding changesets
81 adding changesets
82 adding manifests
82 adding manifests
83 adding file changes
83 adding file changes
84 added 1 changesets with 4 changes to 4 files
84 added 1 changesets with 4 changes to 4 files
85 new changesets 8b6053c928fe
85 new changesets 8b6053c928fe
86 updating to branch default
86 updating to branch default
87 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
87 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
88
88
89 clone via pull
89 clone via pull
90
90
91 $ hg clone http://localhost:$HGPORT1/ copy-pull
91 $ hg clone http://localhost:$HGPORT1/ copy-pull
92 requesting all changes
92 requesting all changes
93 adding changesets
93 adding changesets
94 adding manifests
94 adding manifests
95 adding file changes
95 adding file changes
96 added 1 changesets with 4 changes to 4 files
96 added 1 changesets with 4 changes to 4 files
97 new changesets 8b6053c928fe
97 new changesets 8b6053c928fe
98 updating to branch default
98 updating to branch default
99 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
99 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
100 $ hg verify -R copy-pull
100 $ hg verify -R copy-pull
101 checking changesets
101 checking changesets
102 checking manifests
102 checking manifests
103 crosschecking files in changesets and manifests
103 crosschecking files in changesets and manifests
104 checking files
104 checking files
105 checked 1 changesets with 4 changes to 4 files
105 checked 1 changesets with 4 changes to 4 files
106 $ cd test
106 $ cd test
107 $ echo bar > bar
107 $ echo bar > bar
108 $ hg commit -A -d '1 0' -m 2
108 $ hg commit -A -d '1 0' -m 2
109 adding bar
109 adding bar
110 $ cd ..
110 $ cd ..
111
111
112 clone over http with --update
112 clone over http with --update
113
113
114 $ hg clone http://localhost:$HGPORT1/ updated --update 0
114 $ hg clone http://localhost:$HGPORT1/ updated --update 0
115 requesting all changes
115 requesting all changes
116 adding changesets
116 adding changesets
117 adding manifests
117 adding manifests
118 adding file changes
118 adding file changes
119 added 2 changesets with 5 changes to 5 files
119 added 2 changesets with 5 changes to 5 files
120 new changesets 8b6053c928fe:5fed3813f7f5
120 new changesets 8b6053c928fe:5fed3813f7f5
121 updating to branch default
121 updating to branch default
122 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
122 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
123 $ hg log -r . -R updated
123 $ hg log -r . -R updated
124 changeset: 0:8b6053c928fe
124 changeset: 0:8b6053c928fe
125 user: test
125 user: test
126 date: Thu Jan 01 00:00:00 1970 +0000
126 date: Thu Jan 01 00:00:00 1970 +0000
127 summary: 1
127 summary: 1
128
128
129 $ rm -rf updated
129 $ rm -rf updated
130
130
131 incoming via HTTP
131 incoming via HTTP
132
132
133 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
133 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
134 adding changesets
134 adding changesets
135 adding manifests
135 adding manifests
136 adding file changes
136 adding file changes
137 added 1 changesets with 4 changes to 4 files
137 added 1 changesets with 4 changes to 4 files
138 new changesets 8b6053c928fe
138 new changesets 8b6053c928fe
139 updating to branch default
139 updating to branch default
140 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
140 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
141 $ cd partial
141 $ cd partial
142 $ touch LOCAL
142 $ touch LOCAL
143 $ hg ci -qAm LOCAL
143 $ hg ci -qAm LOCAL
144 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
144 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
145 comparing with http://localhost:$HGPORT1/
145 comparing with http://localhost:$HGPORT1/
146 searching for changes
146 searching for changes
147 2
147 2
148 $ cd ..
148 $ cd ..
149
149
150 pull
150 pull
151
151
152 $ cd copy-pull
152 $ cd copy-pull
153 $ cat >> .hg/hgrc <<EOF
153 $ cat >> .hg/hgrc <<EOF
154 > [hooks]
154 > [hooks]
155 > changegroup = sh -c "printenv.py --line changegroup"
155 > changegroup = sh -c "printenv.py --line changegroup"
156 > EOF
156 > EOF
157 $ hg pull
157 $ hg pull
158 pulling from http://localhost:$HGPORT1/
158 pulling from http://localhost:$HGPORT1/
159 searching for changes
159 searching for changes
160 adding changesets
160 adding changesets
161 adding manifests
161 adding manifests
162 adding file changes
162 adding file changes
163 added 1 changesets with 1 changes to 1 files
163 added 1 changesets with 1 changes to 1 files
164 new changesets 5fed3813f7f5
164 new changesets 5fed3813f7f5
165 changegroup hook: HG_HOOKNAME=changegroup
165 changegroup hook: HG_HOOKNAME=changegroup
166 HG_HOOKTYPE=changegroup
166 HG_HOOKTYPE=changegroup
167 HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d
167 HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d
168 HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d
168 HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d
169 HG_SOURCE=pull
169 HG_SOURCE=pull
170 HG_TXNID=TXN:$ID$
170 HG_TXNID=TXN:$ID$
171 HG_TXNNAME=pull
171 HG_TXNNAME=pull
172 http://localhost:$HGPORT1/
172 http://localhost:$HGPORT1/
173 HG_URL=http://localhost:$HGPORT1/
173 HG_URL=http://localhost:$HGPORT1/
174
174
175 (run 'hg update' to get a working copy)
175 (run 'hg update' to get a working copy)
176 $ cd ..
176 $ cd ..
177
177
178 clone from invalid URL
178 clone from invalid URL
179
179
180 $ hg clone http://localhost:$HGPORT/bad
180 $ hg clone http://localhost:$HGPORT/bad
181 abort: HTTP Error 404: Not Found
181 abort: HTTP Error 404: Not Found
182 [100]
182 [100]
183
183
184 test http authentication
184 test http authentication
185 + use the same server to test server side streaming preference
185 + use the same server to test server side streaming preference
186
186
187 $ cd test
187 $ cd test
188
188
189 $ hg serve --config extensions.x=$TESTDIR/httpserverauth.py -p $HGPORT2 -d \
189 $ hg serve --config extensions.x=$TESTDIR/httpserverauth.py -p $HGPORT2 -d \
190 > --pid-file=pid --config server.preferuncompressed=True \
190 > --pid-file=pid --config server.preferuncompressed=True \
191 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
191 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
192 $ cat pid >> $DAEMON_PIDS
192 $ cat pid >> $DAEMON_PIDS
193
193
194 $ cat << EOF > get_pass.py
194 $ cat << EOF > get_pass.py
195 > import getpass
195 > from mercurial import util
196 > def newgetpass(arg):
196 > def newgetpass():
197 > return "pass"
197 > return "pass"
198 > getpass.getpass = newgetpass
198 > util.get_password = newgetpass
199 > EOF
199 > EOF
200
200
201 $ hg id http://localhost:$HGPORT2/
201 $ hg id http://localhost:$HGPORT2/
202 abort: http authorization required for http://localhost:$HGPORT2/
202 abort: http authorization required for http://localhost:$HGPORT2/
203 [255]
203 [255]
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 --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
207 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
208 http authorization required for http://localhost:$HGPORT2/
208 http authorization required for http://localhost:$HGPORT2/
209 realm: mercurial
209 realm: mercurial
210 user: user
210 user: user
211 password: 5fed3813f7f5
211 password: 5fed3813f7f5
212 $ hg id http://user:pass@localhost:$HGPORT2/
212 $ hg id http://user:pass@localhost:$HGPORT2/
213 5fed3813f7f5
213 5fed3813f7f5
214 $ echo '[auth]' >> .hg/hgrc
214 $ echo '[auth]' >> .hg/hgrc
215 $ echo 'l.schemes=http' >> .hg/hgrc
215 $ echo 'l.schemes=http' >> .hg/hgrc
216 $ echo 'l.prefix=lo' >> .hg/hgrc
216 $ echo 'l.prefix=lo' >> .hg/hgrc
217 $ echo 'l.username=user' >> .hg/hgrc
217 $ echo 'l.username=user' >> .hg/hgrc
218 $ echo 'l.password=pass' >> .hg/hgrc
218 $ echo 'l.password=pass' >> .hg/hgrc
219 $ hg id http://localhost:$HGPORT2/
219 $ hg id http://localhost:$HGPORT2/
220 5fed3813f7f5
220 5fed3813f7f5
221 $ hg id http://localhost:$HGPORT2/
221 $ hg id http://localhost:$HGPORT2/
222 5fed3813f7f5
222 5fed3813f7f5
223 $ hg id http://user@localhost:$HGPORT2/
223 $ hg id http://user@localhost:$HGPORT2/
224 5fed3813f7f5
224 5fed3813f7f5
225
225
226 #if no-reposimplestore
226 #if no-reposimplestore
227 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
227 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
228 streaming all changes
228 streaming all changes
229 7 files to transfer, 916 bytes of data (no-zstd !)
229 7 files to transfer, 916 bytes of data (no-zstd !)
230 7 files to transfer, 919 bytes of data (zstd !)
230 7 files to transfer, 919 bytes of data (zstd !)
231 transferred * bytes in * seconds (*/sec) (glob)
231 transferred * bytes in * seconds (*/sec) (glob)
232 searching for changes
232 searching for changes
233 no changes found
233 no changes found
234 updating to branch default
234 updating to branch default
235 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
235 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
236 #endif
236 #endif
237
237
238 --pull should override server's preferuncompressed
238 --pull should override server's preferuncompressed
239
239
240 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
240 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
241 requesting all changes
241 requesting all changes
242 adding changesets
242 adding changesets
243 adding manifests
243 adding manifests
244 adding file changes
244 adding file changes
245 added 2 changesets with 5 changes to 5 files
245 added 2 changesets with 5 changes to 5 files
246 new changesets 8b6053c928fe:5fed3813f7f5
246 new changesets 8b6053c928fe:5fed3813f7f5
247 updating to branch default
247 updating to branch default
248 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
248 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
249
249
250 $ hg id http://user2@localhost:$HGPORT2/
250 $ hg id http://user2@localhost:$HGPORT2/
251 abort: http authorization required for http://localhost:$HGPORT2/
251 abort: http authorization required for http://localhost:$HGPORT2/
252 [255]
252 [255]
253 $ hg id http://user:pass2@localhost:$HGPORT2/
253 $ hg id http://user:pass2@localhost:$HGPORT2/
254 abort: HTTP Error 403: no
254 abort: HTTP Error 403: no
255 [100]
255 [100]
256
256
257 $ hg -R dest-pull tag -r tip top
257 $ hg -R dest-pull tag -r tip top
258 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
258 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
259 pushing to http://user:***@localhost:$HGPORT2/
259 pushing to http://user:***@localhost:$HGPORT2/
260 searching for changes
260 searching for changes
261 remote: adding changesets
261 remote: adding changesets
262 remote: adding manifests
262 remote: adding manifests
263 remote: adding file changes
263 remote: adding file changes
264 remote: added 1 changesets with 1 changes to 1 files
264 remote: added 1 changesets with 1 changes to 1 files
265 $ hg rollback -q
265 $ hg rollback -q
266
266
267 $ sed 's/.*] "/"/' < ../access.log
267 $ sed 's/.*] "/"/' < ../access.log
268 "GET /?cmd=capabilities HTTP/1.1" 401 -
268 "GET /?cmd=capabilities HTTP/1.1" 401 -
269 "GET /?cmd=capabilities HTTP/1.1" 401 -
269 "GET /?cmd=capabilities HTTP/1.1" 401 -
270 "GET /?cmd=capabilities HTTP/1.1" 401 -
270 "GET /?cmd=capabilities HTTP/1.1" 401 -
271 "GET /?cmd=capabilities HTTP/1.1" 200 -
271 "GET /?cmd=capabilities HTTP/1.1" 200 -
272 "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=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=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=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=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
274 "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=capabilities HTTP/1.1" 401 -
275 "GET /?cmd=capabilities HTTP/1.1" 401 -
276 "GET /?cmd=capabilities HTTP/1.1" 200 -
276 "GET /?cmd=capabilities HTTP/1.1" 200 -
277 "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=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=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=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=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
279 "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=capabilities HTTP/1.1" 401 -
280 "GET /?cmd=capabilities HTTP/1.1" 401 -
281 "GET /?cmd=capabilities HTTP/1.1" 200 -
281 "GET /?cmd=capabilities HTTP/1.1" 200 -
282 "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=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=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=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=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
284 "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=capabilities HTTP/1.1" 401 -
285 "GET /?cmd=capabilities HTTP/1.1" 401 -
286 "GET /?cmd=capabilities HTTP/1.1" 200 -
286 "GET /?cmd=capabilities HTTP/1.1" 200 -
287 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
287 "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=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
288 "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=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
289 "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=capabilities HTTP/1.1" 401 -
290 "GET /?cmd=capabilities HTTP/1.1" 401 -
291 "GET /?cmd=capabilities HTTP/1.1" 200 -
291 "GET /?cmd=capabilities HTTP/1.1" 200 -
292 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
292 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
293 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
293 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
294 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
294 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
295 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
295 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
296 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
296 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
297 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
297 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
298 "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
298 "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
299 "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 !)
299 "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=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 !)
300 "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 !)
301 "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 !)
301 "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 !)
302 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
302 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
303 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
303 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
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 (no-reposimplestore !)
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 (no-reposimplestore !)
305 "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
305 "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
306 "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
306 "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
307 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
307 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
308 "GET /?cmd=capabilities HTTP/1.1" 401 -
308 "GET /?cmd=capabilities HTTP/1.1" 401 -
309 "GET /?cmd=capabilities HTTP/1.1" 401 -
309 "GET /?cmd=capabilities HTTP/1.1" 401 -
310 "GET /?cmd=capabilities HTTP/1.1" 403 -
310 "GET /?cmd=capabilities HTTP/1.1" 403 -
311 "GET /?cmd=capabilities HTTP/1.1" 401 -
311 "GET /?cmd=capabilities HTTP/1.1" 401 -
312 "GET /?cmd=capabilities HTTP/1.1" 200 -
312 "GET /?cmd=capabilities HTTP/1.1" 200 -
313 "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
313 "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
314 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
314 "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=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
315 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
316 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
316 "GET /?cmd=branchmap HTTP/1.1" 200 - 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 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524* (glob)
318 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524* (glob)
319 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
319 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
320
320
321 $ cd ..
321 $ cd ..
322
322
323 clone of serve with repo in root and unserved subrepo (issue2970)
323 clone of serve with repo in root and unserved subrepo (issue2970)
324
324
325 $ hg --cwd test init sub
325 $ hg --cwd test init sub
326 $ echo empty > test/sub/empty
326 $ echo empty > test/sub/empty
327 $ hg --cwd test/sub add empty
327 $ hg --cwd test/sub add empty
328 $ hg --cwd test/sub commit -qm 'add empty'
328 $ hg --cwd test/sub commit -qm 'add empty'
329 $ hg --cwd test/sub tag -r 0 something
329 $ hg --cwd test/sub tag -r 0 something
330 $ echo sub = sub > test/.hgsub
330 $ echo sub = sub > test/.hgsub
331 $ hg --cwd test add .hgsub
331 $ hg --cwd test add .hgsub
332 $ hg --cwd test commit -qm 'add subrepo'
332 $ hg --cwd test commit -qm 'add subrepo'
333 $ hg clone http://localhost:$HGPORT noslash-clone
333 $ hg clone http://localhost:$HGPORT noslash-clone
334 requesting all changes
334 requesting all changes
335 adding changesets
335 adding changesets
336 adding manifests
336 adding manifests
337 adding file changes
337 adding file changes
338 added 3 changesets with 7 changes to 7 files
338 added 3 changesets with 7 changes to 7 files
339 new changesets 8b6053c928fe:56f9bc90cce6
339 new changesets 8b6053c928fe:56f9bc90cce6
340 updating to branch default
340 updating to branch default
341 cloning subrepo sub from http://localhost:$HGPORT/sub
341 cloning subrepo sub from http://localhost:$HGPORT/sub
342 abort: HTTP Error 404: Not Found
342 abort: HTTP Error 404: Not Found
343 [100]
343 [100]
344 $ hg clone http://localhost:$HGPORT/ slash-clone
344 $ hg clone http://localhost:$HGPORT/ slash-clone
345 requesting all changes
345 requesting all changes
346 adding changesets
346 adding changesets
347 adding manifests
347 adding manifests
348 adding file changes
348 adding file changes
349 added 3 changesets with 7 changes to 7 files
349 added 3 changesets with 7 changes to 7 files
350 new changesets 8b6053c928fe:56f9bc90cce6
350 new changesets 8b6053c928fe:56f9bc90cce6
351 updating to branch default
351 updating to branch default
352 cloning subrepo sub from http://localhost:$HGPORT/sub
352 cloning subrepo sub from http://localhost:$HGPORT/sub
353 abort: HTTP Error 404: Not Found
353 abort: HTTP Error 404: Not Found
354 [100]
354 [100]
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 [100]
369 [100]
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 [100]
380 [100]
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
@@ -1,617 +1,617 b''
1 #require serve
1 #require serve
2
2
3 $ hg init test
3 $ hg init test
4 $ cd test
4 $ cd test
5 $ echo foo>foo
5 $ echo foo>foo
6 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
6 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
7 $ echo foo>foo.d/foo
7 $ echo foo>foo.d/foo
8 $ echo bar>foo.d/bAr.hg.d/BaR
8 $ echo bar>foo.d/bAr.hg.d/BaR
9 $ echo bar>foo.d/baR.d.hg/bAR
9 $ echo bar>foo.d/baR.d.hg/bAR
10 $ hg commit -A -m 1
10 $ hg commit -A -m 1
11 adding foo
11 adding foo
12 adding foo.d/bAr.hg.d/BaR
12 adding foo.d/bAr.hg.d/BaR
13 adding foo.d/baR.d.hg/bAR
13 adding foo.d/baR.d.hg/bAR
14 adding foo.d/foo
14 adding foo.d/foo
15 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
15 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
16 $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid
16 $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid
17
17
18 Test server address cannot be reused
18 Test server address cannot be reused
19
19
20 $ hg serve -p $HGPORT1 2>&1
20 $ hg serve -p $HGPORT1 2>&1
21 abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$
21 abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$
22 [255]
22 [255]
23
23
24 $ cd ..
24 $ cd ..
25 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
25 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
26
26
27 clone via stream
27 clone via stream
28
28
29 #if no-reposimplestore
29 #if no-reposimplestore
30 $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
30 $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
31 streaming all changes
31 streaming all changes
32 9 files to transfer, 715 bytes of data (no-zstd !)
32 9 files to transfer, 715 bytes of data (no-zstd !)
33 9 files to transfer, 717 bytes of data (zstd !)
33 9 files to transfer, 717 bytes of data (zstd !)
34 transferred * bytes in * seconds (*/sec) (glob)
34 transferred * bytes in * seconds (*/sec) (glob)
35 updating to branch default
35 updating to branch default
36 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
36 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 $ hg verify -R copy
37 $ hg verify -R copy
38 checking changesets
38 checking changesets
39 checking manifests
39 checking manifests
40 crosschecking files in changesets and manifests
40 crosschecking files in changesets and manifests
41 checking files
41 checking files
42 checked 1 changesets with 4 changes to 4 files
42 checked 1 changesets with 4 changes to 4 files
43 #endif
43 #endif
44
44
45 try to clone via stream, should use pull instead
45 try to clone via stream, should use pull instead
46
46
47 $ hg clone --stream http://localhost:$HGPORT1/ copy2
47 $ hg clone --stream http://localhost:$HGPORT1/ copy2
48 warning: stream clone requested but server has them disabled
48 warning: stream clone requested but server has them disabled
49 requesting all changes
49 requesting all changes
50 adding changesets
50 adding changesets
51 adding manifests
51 adding manifests
52 adding file changes
52 adding file changes
53 added 1 changesets with 4 changes to 4 files
53 added 1 changesets with 4 changes to 4 files
54 new changesets 8b6053c928fe
54 new changesets 8b6053c928fe
55 updating to branch default
55 updating to branch default
56 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
56 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
57
57
58 try to clone via stream but missing requirements, so should use pull instead
58 try to clone via stream but missing requirements, so should use pull instead
59
59
60 $ cat > $TESTTMP/removesupportedformat.py << EOF
60 $ cat > $TESTTMP/removesupportedformat.py << EOF
61 > from mercurial import localrepo
61 > from mercurial import localrepo
62 > def extsetup(ui):
62 > def extsetup(ui):
63 > localrepo.localrepository.supportedformats.remove(b'generaldelta')
63 > localrepo.localrepository.supportedformats.remove(b'generaldelta')
64 > EOF
64 > EOF
65
65
66 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
66 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
67 warning: stream clone requested but client is missing requirements: generaldelta
67 warning: stream clone requested but client is missing requirements: generaldelta
68 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
68 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
69 requesting all changes
69 requesting all changes
70 adding changesets
70 adding changesets
71 adding manifests
71 adding manifests
72 adding file changes
72 adding file changes
73 added 1 changesets with 4 changes to 4 files
73 added 1 changesets with 4 changes to 4 files
74 new changesets 8b6053c928fe
74 new changesets 8b6053c928fe
75 updating to branch default
75 updating to branch default
76 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
76 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
77
77
78 clone via pull
78 clone via pull
79
79
80 $ hg clone http://localhost:$HGPORT1/ copy-pull
80 $ hg clone http://localhost:$HGPORT1/ copy-pull
81 requesting all changes
81 requesting all changes
82 adding changesets
82 adding changesets
83 adding manifests
83 adding manifests
84 adding file changes
84 adding file changes
85 added 1 changesets with 4 changes to 4 files
85 added 1 changesets with 4 changes to 4 files
86 new changesets 8b6053c928fe
86 new changesets 8b6053c928fe
87 updating to branch default
87 updating to branch default
88 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
88 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
89 $ hg verify -R copy-pull
89 $ hg verify -R copy-pull
90 checking changesets
90 checking changesets
91 checking manifests
91 checking manifests
92 crosschecking files in changesets and manifests
92 crosschecking files in changesets and manifests
93 checking files
93 checking files
94 checked 1 changesets with 4 changes to 4 files
94 checked 1 changesets with 4 changes to 4 files
95 $ cd test
95 $ cd test
96 $ echo bar > bar
96 $ echo bar > bar
97 $ hg commit -A -d '1 0' -m 2
97 $ hg commit -A -d '1 0' -m 2
98 adding bar
98 adding bar
99 $ cd ..
99 $ cd ..
100
100
101 clone over http with --update
101 clone over http with --update
102
102
103 $ hg clone http://localhost:$HGPORT1/ updated --update 0
103 $ hg clone http://localhost:$HGPORT1/ updated --update 0
104 requesting all changes
104 requesting all changes
105 adding changesets
105 adding changesets
106 adding manifests
106 adding manifests
107 adding file changes
107 adding file changes
108 added 2 changesets with 5 changes to 5 files
108 added 2 changesets with 5 changes to 5 files
109 new changesets 8b6053c928fe:5fed3813f7f5
109 new changesets 8b6053c928fe:5fed3813f7f5
110 updating to branch default
110 updating to branch default
111 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
111 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
112 $ hg log -r . -R updated
112 $ hg log -r . -R updated
113 changeset: 0:8b6053c928fe
113 changeset: 0:8b6053c928fe
114 user: test
114 user: test
115 date: Thu Jan 01 00:00:00 1970 +0000
115 date: Thu Jan 01 00:00:00 1970 +0000
116 summary: 1
116 summary: 1
117
117
118 $ rm -rf updated
118 $ rm -rf updated
119
119
120 incoming via HTTP
120 incoming via HTTP
121
121
122 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
122 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
123 adding changesets
123 adding changesets
124 adding manifests
124 adding manifests
125 adding file changes
125 adding file changes
126 added 1 changesets with 4 changes to 4 files
126 added 1 changesets with 4 changes to 4 files
127 new changesets 8b6053c928fe
127 new changesets 8b6053c928fe
128 updating to branch default
128 updating to branch default
129 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
129 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
130 $ cd partial
130 $ cd partial
131 $ touch LOCAL
131 $ touch LOCAL
132 $ hg ci -qAm LOCAL
132 $ hg ci -qAm LOCAL
133 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
133 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
134 comparing with http://localhost:$HGPORT1/
134 comparing with http://localhost:$HGPORT1/
135 searching for changes
135 searching for changes
136 2
136 2
137 $ cd ..
137 $ cd ..
138
138
139 pull
139 pull
140
140
141 $ cd copy-pull
141 $ cd copy-pull
142 $ cat >> .hg/hgrc <<EOF
142 $ cat >> .hg/hgrc <<EOF
143 > [hooks]
143 > [hooks]
144 > changegroup = sh -c "printenv.py --line changegroup"
144 > changegroup = sh -c "printenv.py --line changegroup"
145 > EOF
145 > EOF
146 $ hg pull
146 $ hg pull
147 pulling from http://localhost:$HGPORT1/
147 pulling from http://localhost:$HGPORT1/
148 searching for changes
148 searching for changes
149 adding changesets
149 adding changesets
150 adding manifests
150 adding manifests
151 adding file changes
151 adding file changes
152 added 1 changesets with 1 changes to 1 files
152 added 1 changesets with 1 changes to 1 files
153 new changesets 5fed3813f7f5
153 new changesets 5fed3813f7f5
154 changegroup hook: HG_HOOKNAME=changegroup
154 changegroup hook: HG_HOOKNAME=changegroup
155 HG_HOOKTYPE=changegroup
155 HG_HOOKTYPE=changegroup
156 HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d
156 HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d
157 HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d
157 HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d
158 HG_SOURCE=pull
158 HG_SOURCE=pull
159 HG_TXNID=TXN:$ID$
159 HG_TXNID=TXN:$ID$
160 HG_TXNNAME=pull
160 HG_TXNNAME=pull
161 http://localhost:$HGPORT1/
161 http://localhost:$HGPORT1/
162 HG_URL=http://localhost:$HGPORT1/
162 HG_URL=http://localhost:$HGPORT1/
163
163
164 (run 'hg update' to get a working copy)
164 (run 'hg update' to get a working copy)
165 $ cd ..
165 $ cd ..
166
166
167 clone from invalid URL
167 clone from invalid URL
168
168
169 $ hg clone http://localhost:$HGPORT/bad
169 $ hg clone http://localhost:$HGPORT/bad
170 abort: HTTP Error 404: Not Found
170 abort: HTTP Error 404: Not Found
171 [100]
171 [100]
172
172
173 test http authentication
173 test http authentication
174 + use the same server to test server side streaming preference
174 + use the same server to test server side streaming preference
175
175
176 $ cd test
176 $ cd test
177
177
178 $ hg serve --config extensions.x=$TESTDIR/httpserverauth.py -p $HGPORT2 -d \
178 $ hg serve --config extensions.x=$TESTDIR/httpserverauth.py -p $HGPORT2 -d \
179 > --pid-file=pid --config server.preferuncompressed=True -E ../errors2.log \
179 > --pid-file=pid --config server.preferuncompressed=True -E ../errors2.log \
180 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
180 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
181 $ cat pid >> $DAEMON_PIDS
181 $ cat pid >> $DAEMON_PIDS
182
182
183 $ cat << EOF > get_pass.py
183 $ cat << EOF > get_pass.py
184 > import getpass
184 > from mercurial import util
185 > def newgetpass(arg):
185 > def newgetpass():
186 > return "pass"
186 > return "pass"
187 > getpass.getpass = newgetpass
187 > util.get_password = newgetpass
188 > EOF
188 > EOF
189
189
190 $ hg id http://localhost:$HGPORT2/
190 $ hg id http://localhost:$HGPORT2/
191 abort: http authorization required for http://localhost:$HGPORT2/
191 abort: http authorization required for http://localhost:$HGPORT2/
192 [255]
192 [255]
193 $ hg id http://localhost:$HGPORT2/
193 $ hg id http://localhost:$HGPORT2/
194 abort: http authorization required for http://localhost:$HGPORT2/
194 abort: http authorization required for http://localhost:$HGPORT2/
195 [255]
195 [255]
196 $ hg id --config ui.interactive=true --debug http://localhost:$HGPORT2/
196 $ hg id --config ui.interactive=true --debug http://localhost:$HGPORT2/
197 using http://localhost:$HGPORT2/
197 using http://localhost:$HGPORT2/
198 sending capabilities command
198 sending capabilities command
199 http authorization required for http://localhost:$HGPORT2/
199 http authorization required for http://localhost:$HGPORT2/
200 realm: mercurial
200 realm: mercurial
201 user: abort: response expected
201 user: abort: response expected
202 [255]
202 [255]
203 $ cat <<'EOF' | hg id --config ui.interactive=true --config ui.nontty=true --debug http://localhost:$HGPORT2/
203 $ cat <<'EOF' | hg id --config ui.interactive=true --config ui.nontty=true --debug http://localhost:$HGPORT2/
204 >
204 >
205 > EOF
205 > EOF
206 using http://localhost:$HGPORT2/
206 using http://localhost:$HGPORT2/
207 sending capabilities command
207 sending capabilities command
208 http authorization required for http://localhost:$HGPORT2/
208 http authorization required for http://localhost:$HGPORT2/
209 realm: mercurial
209 realm: mercurial
210 user:
210 user:
211 password: abort: response expected
211 password: abort: response expected
212 [255]
212 [255]
213 $ cat <<'EOF' | hg id --config ui.interactive=true --config ui.nontty=true --debug http://localhost:$HGPORT2/
213 $ cat <<'EOF' | hg id --config ui.interactive=true --config ui.nontty=true --debug http://localhost:$HGPORT2/
214 >
214 >
215 >
215 >
216 > EOF
216 > EOF
217 using http://localhost:$HGPORT2/
217 using http://localhost:$HGPORT2/
218 sending capabilities command
218 sending capabilities command
219 http authorization required for http://localhost:$HGPORT2/
219 http authorization required for http://localhost:$HGPORT2/
220 realm: mercurial
220 realm: mercurial
221 user:
221 user:
222 password: abort: authorization failed
222 password: abort: authorization failed
223 [255]
223 [255]
224 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
224 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
225 http authorization required for http://localhost:$HGPORT2/
225 http authorization required for http://localhost:$HGPORT2/
226 realm: mercurial
226 realm: mercurial
227 user: user
227 user: user
228 password: 5fed3813f7f5
228 password: 5fed3813f7f5
229 $ hg id http://user:pass@localhost:$HGPORT2/
229 $ hg id http://user:pass@localhost:$HGPORT2/
230 5fed3813f7f5
230 5fed3813f7f5
231 $ echo '[auth]' >> .hg/hgrc
231 $ echo '[auth]' >> .hg/hgrc
232 $ echo 'l.schemes=http' >> .hg/hgrc
232 $ echo 'l.schemes=http' >> .hg/hgrc
233 $ echo 'l.prefix=lo' >> .hg/hgrc
233 $ echo 'l.prefix=lo' >> .hg/hgrc
234 $ echo 'l.username=user' >> .hg/hgrc
234 $ echo 'l.username=user' >> .hg/hgrc
235 $ echo 'l.password=pass' >> .hg/hgrc
235 $ echo 'l.password=pass' >> .hg/hgrc
236 $ hg id http://localhost:$HGPORT2/
236 $ hg id http://localhost:$HGPORT2/
237 5fed3813f7f5
237 5fed3813f7f5
238 $ hg id http://localhost:$HGPORT2/
238 $ hg id http://localhost:$HGPORT2/
239 5fed3813f7f5
239 5fed3813f7f5
240 $ hg id http://user@localhost:$HGPORT2/
240 $ hg id http://user@localhost:$HGPORT2/
241 5fed3813f7f5
241 5fed3813f7f5
242
242
243 $ cat > use_digests.py << EOF
243 $ cat > use_digests.py << EOF
244 > from mercurial import (
244 > from mercurial import (
245 > exthelper,
245 > exthelper,
246 > url,
246 > url,
247 > )
247 > )
248 >
248 >
249 > eh = exthelper.exthelper()
249 > eh = exthelper.exthelper()
250 > uisetup = eh.finaluisetup
250 > uisetup = eh.finaluisetup
251 >
251 >
252 > @eh.wrapfunction(url, 'opener')
252 > @eh.wrapfunction(url, 'opener')
253 > def urlopener(orig, *args, **kwargs):
253 > def urlopener(orig, *args, **kwargs):
254 > opener = orig(*args, **kwargs)
254 > opener = orig(*args, **kwargs)
255 > opener.addheaders.append((r'X-HgTest-AuthType', r'Digest'))
255 > opener.addheaders.append((r'X-HgTest-AuthType', r'Digest'))
256 > return opener
256 > return opener
257 > EOF
257 > EOF
258
258
259 $ hg id http://localhost:$HGPORT2/ --config extensions.x=use_digests.py
259 $ hg id http://localhost:$HGPORT2/ --config extensions.x=use_digests.py
260 5fed3813f7f5
260 5fed3813f7f5
261
261
262 #if no-reposimplestore
262 #if no-reposimplestore
263 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
263 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
264 streaming all changes
264 streaming all changes
265 10 files to transfer, 1.01 KB of data
265 10 files to transfer, 1.01 KB of data
266 transferred * KB in * seconds (*/sec) (glob)
266 transferred * KB in * seconds (*/sec) (glob)
267 updating to branch default
267 updating to branch default
268 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
268 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
269 #endif
269 #endif
270
270
271 --pull should override server's preferuncompressed
271 --pull should override server's preferuncompressed
272 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
272 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
273 requesting all changes
273 requesting all changes
274 adding changesets
274 adding changesets
275 adding manifests
275 adding manifests
276 adding file changes
276 adding file changes
277 added 2 changesets with 5 changes to 5 files
277 added 2 changesets with 5 changes to 5 files
278 new changesets 8b6053c928fe:5fed3813f7f5
278 new changesets 8b6053c928fe:5fed3813f7f5
279 updating to branch default
279 updating to branch default
280 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
280 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
281
281
282 $ hg id http://user2@localhost:$HGPORT2/
282 $ hg id http://user2@localhost:$HGPORT2/
283 abort: http authorization required for http://localhost:$HGPORT2/
283 abort: http authorization required for http://localhost:$HGPORT2/
284 [255]
284 [255]
285 $ hg id http://user:pass2@localhost:$HGPORT2/
285 $ hg id http://user:pass2@localhost:$HGPORT2/
286 abort: HTTP Error 403: no
286 abort: HTTP Error 403: no
287 [100]
287 [100]
288
288
289 $ hg -R dest-pull tag -r tip top
289 $ hg -R dest-pull tag -r tip top
290 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
290 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
291 pushing to http://user:***@localhost:$HGPORT2/
291 pushing to http://user:***@localhost:$HGPORT2/
292 searching for changes
292 searching for changes
293 remote: adding changesets
293 remote: adding changesets
294 remote: adding manifests
294 remote: adding manifests
295 remote: adding file changes
295 remote: adding file changes
296 remote: added 1 changesets with 1 changes to 1 files
296 remote: added 1 changesets with 1 changes to 1 files
297 $ hg rollback -q
297 $ hg rollback -q
298 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ --debug --config devel.debug.peer-request=yes
298 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/ --debug --config devel.debug.peer-request=yes
299 pushing to http://user:***@localhost:$HGPORT2/
299 pushing to http://user:***@localhost:$HGPORT2/
300 using http://localhost:$HGPORT2/
300 using http://localhost:$HGPORT2/
301 http auth: user user, password ****
301 http auth: user user, password ****
302 sending capabilities command
302 sending capabilities command
303 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=capabilities
303 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=capabilities
304 http auth: user user, password ****
304 http auth: user user, password ****
305 devel-peer-request: finished in *.???? seconds (200) (glob)
305 devel-peer-request: finished in *.???? seconds (200) (glob)
306 query 1; heads
306 query 1; heads
307 devel-peer-request: batched-content
307 devel-peer-request: batched-content
308 devel-peer-request: - heads (0 arguments)
308 devel-peer-request: - heads (0 arguments)
309 devel-peer-request: - known (1 arguments)
309 devel-peer-request: - known (1 arguments)
310 sending batch command
310 sending batch command
311 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=batch
311 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=batch
312 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
312 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
313 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
313 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
314 devel-peer-request: 68 bytes of commands arguments in headers
314 devel-peer-request: 68 bytes of commands arguments in headers
315 devel-peer-request: finished in *.???? seconds (200) (glob)
315 devel-peer-request: finished in *.???? seconds (200) (glob)
316 searching for changes
316 searching for changes
317 all remote heads known locally
317 all remote heads known locally
318 preparing listkeys for "phases"
318 preparing listkeys for "phases"
319 sending listkeys command
319 sending listkeys command
320 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
320 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
321 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
321 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
322 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
322 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
323 devel-peer-request: 16 bytes of commands arguments in headers
323 devel-peer-request: 16 bytes of commands arguments in headers
324 devel-peer-request: finished in *.???? seconds (200) (glob)
324 devel-peer-request: finished in *.???? seconds (200) (glob)
325 received listkey for "phases": 58 bytes
325 received listkey for "phases": 58 bytes
326 checking for updated bookmarks
326 checking for updated bookmarks
327 preparing listkeys for "bookmarks"
327 preparing listkeys for "bookmarks"
328 sending listkeys command
328 sending listkeys command
329 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
329 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
330 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
330 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
331 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
331 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
332 devel-peer-request: 19 bytes of commands arguments in headers
332 devel-peer-request: 19 bytes of commands arguments in headers
333 devel-peer-request: finished in *.???? seconds (200) (glob)
333 devel-peer-request: finished in *.???? seconds (200) (glob)
334 received listkey for "bookmarks": 0 bytes
334 received listkey for "bookmarks": 0 bytes
335 sending branchmap command
335 sending branchmap command
336 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap
336 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=branchmap
337 devel-peer-request: Vary X-HgProto-1
337 devel-peer-request: Vary X-HgProto-1
338 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
338 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
339 devel-peer-request: finished in *.???? seconds (200) (glob)
339 devel-peer-request: finished in *.???? seconds (200) (glob)
340 preparing listkeys for "bookmarks"
340 preparing listkeys for "bookmarks"
341 sending listkeys command
341 sending listkeys command
342 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
342 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
343 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
343 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
344 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
344 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
345 devel-peer-request: 19 bytes of commands arguments in headers
345 devel-peer-request: 19 bytes of commands arguments in headers
346 devel-peer-request: finished in *.???? seconds (200) (glob)
346 devel-peer-request: finished in *.???? seconds (200) (glob)
347 received listkey for "bookmarks": 0 bytes
347 received listkey for "bookmarks": 0 bytes
348 1 changesets found
348 1 changesets found
349 list of changesets:
349 list of changesets:
350 7f4e523d01f2cc3765ac8934da3d14db775ff872
350 7f4e523d01f2cc3765ac8934da3d14db775ff872
351 bundle2-output-bundle: "HG20", 5 parts total
351 bundle2-output-bundle: "HG20", 5 parts total
352 bundle2-output-part: "replycaps" 207 bytes payload
352 bundle2-output-part: "replycaps" 207 bytes payload
353 bundle2-output-part: "check:phases" 24 bytes payload
353 bundle2-output-part: "check:phases" 24 bytes payload
354 bundle2-output-part: "check:updated-heads" streamed payload
354 bundle2-output-part: "check:updated-heads" streamed payload
355 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
355 bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
356 bundle2-output-part: "phase-heads" 24 bytes payload
356 bundle2-output-part: "phase-heads" 24 bytes payload
357 sending unbundle command
357 sending unbundle command
358 sending 1023 bytes
358 sending 1023 bytes
359 devel-peer-request: POST http://localhost:$HGPORT2/?cmd=unbundle
359 devel-peer-request: POST http://localhost:$HGPORT2/?cmd=unbundle
360 devel-peer-request: Content-length 1023
360 devel-peer-request: Content-length 1023
361 devel-peer-request: Content-type application/mercurial-0.1
361 devel-peer-request: Content-type application/mercurial-0.1
362 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
362 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
363 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
363 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
364 devel-peer-request: 16 bytes of commands arguments in headers
364 devel-peer-request: 16 bytes of commands arguments in headers
365 devel-peer-request: 1023 bytes of data
365 devel-peer-request: 1023 bytes of data
366 devel-peer-request: finished in *.???? seconds (200) (glob)
366 devel-peer-request: finished in *.???? seconds (200) (glob)
367 bundle2-input-bundle: no-transaction
367 bundle2-input-bundle: no-transaction
368 bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
368 bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
369 bundle2-input-part: "output" (advisory) (params: 0 advisory) supported
369 bundle2-input-part: "output" (advisory) (params: 0 advisory) supported
370 bundle2-input-part: total payload size 55
370 bundle2-input-part: total payload size 55
371 remote: adding changesets
371 remote: adding changesets
372 remote: adding manifests
372 remote: adding manifests
373 remote: adding file changes
373 remote: adding file changes
374 bundle2-input-part: "output" (advisory) supported
374 bundle2-input-part: "output" (advisory) supported
375 bundle2-input-part: total payload size 45
375 bundle2-input-part: total payload size 45
376 remote: added 1 changesets with 1 changes to 1 files
376 remote: added 1 changesets with 1 changes to 1 files
377 bundle2-input-bundle: 3 parts total
377 bundle2-input-bundle: 3 parts total
378 preparing listkeys for "phases"
378 preparing listkeys for "phases"
379 sending listkeys command
379 sending listkeys command
380 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
380 devel-peer-request: GET http://localhost:$HGPORT2/?cmd=listkeys
381 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
381 devel-peer-request: Vary X-HgArg-1,X-HgProto-1
382 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
382 devel-peer-request: X-hgproto-1 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
383 devel-peer-request: 16 bytes of commands arguments in headers
383 devel-peer-request: 16 bytes of commands arguments in headers
384 devel-peer-request: finished in *.???? seconds (200) (glob)
384 devel-peer-request: finished in *.???? seconds (200) (glob)
385 received listkey for "phases": 15 bytes
385 received listkey for "phases": 15 bytes
386 (sent 9 HTTP requests and * bytes; received * bytes in responses) (glob) (?)
386 (sent 9 HTTP requests and * bytes; received * bytes in responses) (glob) (?)
387 $ hg rollback -q
387 $ hg rollback -q
388
388
389 $ sed 's/.*] "/"/' < ../access.log
389 $ sed 's/.*] "/"/' < ../access.log
390 "GET /?cmd=capabilities HTTP/1.1" 401 -
390 "GET /?cmd=capabilities HTTP/1.1" 401 -
391 "GET /?cmd=capabilities HTTP/1.1" 401 -
391 "GET /?cmd=capabilities HTTP/1.1" 401 -
392 "GET /?cmd=capabilities HTTP/1.1" 401 -
392 "GET /?cmd=capabilities HTTP/1.1" 401 -
393 "GET /?cmd=capabilities HTTP/1.1" 401 -
393 "GET /?cmd=capabilities HTTP/1.1" 401 -
394 "GET /?cmd=capabilities HTTP/1.1" 401 -
394 "GET /?cmd=capabilities HTTP/1.1" 401 -
395 "GET /?cmd=capabilities HTTP/1.1" 401 -
395 "GET /?cmd=capabilities HTTP/1.1" 401 -
396 "GET /?cmd=capabilities HTTP/1.1" 200 -
396 "GET /?cmd=capabilities HTTP/1.1" 200 -
397 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
397 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
398 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
398 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
399 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
399 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
400 "GET /?cmd=capabilities HTTP/1.1" 401 -
400 "GET /?cmd=capabilities HTTP/1.1" 401 -
401 "GET /?cmd=capabilities HTTP/1.1" 200 -
401 "GET /?cmd=capabilities HTTP/1.1" 200 -
402 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
402 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
403 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
403 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
404 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
404 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
405 "GET /?cmd=capabilities HTTP/1.1" 401 -
405 "GET /?cmd=capabilities HTTP/1.1" 401 -
406 "GET /?cmd=capabilities HTTP/1.1" 200 -
406 "GET /?cmd=capabilities HTTP/1.1" 200 -
407 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
407 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
408 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
408 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
409 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
409 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
410 "GET /?cmd=capabilities HTTP/1.1" 401 -
410 "GET /?cmd=capabilities HTTP/1.1" 401 -
411 "GET /?cmd=capabilities HTTP/1.1" 200 -
411 "GET /?cmd=capabilities HTTP/1.1" 200 -
412 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
412 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
413 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
413 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
414 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
414 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
415 "GET /?cmd=capabilities HTTP/1.1" 401 -
415 "GET /?cmd=capabilities HTTP/1.1" 401 -
416 "GET /?cmd=capabilities HTTP/1.1" 200 -
416 "GET /?cmd=capabilities HTTP/1.1" 200 -
417 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
417 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
418 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
418 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
419 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
419 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
420 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgtest-authtype:Digest
420 "GET /?cmd=capabilities HTTP/1.1" 401 - x-hgtest-authtype:Digest
421 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgtest-authtype:Digest
421 "GET /?cmd=capabilities HTTP/1.1" 200 - x-hgtest-authtype:Digest
422 "GET /?cmd=lookup HTTP/1.1" 401 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
422 "GET /?cmd=lookup HTTP/1.1" 401 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
423 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
423 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
424 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
424 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
425 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
425 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
426 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
426 "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
427 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
427 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull x-hgtest-authtype:Digest
428 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
428 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
429 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
429 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
430 "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 (no-reposimplestore !)
430 "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 (no-reposimplestore !)
431 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&stream=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
431 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&stream=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
432 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
432 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
433 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
433 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
434 "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
434 "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
435 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
435 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
436 "GET /?cmd=capabilities HTTP/1.1" 401 -
436 "GET /?cmd=capabilities HTTP/1.1" 401 -
437 "GET /?cmd=capabilities HTTP/1.1" 401 -
437 "GET /?cmd=capabilities HTTP/1.1" 401 -
438 "GET /?cmd=capabilities HTTP/1.1" 403 -
438 "GET /?cmd=capabilities HTTP/1.1" 403 -
439 "GET /?cmd=capabilities HTTP/1.1" 401 -
439 "GET /?cmd=capabilities HTTP/1.1" 401 -
440 "GET /?cmd=capabilities HTTP/1.1" 200 -
440 "GET /?cmd=capabilities HTTP/1.1" 200 -
441 "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
441 "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
442 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
442 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
443 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
443 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
444 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
444 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
445 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
445 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
446 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365* (glob)
446 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365* (glob)
447 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
447 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
448 "GET /?cmd=capabilities HTTP/1.1" 401 -
448 "GET /?cmd=capabilities HTTP/1.1" 401 -
449 "GET /?cmd=capabilities HTTP/1.1" 200 -
449 "GET /?cmd=capabilities HTTP/1.1" 200 -
450 "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
450 "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
451 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
451 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
452 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
452 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
453 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
453 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
454 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
454 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
455 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
455 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=666f726365 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
456 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
456 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
457
457
458 $ cd ..
458 $ cd ..
459
459
460 clone of serve with repo in root and unserved subrepo (issue2970)
460 clone of serve with repo in root and unserved subrepo (issue2970)
461
461
462 $ hg --cwd test init sub
462 $ hg --cwd test init sub
463 $ echo empty > test/sub/empty
463 $ echo empty > test/sub/empty
464 $ hg --cwd test/sub add empty
464 $ hg --cwd test/sub add empty
465 $ hg --cwd test/sub commit -qm 'add empty'
465 $ hg --cwd test/sub commit -qm 'add empty'
466 $ hg --cwd test/sub tag -r 0 something
466 $ hg --cwd test/sub tag -r 0 something
467 $ echo sub = sub > test/.hgsub
467 $ echo sub = sub > test/.hgsub
468 $ hg --cwd test add .hgsub
468 $ hg --cwd test add .hgsub
469 $ hg --cwd test commit -qm 'add subrepo'
469 $ hg --cwd test commit -qm 'add subrepo'
470 $ hg clone http://localhost:$HGPORT noslash-clone
470 $ hg clone http://localhost:$HGPORT noslash-clone
471 requesting all changes
471 requesting all changes
472 adding changesets
472 adding changesets
473 adding manifests
473 adding manifests
474 adding file changes
474 adding file changes
475 added 3 changesets with 7 changes to 7 files
475 added 3 changesets with 7 changes to 7 files
476 new changesets 8b6053c928fe:56f9bc90cce6
476 new changesets 8b6053c928fe:56f9bc90cce6
477 updating to branch default
477 updating to branch default
478 cloning subrepo sub from http://localhost:$HGPORT/sub
478 cloning subrepo sub from http://localhost:$HGPORT/sub
479 abort: HTTP Error 404: Not Found
479 abort: HTTP Error 404: Not Found
480 [100]
480 [100]
481 $ hg clone http://localhost:$HGPORT/ slash-clone
481 $ hg clone http://localhost:$HGPORT/ slash-clone
482 requesting all changes
482 requesting all changes
483 adding changesets
483 adding changesets
484 adding manifests
484 adding manifests
485 adding file changes
485 adding file changes
486 added 3 changesets with 7 changes to 7 files
486 added 3 changesets with 7 changes to 7 files
487 new changesets 8b6053c928fe:56f9bc90cce6
487 new changesets 8b6053c928fe:56f9bc90cce6
488 updating to branch default
488 updating to branch default
489 cloning subrepo sub from http://localhost:$HGPORT/sub
489 cloning subrepo sub from http://localhost:$HGPORT/sub
490 abort: HTTP Error 404: Not Found
490 abort: HTTP Error 404: Not Found
491 [100]
491 [100]
492
492
493 check error log
493 check error log
494
494
495 $ cat error.log
495 $ cat error.log
496
496
497 $ cat errors2.log
497 $ cat errors2.log
498
498
499 check abort error reporting while pulling/cloning
499 check abort error reporting while pulling/cloning
500
500
501 $ $RUNTESTDIR/killdaemons.py
501 $ $RUNTESTDIR/killdaemons.py
502 $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
502 $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
503 $ cat hg3.pid >> $DAEMON_PIDS
503 $ cat hg3.pid >> $DAEMON_PIDS
504 $ hg clone http://localhost:$HGPORT/ abort-clone
504 $ hg clone http://localhost:$HGPORT/ abort-clone
505 requesting all changes
505 requesting all changes
506 remote: abort: this is an exercise
506 remote: abort: this is an exercise
507 abort: pull failed on remote
507 abort: pull failed on remote
508 [100]
508 [100]
509 $ cat error.log
509 $ cat error.log
510
510
511 disable pull-based clones
511 disable pull-based clones
512
512
513 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True
513 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True
514 $ cat hg4.pid >> $DAEMON_PIDS
514 $ cat hg4.pid >> $DAEMON_PIDS
515 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone
515 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone
516 requesting all changes
516 requesting all changes
517 remote: abort: server has pull-based clones disabled
517 remote: abort: server has pull-based clones disabled
518 abort: pull failed on remote
518 abort: pull failed on remote
519 (remove --pull if specified or upgrade Mercurial)
519 (remove --pull if specified or upgrade Mercurial)
520 [100]
520 [100]
521
521
522 #if no-reposimplestore
522 #if no-reposimplestore
523 ... but keep stream clones working
523 ... but keep stream clones working
524
524
525 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
525 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
526 streaming all changes
526 streaming all changes
527 * files to transfer, * of data (glob)
527 * files to transfer, * of data (glob)
528 transferred * in * seconds (*/sec) (glob)
528 transferred * in * seconds (*/sec) (glob)
529 $ cat error.log
529 $ cat error.log
530 #endif
530 #endif
531
531
532 ... and also keep partial clones and pulls working
532 ... and also keep partial clones and pulls working
533 $ hg clone http://localhost:$HGPORT1 --rev 0 test/partial/clone
533 $ hg clone http://localhost:$HGPORT1 --rev 0 test/partial/clone
534 adding changesets
534 adding changesets
535 adding manifests
535 adding manifests
536 adding file changes
536 adding file changes
537 added 1 changesets with 4 changes to 4 files
537 added 1 changesets with 4 changes to 4 files
538 new changesets 8b6053c928fe
538 new changesets 8b6053c928fe
539 updating to branch default
539 updating to branch default
540 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
540 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
541 $ hg pull -R test/partial/clone
541 $ hg pull -R test/partial/clone
542 pulling from http://localhost:$HGPORT1/
542 pulling from http://localhost:$HGPORT1/
543 searching for changes
543 searching for changes
544 adding changesets
544 adding changesets
545 adding manifests
545 adding manifests
546 adding file changes
546 adding file changes
547 added 2 changesets with 3 changes to 3 files
547 added 2 changesets with 3 changes to 3 files
548 new changesets 5fed3813f7f5:56f9bc90cce6
548 new changesets 5fed3813f7f5:56f9bc90cce6
549 (run 'hg update' to get a working copy)
549 (run 'hg update' to get a working copy)
550
550
551 $ hg clone -U -r 0 test/partial/clone test/another/clone
551 $ hg clone -U -r 0 test/partial/clone test/another/clone
552 adding changesets
552 adding changesets
553 adding manifests
553 adding manifests
554 adding file changes
554 adding file changes
555 added 1 changesets with 4 changes to 4 files
555 added 1 changesets with 4 changes to 4 files
556 new changesets 8b6053c928fe
556 new changesets 8b6053c928fe
557
557
558 corrupt cookies file should yield a warning
558 corrupt cookies file should yield a warning
559
559
560 $ cat > $TESTTMP/cookies.txt << EOF
560 $ cat > $TESTTMP/cookies.txt << EOF
561 > bad format
561 > bad format
562 > EOF
562 > EOF
563
563
564 $ hg --config auth.cookiefile=$TESTTMP/cookies.txt id http://localhost:$HGPORT/
564 $ hg --config auth.cookiefile=$TESTTMP/cookies.txt id http://localhost:$HGPORT/
565 (error loading cookie file $TESTTMP/cookies.txt: '*/cookies.txt' does not look like a Netscape format cookies file; continuing without cookies) (glob)
565 (error loading cookie file $TESTTMP/cookies.txt: '*/cookies.txt' does not look like a Netscape format cookies file; continuing without cookies) (glob)
566 56f9bc90cce6
566 56f9bc90cce6
567
567
568 $ killdaemons.py
568 $ killdaemons.py
569
569
570 Create dummy authentication handler that looks for cookies. It doesn't do anything
570 Create dummy authentication handler that looks for cookies. It doesn't do anything
571 useful. It just raises an HTTP 500 with details about the Cookie request header.
571 useful. It just raises an HTTP 500 with details about the Cookie request header.
572 We raise HTTP 500 because its message is printed in the abort message.
572 We raise HTTP 500 because its message is printed in the abort message.
573
573
574 $ cat > cookieauth.py << EOF
574 $ cat > cookieauth.py << EOF
575 > from mercurial import util
575 > from mercurial import util
576 > from mercurial.hgweb import common
576 > from mercurial.hgweb import common
577 > def perform_authentication(hgweb, req, op):
577 > def perform_authentication(hgweb, req, op):
578 > cookie = req.headers.get(b'Cookie')
578 > cookie = req.headers.get(b'Cookie')
579 > if not cookie:
579 > if not cookie:
580 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, b'no-cookie')
580 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, b'no-cookie')
581 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, b'Cookie: %s' % cookie)
581 > raise common.ErrorResponse(common.HTTP_SERVER_ERROR, b'Cookie: %s' % cookie)
582 > def extsetup(ui):
582 > def extsetup(ui):
583 > common.permhooks.insert(0, perform_authentication)
583 > common.permhooks.insert(0, perform_authentication)
584 > EOF
584 > EOF
585
585
586 $ hg serve --config extensions.cookieauth=cookieauth.py -R test -p $HGPORT -d --pid-file=pid
586 $ hg serve --config extensions.cookieauth=cookieauth.py -R test -p $HGPORT -d --pid-file=pid
587 $ cat pid > $DAEMON_PIDS
587 $ cat pid > $DAEMON_PIDS
588
588
589 Request without cookie sent should fail due to lack of cookie
589 Request without cookie sent should fail due to lack of cookie
590
590
591 $ hg id http://localhost:$HGPORT
591 $ hg id http://localhost:$HGPORT
592 abort: HTTP Error 500: no-cookie
592 abort: HTTP Error 500: no-cookie
593 [100]
593 [100]
594
594
595 Populate a cookies file
595 Populate a cookies file
596
596
597 $ cat > cookies.txt << EOF
597 $ cat > cookies.txt << EOF
598 > # HTTP Cookie File
598 > # HTTP Cookie File
599 > # Expiration is 2030-01-01 at midnight
599 > # Expiration is 2030-01-01 at midnight
600 > .example.com TRUE / FALSE 1893456000 hgkey examplevalue
600 > .example.com TRUE / FALSE 1893456000 hgkey examplevalue
601 > EOF
601 > EOF
602
602
603 Should not send a cookie for another domain
603 Should not send a cookie for another domain
604
604
605 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
605 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
606 abort: HTTP Error 500: no-cookie
606 abort: HTTP Error 500: no-cookie
607 [100]
607 [100]
608
608
609 Add a cookie entry for our test server and verify it is sent
609 Add a cookie entry for our test server and verify it is sent
610
610
611 $ cat >> cookies.txt << EOF
611 $ cat >> cookies.txt << EOF
612 > localhost.local FALSE / FALSE 1893456000 hgkey localhostvalue
612 > localhost.local FALSE / FALSE 1893456000 hgkey localhostvalue
613 > EOF
613 > EOF
614
614
615 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
615 $ hg --config auth.cookiefile=cookies.txt id http://localhost:$HGPORT/
616 abort: HTTP Error 500: Cookie: hgkey=localhostvalue
616 abort: HTTP Error 500: Cookie: hgkey=localhostvalue
617 [100]
617 [100]
@@ -1,452 +1,452 b''
1 #testcases sshv1 sshv2
1 #testcases sshv1 sshv2
2
2
3 #if sshv2
3 #if sshv2
4 $ cat >> $HGRCPATH << EOF
4 $ cat >> $HGRCPATH << EOF
5 > [experimental]
5 > [experimental]
6 > sshpeer.advertise-v2 = true
6 > sshpeer.advertise-v2 = true
7 > sshserver.support-v2 = true
7 > sshserver.support-v2 = true
8 > EOF
8 > EOF
9 #endif
9 #endif
10
10
11 This file contains testcases that tend to be related to the wire protocol part
11 This file contains testcases that tend to be related to the wire protocol part
12 of largefiles.
12 of largefiles.
13
13
14 $ USERCACHE="$TESTTMP/cache"; export USERCACHE
14 $ USERCACHE="$TESTTMP/cache"; export USERCACHE
15 $ mkdir "${USERCACHE}"
15 $ mkdir "${USERCACHE}"
16 $ cat >> $HGRCPATH <<EOF
16 $ cat >> $HGRCPATH <<EOF
17 > [extensions]
17 > [extensions]
18 > largefiles=
18 > largefiles=
19 > purge=
19 > purge=
20 > rebase=
20 > rebase=
21 > transplant=
21 > transplant=
22 > [phases]
22 > [phases]
23 > publish=False
23 > publish=False
24 > [largefiles]
24 > [largefiles]
25 > minsize=2
25 > minsize=2
26 > patterns=glob:**.dat
26 > patterns=glob:**.dat
27 > usercache=${USERCACHE}
27 > usercache=${USERCACHE}
28 > [web]
28 > [web]
29 > allow-archive = zip
29 > allow-archive = zip
30 > [hooks]
30 > [hooks]
31 > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status"
31 > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status"
32 > EOF
32 > EOF
33
33
34
34
35 #if serve
35 #if serve
36 vanilla clients not locked out from largefiles servers on vanilla repos
36 vanilla clients not locked out from largefiles servers on vanilla repos
37 $ mkdir r1
37 $ mkdir r1
38 $ cd r1
38 $ cd r1
39 $ hg init
39 $ hg init
40 $ echo c1 > f1
40 $ echo c1 > f1
41 $ hg add f1
41 $ hg add f1
42 $ hg commit -m "m1"
42 $ hg commit -m "m1"
43 Invoking status precommit hook
43 Invoking status precommit hook
44 A f1
44 A f1
45 $ cd ..
45 $ cd ..
46 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
46 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
47 $ cat hg.pid >> $DAEMON_PIDS
47 $ cat hg.pid >> $DAEMON_PIDS
48 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
48 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
49 requesting all changes
49 requesting all changes
50 adding changesets
50 adding changesets
51 adding manifests
51 adding manifests
52 adding file changes
52 adding file changes
53 added 1 changesets with 1 changes to 1 files
53 added 1 changesets with 1 changes to 1 files
54 new changesets b6eb3a2e2efe (1 drafts)
54 new changesets b6eb3a2e2efe (1 drafts)
55 updating to branch default
55 updating to branch default
56 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
56 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
57
57
58 largefiles clients still work with vanilla servers
58 largefiles clients still work with vanilla servers
59 $ hg serve --config extensions.largefiles=! -R r1 -d -p $HGPORT1 --pid-file hg.pid
59 $ hg serve --config extensions.largefiles=! -R r1 -d -p $HGPORT1 --pid-file hg.pid
60 $ cat hg.pid >> $DAEMON_PIDS
60 $ cat hg.pid >> $DAEMON_PIDS
61 $ hg clone http://localhost:$HGPORT1 r3
61 $ hg clone http://localhost:$HGPORT1 r3
62 requesting all changes
62 requesting all changes
63 adding changesets
63 adding changesets
64 adding manifests
64 adding manifests
65 adding file changes
65 adding file changes
66 added 1 changesets with 1 changes to 1 files
66 added 1 changesets with 1 changes to 1 files
67 new changesets b6eb3a2e2efe (1 drafts)
67 new changesets b6eb3a2e2efe (1 drafts)
68 updating to branch default
68 updating to branch default
69 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
70 #endif
70 #endif
71
71
72 vanilla clients locked out from largefiles http repos
72 vanilla clients locked out from largefiles http repos
73 $ mkdir r4
73 $ mkdir r4
74 $ cd r4
74 $ cd r4
75 $ hg init
75 $ hg init
76 $ echo c1 > f1
76 $ echo c1 > f1
77 $ hg add --large f1
77 $ hg add --large f1
78 $ hg commit -m "m1"
78 $ hg commit -m "m1"
79 Invoking status precommit hook
79 Invoking status precommit hook
80 A f1
80 A f1
81 $ cd ..
81 $ cd ..
82
82
83 largefiles can be pushed locally (issue3583)
83 largefiles can be pushed locally (issue3583)
84 $ hg init dest
84 $ hg init dest
85 $ cd r4
85 $ cd r4
86 $ hg outgoing ../dest
86 $ hg outgoing ../dest
87 comparing with ../dest
87 comparing with ../dest
88 searching for changes
88 searching for changes
89 changeset: 0:639881c12b4c
89 changeset: 0:639881c12b4c
90 tag: tip
90 tag: tip
91 user: test
91 user: test
92 date: Thu Jan 01 00:00:00 1970 +0000
92 date: Thu Jan 01 00:00:00 1970 +0000
93 summary: m1
93 summary: m1
94
94
95 $ hg push ../dest
95 $ hg push ../dest
96 pushing to ../dest
96 pushing to ../dest
97 searching for changes
97 searching for changes
98 adding changesets
98 adding changesets
99 adding manifests
99 adding manifests
100 adding file changes
100 adding file changes
101 added 1 changesets with 1 changes to 1 files
101 added 1 changesets with 1 changes to 1 files
102
102
103 exit code with nothing outgoing (issue3611)
103 exit code with nothing outgoing (issue3611)
104 $ hg outgoing ../dest
104 $ hg outgoing ../dest
105 comparing with ../dest
105 comparing with ../dest
106 searching for changes
106 searching for changes
107 no changes found
107 no changes found
108 [1]
108 [1]
109 $ cd ..
109 $ cd ..
110
110
111 #if serve
111 #if serve
112 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
112 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
113 $ cat hg.pid >> $DAEMON_PIDS
113 $ cat hg.pid >> $DAEMON_PIDS
114 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
114 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
115 abort: remote error:
115 abort: remote error:
116
116
117 This repository uses the largefiles extension.
117 This repository uses the largefiles extension.
118
118
119 Please enable it in your Mercurial config file.
119 Please enable it in your Mercurial config file.
120 [100]
120 [100]
121
121
122 used all HGPORTs, kill all daemons
122 used all HGPORTs, kill all daemons
123 $ killdaemons.py
123 $ killdaemons.py
124 #endif
124 #endif
125
125
126 vanilla clients locked out from largefiles ssh repos
126 vanilla clients locked out from largefiles ssh repos
127 $ hg --config extensions.largefiles=! clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5
127 $ hg --config extensions.largefiles=! clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5
128 remote:
128 remote:
129 remote: This repository uses the largefiles extension.
129 remote: This repository uses the largefiles extension.
130 remote:
130 remote:
131 remote: Please enable it in your Mercurial config file.
131 remote: Please enable it in your Mercurial config file.
132 remote:
132 remote:
133 remote: -
133 remote: -
134 abort: remote error
134 abort: remote error
135 (check previous remote output)
135 (check previous remote output)
136 [100]
136 [100]
137
137
138 #if serve
138 #if serve
139
139
140 largefiles clients refuse to push largefiles repos to vanilla servers
140 largefiles clients refuse to push largefiles repos to vanilla servers
141 $ mkdir r6
141 $ mkdir r6
142 $ cd r6
142 $ cd r6
143 $ hg init
143 $ hg init
144 $ echo c1 > f1
144 $ echo c1 > f1
145 $ hg add f1
145 $ hg add f1
146 $ hg commit -m "m1"
146 $ hg commit -m "m1"
147 Invoking status precommit hook
147 Invoking status precommit hook
148 A f1
148 A f1
149 $ cat >> .hg/hgrc <<!
149 $ cat >> .hg/hgrc <<!
150 > [web]
150 > [web]
151 > push_ssl = false
151 > push_ssl = false
152 > allow_push = *
152 > allow_push = *
153 > !
153 > !
154 $ cd ..
154 $ cd ..
155 $ hg clone r6 r7
155 $ hg clone r6 r7
156 updating to branch default
156 updating to branch default
157 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
157 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
158 $ cd r7
158 $ cd r7
159 $ echo c2 > f2
159 $ echo c2 > f2
160 $ hg add --large f2
160 $ hg add --large f2
161 $ hg commit -m "m2"
161 $ hg commit -m "m2"
162 Invoking status precommit hook
162 Invoking status precommit hook
163 A f2
163 A f2
164 $ hg verify --large
164 $ hg verify --large
165 checking changesets
165 checking changesets
166 checking manifests
166 checking manifests
167 crosschecking files in changesets and manifests
167 crosschecking files in changesets and manifests
168 checking files
168 checking files
169 checked 2 changesets with 2 changes to 2 files
169 checked 2 changesets with 2 changes to 2 files
170 searching 1 changesets for largefiles
170 searching 1 changesets for largefiles
171 verified existence of 1 revisions of 1 largefiles
171 verified existence of 1 revisions of 1 largefiles
172 $ hg serve --config extensions.largefiles=! -R ../r6 -d -p $HGPORT --pid-file ../hg.pid
172 $ hg serve --config extensions.largefiles=! -R ../r6 -d -p $HGPORT --pid-file ../hg.pid
173 $ cat ../hg.pid >> $DAEMON_PIDS
173 $ cat ../hg.pid >> $DAEMON_PIDS
174 $ hg push http://localhost:$HGPORT
174 $ hg push http://localhost:$HGPORT
175 pushing to http://localhost:$HGPORT/
175 pushing to http://localhost:$HGPORT/
176 searching for changes
176 searching for changes
177 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
177 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
178 [255]
178 [255]
179 $ cd ..
179 $ cd ..
180
180
181 putlfile errors are shown (issue3123)
181 putlfile errors are shown (issue3123)
182 Corrupt the cached largefile in r7 and move it out of the servers usercache
182 Corrupt the cached largefile in r7 and move it out of the servers usercache
183 $ mv r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 .
183 $ mv r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 .
184 $ echo 'client side corruption' > r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
184 $ echo 'client side corruption' > r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
185 $ rm "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8"
185 $ rm "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8"
186 $ hg init empty
186 $ hg init empty
187 $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \
187 $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \
188 > --config 'web.allow_push=*' --config web.push_ssl=False
188 > --config 'web.allow_push=*' --config web.push_ssl=False
189 $ cat hg.pid >> $DAEMON_PIDS
189 $ cat hg.pid >> $DAEMON_PIDS
190 $ hg push -R r7 http://localhost:$HGPORT1
190 $ hg push -R r7 http://localhost:$HGPORT1
191 pushing to http://localhost:$HGPORT1/
191 pushing to http://localhost:$HGPORT1/
192 searching for changes
192 searching for changes
193 remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash
193 remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash
194 abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/
194 abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/
195 [255]
195 [255]
196 $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
196 $ mv 4cdac4d8b084d0b599525cf732437fb337d422a8 r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
197 Push of file that exists on server but is corrupted - magic healing would be nice ... but too magic
197 Push of file that exists on server but is corrupted - magic healing would be nice ... but too magic
198 $ echo "server side corruption" > empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
198 $ echo "server side corruption" > empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
199 $ hg push -R r7 http://localhost:$HGPORT1
199 $ hg push -R r7 http://localhost:$HGPORT1
200 pushing to http://localhost:$HGPORT1/
200 pushing to http://localhost:$HGPORT1/
201 searching for changes
201 searching for changes
202 remote: adding changesets
202 remote: adding changesets
203 remote: adding manifests
203 remote: adding manifests
204 remote: adding file changes
204 remote: adding file changes
205 remote: added 2 changesets with 2 changes to 2 files
205 remote: added 2 changesets with 2 changes to 2 files
206 $ cat empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
206 $ cat empty/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8
207 server side corruption
207 server side corruption
208 $ rm -rf empty
208 $ rm -rf empty
209
209
210 Push a largefiles repository to a served empty repository
210 Push a largefiles repository to a served empty repository
211 $ hg init r8
211 $ hg init r8
212 $ echo c3 > r8/f1
212 $ echo c3 > r8/f1
213 $ hg add --large r8/f1 -R r8
213 $ hg add --large r8/f1 -R r8
214 $ hg commit -m "m1" -R r8
214 $ hg commit -m "m1" -R r8
215 Invoking status precommit hook
215 Invoking status precommit hook
216 A f1
216 A f1
217 $ hg init empty
217 $ hg init empty
218 $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \
218 $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \
219 > --config 'web.allow_push=*' --config web.push_ssl=False
219 > --config 'web.allow_push=*' --config web.push_ssl=False
220 $ cat hg.pid >> $DAEMON_PIDS
220 $ cat hg.pid >> $DAEMON_PIDS
221 $ rm "${USERCACHE}"/*
221 $ rm "${USERCACHE}"/*
222 $ hg push -R r8 http://localhost:$HGPORT2/#default
222 $ hg push -R r8 http://localhost:$HGPORT2/#default
223 pushing to http://localhost:$HGPORT2/
223 pushing to http://localhost:$HGPORT2/
224 searching for changes
224 searching for changes
225 remote: adding changesets
225 remote: adding changesets
226 remote: adding manifests
226 remote: adding manifests
227 remote: adding file changes
227 remote: adding file changes
228 remote: added 1 changesets with 1 changes to 1 files
228 remote: added 1 changesets with 1 changes to 1 files
229 $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
229 $ [ -f "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
230 $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
230 $ [ -f empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
231
231
232 Clone over http, no largefiles pulled on clone.
232 Clone over http, no largefiles pulled on clone.
233
233
234 $ hg clone http://localhost:$HGPORT2/#default http-clone -U
234 $ hg clone http://localhost:$HGPORT2/#default http-clone -U
235 adding changesets
235 adding changesets
236 adding manifests
236 adding manifests
237 adding file changes
237 adding file changes
238 added 1 changesets with 1 changes to 1 files
238 added 1 changesets with 1 changes to 1 files
239 new changesets cf03e5bb9936 (1 drafts)
239 new changesets cf03e5bb9936 (1 drafts)
240
240
241 Archive contains largefiles
241 Archive contains largefiles
242 >>> import os
242 >>> import os
243 >>> from mercurial import urllibcompat
243 >>> from mercurial import urllibcompat
244 >>> u = 'http://localhost:%s/archive/default.zip' % os.environ['HGPORT2']
244 >>> u = 'http://localhost:%s/archive/default.zip' % os.environ['HGPORT2']
245 >>> with open('archive.zip', 'wb') as f:
245 >>> with open('archive.zip', 'wb') as f:
246 ... f.write(urllibcompat.urlreq.urlopen(u).read()) and None
246 ... f.write(urllibcompat.urlreq.urlopen(u).read()) and None
247 $ unzip -t archive.zip
247 $ unzip -t archive.zip
248 Archive: archive.zip
248 Archive: archive.zip
249 testing: empty-default/.hg_archival.txt*OK (glob)
249 testing: empty-default/.hg_archival.txt*OK (glob)
250 testing: empty-default/f1*OK (glob)
250 testing: empty-default/f1*OK (glob)
251 No errors detected in compressed data of archive.zip.
251 No errors detected in compressed data of archive.zip.
252
252
253 test 'verify' with remotestore:
253 test 'verify' with remotestore:
254
254
255 $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90
255 $ rm "${USERCACHE}"/02a439e5c31c526465ab1a0ca1f431f76b827b90
256 $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 .
256 $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 .
257 $ hg -R http-clone verify --large --lfa
257 $ hg -R http-clone verify --large --lfa
258 checking changesets
258 checking changesets
259 checking manifests
259 checking manifests
260 crosschecking files in changesets and manifests
260 crosschecking files in changesets and manifests
261 checking files
261 checking files
262 checked 1 changesets with 1 changes to 1 files
262 checked 1 changesets with 1 changes to 1 files
263 searching 1 changesets for largefiles
263 searching 1 changesets for largefiles
264 changeset 0:cf03e5bb9936: f1 missing
264 changeset 0:cf03e5bb9936: f1 missing
265 verified existence of 1 revisions of 1 largefiles
265 verified existence of 1 revisions of 1 largefiles
266 [1]
266 [1]
267 $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/
267 $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/
268 $ hg -R http-clone -q verify --large --lfa
268 $ hg -R http-clone -q verify --large --lfa
269
269
270 largefiles pulled on update - a largefile missing on the server:
270 largefiles pulled on update - a largefile missing on the server:
271 $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 .
271 $ mv empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 .
272 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache
272 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache
273 getting changed largefiles
273 getting changed largefiles
274 f1: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 not available from http://localhost:$HGPORT2/
274 f1: largefile 02a439e5c31c526465ab1a0ca1f431f76b827b90 not available from http://localhost:$HGPORT2/
275 0 largefiles updated, 0 removed
275 0 largefiles updated, 0 removed
276 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
276 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
277 $ hg -R http-clone st
277 $ hg -R http-clone st
278 ! f1
278 ! f1
279 $ hg -R http-clone up -Cqr null
279 $ hg -R http-clone up -Cqr null
280
280
281 largefiles pulled on update - a largefile corrupted on the server:
281 largefiles pulled on update - a largefile corrupted on the server:
282 $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90
282 $ echo corruption > empty/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90
283 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache
283 $ hg -R http-clone up --config largefiles.usercache=http-clone-usercache
284 getting changed largefiles
284 getting changed largefiles
285 f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27)
285 f1: data corruption (expected 02a439e5c31c526465ab1a0ca1f431f76b827b90, got 6a7bb2556144babe3899b25e5428123735bb1e27)
286 0 largefiles updated, 0 removed
286 0 largefiles updated, 0 removed
287 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
287 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
288 $ hg -R http-clone st
288 $ hg -R http-clone st
289 ! f1
289 ! f1
290 $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
290 $ [ ! -f http-clone/.hg/largefiles/02a439e5c31c526465ab1a0ca1f431f76b827b90 ]
291 $ [ ! -f http-clone/f1 ]
291 $ [ ! -f http-clone/f1 ]
292 $ [ ! -f http-clone-usercache ]
292 $ [ ! -f http-clone-usercache ]
293 $ hg -R http-clone verify --large --lfc
293 $ hg -R http-clone verify --large --lfc
294 checking changesets
294 checking changesets
295 checking manifests
295 checking manifests
296 crosschecking files in changesets and manifests
296 crosschecking files in changesets and manifests
297 checking files
297 checking files
298 checked 1 changesets with 1 changes to 1 files
298 checked 1 changesets with 1 changes to 1 files
299 searching 1 changesets for largefiles
299 searching 1 changesets for largefiles
300 verified contents of 1 revisions of 1 largefiles
300 verified contents of 1 revisions of 1 largefiles
301 $ hg -R http-clone up -Cqr null
301 $ hg -R http-clone up -Cqr null
302
302
303 largefiles pulled on update - no server side problems:
303 largefiles pulled on update - no server side problems:
304 $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/
304 $ mv 02a439e5c31c526465ab1a0ca1f431f76b827b90 empty/.hg/largefiles/
305 $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache --config progress.debug=true
305 $ hg -R http-clone --debug up --config largefiles.usercache=http-clone-usercache --config progress.debug=true
306 resolving manifests
306 resolving manifests
307 branchmerge: False, force: False, partial: False
307 branchmerge: False, force: False, partial: False
308 ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936
308 ancestor: 000000000000, local: 000000000000+, remote: cf03e5bb9936
309 .hglf/f1: remote created -> g
309 .hglf/f1: remote created -> g
310 getting .hglf/f1
310 getting .hglf/f1
311 updating: .hglf/f1 1/1 files (100.00%)
311 updating: .hglf/f1 1/1 files (100.00%)
312 getting changed largefiles
312 getting changed largefiles
313 using http://localhost:$HGPORT2/
313 using http://localhost:$HGPORT2/
314 sending capabilities command
314 sending capabilities command
315 sending statlfile command
315 sending statlfile command
316 getting largefiles: 0/1 files (0.00%)
316 getting largefiles: 0/1 files (0.00%)
317 getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90
317 getting f1:02a439e5c31c526465ab1a0ca1f431f76b827b90
318 sending getlfile command
318 sending getlfile command
319 found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store
319 found 02a439e5c31c526465ab1a0ca1f431f76b827b90 in store
320 1 largefiles updated, 0 removed
320 1 largefiles updated, 0 removed
321 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
321 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
322
322
323 $ ls http-clone-usercache/*
323 $ ls http-clone-usercache/*
324 http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90
324 http-clone-usercache/02a439e5c31c526465ab1a0ca1f431f76b827b90
325
325
326 $ rm -rf empty http-clone*
326 $ rm -rf empty http-clone*
327
327
328 used all HGPORTs, kill all daemons
328 used all HGPORTs, kill all daemons
329 $ killdaemons.py
329 $ killdaemons.py
330
330
331 largefiles should batch verify remote calls
331 largefiles should batch verify remote calls
332
332
333 $ hg init batchverifymain
333 $ hg init batchverifymain
334 $ cd batchverifymain
334 $ cd batchverifymain
335 $ echo "aaa" >> a
335 $ echo "aaa" >> a
336 $ hg add --large a
336 $ hg add --large a
337 $ hg commit -m "a"
337 $ hg commit -m "a"
338 Invoking status precommit hook
338 Invoking status precommit hook
339 A a
339 A a
340 $ echo "bbb" >> b
340 $ echo "bbb" >> b
341 $ hg add --large b
341 $ hg add --large b
342 $ hg commit -m "b"
342 $ hg commit -m "b"
343 Invoking status precommit hook
343 Invoking status precommit hook
344 A b
344 A b
345 $ cd ..
345 $ cd ..
346 $ hg serve -R batchverifymain -d -p $HGPORT --pid-file hg.pid \
346 $ hg serve -R batchverifymain -d -p $HGPORT --pid-file hg.pid \
347 > -A access.log
347 > -A access.log
348 $ cat hg.pid >> $DAEMON_PIDS
348 $ cat hg.pid >> $DAEMON_PIDS
349 $ hg clone --noupdate http://localhost:$HGPORT batchverifyclone
349 $ hg clone --noupdate http://localhost:$HGPORT batchverifyclone
350 requesting all changes
350 requesting all changes
351 adding changesets
351 adding changesets
352 adding manifests
352 adding manifests
353 adding file changes
353 adding file changes
354 added 2 changesets with 2 changes to 2 files
354 added 2 changesets with 2 changes to 2 files
355 new changesets 567253b0f523:04d19c27a332 (2 drafts)
355 new changesets 567253b0f523:04d19c27a332 (2 drafts)
356 $ hg -R batchverifyclone verify --large --lfa
356 $ hg -R batchverifyclone verify --large --lfa
357 checking changesets
357 checking changesets
358 checking manifests
358 checking manifests
359 crosschecking files in changesets and manifests
359 crosschecking files in changesets and manifests
360 checking files
360 checking files
361 checked 2 changesets with 2 changes to 2 files
361 checked 2 changesets with 2 changes to 2 files
362 searching 2 changesets for largefiles
362 searching 2 changesets for largefiles
363 verified existence of 2 revisions of 2 largefiles
363 verified existence of 2 revisions of 2 largefiles
364 $ tail -1 access.log
364 $ tail -1 access.log
365 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3D972a1a11f19934401291cc99117ec614933374ce%3Bstatlfile+sha%3Dc801c9cfe94400963fcb683246217d5db77f9a9a x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
365 $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=statlfile+sha%3D972a1a11f19934401291cc99117ec614933374ce%3Bstatlfile+sha%3Dc801c9cfe94400963fcb683246217d5db77f9a9a x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
366 $ hg -R batchverifyclone update
366 $ hg -R batchverifyclone update
367 getting changed largefiles
367 getting changed largefiles
368 2 largefiles updated, 0 removed
368 2 largefiles updated, 0 removed
369 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
369 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
370
370
371 Clear log file before next test
371 Clear log file before next test
372
372
373 $ printf "" > access.log
373 $ printf "" > access.log
374
374
375 Verify should check file on remote server only when file is not
375 Verify should check file on remote server only when file is not
376 available locally.
376 available locally.
377
377
378 $ echo "ccc" >> batchverifymain/c
378 $ echo "ccc" >> batchverifymain/c
379 $ hg -R batchverifymain status
379 $ hg -R batchverifymain status
380 ? c
380 ? c
381 $ hg -R batchverifymain add --large batchverifymain/c
381 $ hg -R batchverifymain add --large batchverifymain/c
382 $ hg -R batchverifymain commit -m "c"
382 $ hg -R batchverifymain commit -m "c"
383 Invoking status precommit hook
383 Invoking status precommit hook
384 A c
384 A c
385 $ hg -R batchverifyclone pull
385 $ hg -R batchverifyclone pull
386 pulling from http://localhost:$HGPORT/
386 pulling from http://localhost:$HGPORT/
387 searching for changes
387 searching for changes
388 adding changesets
388 adding changesets
389 adding manifests
389 adding manifests
390 adding file changes
390 adding file changes
391 added 1 changesets with 1 changes to 1 files
391 added 1 changesets with 1 changes to 1 files
392 new changesets 6bba8cb6935d (1 drafts)
392 new changesets 6bba8cb6935d (1 drafts)
393 (run 'hg update' to get a working copy)
393 (run 'hg update' to get a working copy)
394 $ hg -R batchverifyclone verify --lfa
394 $ hg -R batchverifyclone verify --lfa
395 checking changesets
395 checking changesets
396 checking manifests
396 checking manifests
397 crosschecking files in changesets and manifests
397 crosschecking files in changesets and manifests
398 checking files
398 checking files
399 checked 3 changesets with 3 changes to 3 files
399 checked 3 changesets with 3 changes to 3 files
400 searching 3 changesets for largefiles
400 searching 3 changesets for largefiles
401 verified existence of 3 revisions of 3 largefiles
401 verified existence of 3 revisions of 3 largefiles
402 $ tail -1 access.log
402 $ tail -1 access.log
403 $LOCALIP - - [$LOGDATE$] "GET /?cmd=statlfile HTTP/1.1" 200 - x-hgarg-1:sha=c8559c3c9cfb42131794b7d8009230403b9b454c x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
403 $LOCALIP - - [$LOGDATE$] "GET /?cmd=statlfile HTTP/1.1" 200 - x-hgarg-1:sha=c8559c3c9cfb42131794b7d8009230403b9b454c x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob)
404
404
405 $ killdaemons.py
405 $ killdaemons.py
406
406
407 largefiles should not ask for password again after successful authorization
407 largefiles should not ask for password again after successful authorization
408
408
409 $ hg init credentialmain
409 $ hg init credentialmain
410 $ cd credentialmain
410 $ cd credentialmain
411 $ echo "aaa" >> a
411 $ echo "aaa" >> a
412 $ hg add --large a
412 $ hg add --large a
413 $ hg commit -m "a"
413 $ hg commit -m "a"
414 Invoking status precommit hook
414 Invoking status precommit hook
415 A a
415 A a
416
416
417 Before running server clear the user cache to force clone to download
417 Before running server clear the user cache to force clone to download
418 a large file from the server rather than to get it from the cache
418 a large file from the server rather than to get it from the cache
419
419
420 $ rm "${USERCACHE}"/*
420 $ rm "${USERCACHE}"/*
421
421
422 $ cd ..
422 $ cd ..
423
423
424 $ hg serve --config extensions.x=$TESTDIR/httpserverauth.py -R credentialmain \
424 $ hg serve --config extensions.x=$TESTDIR/httpserverauth.py -R credentialmain \
425 > -d -p $HGPORT --pid-file hg.pid -A access.log
425 > -d -p $HGPORT --pid-file hg.pid -A access.log
426 $ cat hg.pid >> $DAEMON_PIDS
426 $ cat hg.pid >> $DAEMON_PIDS
427 $ cat << EOF > get_pass.py
427 $ cat << EOF > get_pass.py
428 > import getpass
428 > from mercurial import util
429 > def newgetpass(arg):
429 > def newgetpass():
430 > return "pass"
430 > return "pass"
431 > getpass.getpass = newgetpass
431 > util.get_password = newgetpass
432 > EOF
432 > EOF
433 $ hg clone --config ui.interactive=true --config extensions.getpass=get_pass.py \
433 $ hg clone --config ui.interactive=true --config extensions.getpass=get_pass.py \
434 > http://user@localhost:$HGPORT credentialclone
434 > http://user@localhost:$HGPORT credentialclone
435 http authorization required for http://localhost:$HGPORT/
435 http authorization required for http://localhost:$HGPORT/
436 realm: mercurial
436 realm: mercurial
437 user: user
437 user: user
438 password: requesting all changes
438 password: requesting all changes
439 adding changesets
439 adding changesets
440 adding manifests
440 adding manifests
441 adding file changes
441 adding file changes
442 added 1 changesets with 1 changes to 1 files
442 added 1 changesets with 1 changes to 1 files
443 new changesets 567253b0f523 (1 drafts)
443 new changesets 567253b0f523 (1 drafts)
444 updating to branch default
444 updating to branch default
445 getting changed largefiles
445 getting changed largefiles
446 1 largefiles updated, 0 removed
446 1 largefiles updated, 0 removed
447 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
447 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
448
448
449 $ killdaemons.py
449 $ killdaemons.py
450 $ rm hg.pid access.log
450 $ rm hg.pid access.log
451
451
452 #endif
452 #endif
General Comments 0
You need to be logged in to leave comments. Login now