##// END OF EJS Templates
clone: add a file with special character while testing uncompressed...
marmoute -
r48588:17211649 stable
parent child Browse files
Show More
@@ -1,881 +1,889 b''
1 #require serve no-reposimplestore no-chg
1 #require serve no-reposimplestore no-chg
2
2
3 #testcases stream-legacy stream-bundle2
3 #testcases stream-legacy stream-bundle2
4
4
5 #if stream-legacy
5 #if stream-legacy
6 $ cat << EOF >> $HGRCPATH
6 $ cat << EOF >> $HGRCPATH
7 > [server]
7 > [server]
8 > bundle2.stream = no
8 > bundle2.stream = no
9 > EOF
9 > EOF
10 #endif
10 #endif
11
11
12 Initialize repository
12 Initialize repository
13 the status call is to check for issue5130
13 the status call is to check for issue5130
14
14
15 $ hg init server
15 $ hg init server
16 $ cd server
16 $ cd server
17 $ touch foo
17 $ touch foo
18 $ hg -q commit -A -m initial
18 $ hg -q commit -A -m initial
19 >>> for i in range(1024):
19 >>> for i in range(1024):
20 ... with open(str(i), 'wb') as fh:
20 ... with open(str(i), 'wb') as fh:
21 ... fh.write(b"%d" % i) and None
21 ... fh.write(b"%d" % i) and None
22 $ hg -q commit -A -m 'add a lot of files'
22 $ hg -q commit -A -m 'add a lot of files'
23 $ hg st
23 $ hg st
24
24
25 add files with "tricky" name:
25 add files with "tricky" name:
26
26
27 $ echo foo > 00changelog.i
27 $ echo foo > 00changelog.i
28 $ echo foo > 00changelog.d
28 $ echo foo > 00changelog.d
29 $ echo foo > 00changelog.n
29 $ echo foo > 00changelog.n
30 $ echo foo > 00changelog-ab349180a0405010.nd
30 $ echo foo > 00changelog-ab349180a0405010.nd
31 $ echo foo > 00manifest.i
31 $ echo foo > 00manifest.i
32 $ echo foo > 00manifest.d
32 $ echo foo > 00manifest.d
33 $ echo foo > foo.i
33 $ echo foo > foo.i
34 $ echo foo > foo.d
34 $ echo foo > foo.d
35 $ echo foo > foo.n
35 $ echo foo > foo.n
36 $ echo foo > undo.py
36 $ echo foo > undo.py
37 $ echo foo > undo.i
37 $ echo foo > undo.i
38 $ echo foo > undo.d
38 $ echo foo > undo.d
39 $ echo foo > undo.n
39 $ echo foo > undo.n
40 $ echo foo > undo.foo.i
40 $ echo foo > undo.foo.i
41 $ echo foo > undo.foo.d
41 $ echo foo > undo.foo.d
42 $ echo foo > undo.foo.n
42 $ echo foo > undo.foo.n
43 $ echo foo > undo.babar
43 $ echo foo > undo.babar
44 $ mkdir savanah
44 $ mkdir savanah
45 $ echo foo > savanah/foo.i
45 $ echo foo > savanah/foo.i
46 $ echo foo > savanah/foo.d
46 $ echo foo > savanah/foo.d
47 $ echo foo > savanah/foo.n
47 $ echo foo > savanah/foo.n
48 $ echo foo > savanah/undo.py
48 $ echo foo > savanah/undo.py
49 $ echo foo > savanah/undo.i
49 $ echo foo > savanah/undo.i
50 $ echo foo > savanah/undo.d
50 $ echo foo > savanah/undo.d
51 $ echo foo > savanah/undo.n
51 $ echo foo > savanah/undo.n
52 $ echo foo > savanah/undo.foo.i
52 $ echo foo > savanah/undo.foo.i
53 $ echo foo > savanah/undo.foo.d
53 $ echo foo > savanah/undo.foo.d
54 $ echo foo > savanah/undo.foo.n
54 $ echo foo > savanah/undo.foo.n
55 $ echo foo > savanah/undo.babar
55 $ echo foo > savanah/undo.babar
56 $ mkdir data
56 $ mkdir data
57 $ echo foo > data/foo.i
57 $ echo foo > data/foo.i
58 $ echo foo > data/foo.d
58 $ echo foo > data/foo.d
59 $ echo foo > data/foo.n
59 $ echo foo > data/foo.n
60 $ echo foo > data/undo.py
60 $ echo foo > data/undo.py
61 $ echo foo > data/undo.i
61 $ echo foo > data/undo.i
62 $ echo foo > data/undo.d
62 $ echo foo > data/undo.d
63 $ echo foo > data/undo.n
63 $ echo foo > data/undo.n
64 $ echo foo > data/undo.foo.i
64 $ echo foo > data/undo.foo.i
65 $ echo foo > data/undo.foo.d
65 $ echo foo > data/undo.foo.d
66 $ echo foo > data/undo.foo.n
66 $ echo foo > data/undo.foo.n
67 $ echo foo > data/undo.babar
67 $ echo foo > data/undo.babar
68 $ mkdir meta
68 $ mkdir meta
69 $ echo foo > meta/foo.i
69 $ echo foo > meta/foo.i
70 $ echo foo > meta/foo.d
70 $ echo foo > meta/foo.d
71 $ echo foo > meta/foo.n
71 $ echo foo > meta/foo.n
72 $ echo foo > meta/undo.py
72 $ echo foo > meta/undo.py
73 $ echo foo > meta/undo.i
73 $ echo foo > meta/undo.i
74 $ echo foo > meta/undo.d
74 $ echo foo > meta/undo.d
75 $ echo foo > meta/undo.n
75 $ echo foo > meta/undo.n
76 $ echo foo > meta/undo.foo.i
76 $ echo foo > meta/undo.foo.i
77 $ echo foo > meta/undo.foo.d
77 $ echo foo > meta/undo.foo.d
78 $ echo foo > meta/undo.foo.n
78 $ echo foo > meta/undo.foo.n
79 $ echo foo > meta/undo.babar
79 $ echo foo > meta/undo.babar
80 $ mkdir store
80 $ mkdir store
81 $ echo foo > store/foo.i
81 $ echo foo > store/foo.i
82 $ echo foo > store/foo.d
82 $ echo foo > store/foo.d
83 $ echo foo > store/foo.n
83 $ echo foo > store/foo.n
84 $ echo foo > store/undo.py
84 $ echo foo > store/undo.py
85 $ echo foo > store/undo.i
85 $ echo foo > store/undo.i
86 $ echo foo > store/undo.d
86 $ echo foo > store/undo.d
87 $ echo foo > store/undo.n
87 $ echo foo > store/undo.n
88 $ echo foo > store/undo.foo.i
88 $ echo foo > store/undo.foo.i
89 $ echo foo > store/undo.foo.d
89 $ echo foo > store/undo.foo.d
90 $ echo foo > store/undo.foo.n
90 $ echo foo > store/undo.foo.n
91 $ echo foo > store/undo.babar
91 $ echo foo > store/undo.babar
92
93 Name with special characters
94
95 $ echo foo > store/CΓ©lesteVille_is_a_Capital_City
96
97 All all that
98
92 $ hg add .
99 $ hg add .
93 adding 00changelog-ab349180a0405010.nd
100 adding 00changelog-ab349180a0405010.nd
94 adding 00changelog.d
101 adding 00changelog.d
95 adding 00changelog.i
102 adding 00changelog.i
96 adding 00changelog.n
103 adding 00changelog.n
97 adding 00manifest.d
104 adding 00manifest.d
98 adding 00manifest.i
105 adding 00manifest.i
99 adding data/foo.d
106 adding data/foo.d
100 adding data/foo.i
107 adding data/foo.i
101 adding data/foo.n
108 adding data/foo.n
102 adding data/undo.babar
109 adding data/undo.babar
103 adding data/undo.d
110 adding data/undo.d
104 adding data/undo.foo.d
111 adding data/undo.foo.d
105 adding data/undo.foo.i
112 adding data/undo.foo.i
106 adding data/undo.foo.n
113 adding data/undo.foo.n
107 adding data/undo.i
114 adding data/undo.i
108 adding data/undo.n
115 adding data/undo.n
109 adding data/undo.py
116 adding data/undo.py
110 adding foo.d
117 adding foo.d
111 adding foo.i
118 adding foo.i
112 adding foo.n
119 adding foo.n
113 adding meta/foo.d
120 adding meta/foo.d
114 adding meta/foo.i
121 adding meta/foo.i
115 adding meta/foo.n
122 adding meta/foo.n
116 adding meta/undo.babar
123 adding meta/undo.babar
117 adding meta/undo.d
124 adding meta/undo.d
118 adding meta/undo.foo.d
125 adding meta/undo.foo.d
119 adding meta/undo.foo.i
126 adding meta/undo.foo.i
120 adding meta/undo.foo.n
127 adding meta/undo.foo.n
121 adding meta/undo.i
128 adding meta/undo.i
122 adding meta/undo.n
129 adding meta/undo.n
123 adding meta/undo.py
130 adding meta/undo.py
124 adding savanah/foo.d
131 adding savanah/foo.d
125 adding savanah/foo.i
132 adding savanah/foo.i
126 adding savanah/foo.n
133 adding savanah/foo.n
127 adding savanah/undo.babar
134 adding savanah/undo.babar
128 adding savanah/undo.d
135 adding savanah/undo.d
129 adding savanah/undo.foo.d
136 adding savanah/undo.foo.d
130 adding savanah/undo.foo.i
137 adding savanah/undo.foo.i
131 adding savanah/undo.foo.n
138 adding savanah/undo.foo.n
132 adding savanah/undo.i
139 adding savanah/undo.i
133 adding savanah/undo.n
140 adding savanah/undo.n
134 adding savanah/undo.py
141 adding savanah/undo.py
142 adding store/C\xc3\xa9lesteVille_is_a_Capital_City (esc)
135 adding store/foo.d
143 adding store/foo.d
136 adding store/foo.i
144 adding store/foo.i
137 adding store/foo.n
145 adding store/foo.n
138 adding store/undo.babar
146 adding store/undo.babar
139 adding store/undo.d
147 adding store/undo.d
140 adding store/undo.foo.d
148 adding store/undo.foo.d
141 adding store/undo.foo.i
149 adding store/undo.foo.i
142 adding store/undo.foo.n
150 adding store/undo.foo.n
143 adding store/undo.i
151 adding store/undo.i
144 adding store/undo.n
152 adding store/undo.n
145 adding store/undo.py
153 adding store/undo.py
146 adding undo.babar
154 adding undo.babar
147 adding undo.d
155 adding undo.d
148 adding undo.foo.d
156 adding undo.foo.d
149 adding undo.foo.i
157 adding undo.foo.i
150 adding undo.foo.n
158 adding undo.foo.n
151 adding undo.i
159 adding undo.i
152 adding undo.n
160 adding undo.n
153 adding undo.py
161 adding undo.py
154 $ hg ci -m 'add files with "tricky" name'
162 $ hg ci -m 'add files with "tricky" name'
155 $ hg --config server.uncompressed=false serve -p $HGPORT -d --pid-file=hg.pid
163 $ hg --config server.uncompressed=false serve -p $HGPORT -d --pid-file=hg.pid
156 $ cat hg.pid > $DAEMON_PIDS
164 $ cat hg.pid > $DAEMON_PIDS
157 $ cd ..
165 $ cd ..
158
166
159 Check local clone
167 Check local clone
160 ==================
168 ==================
161
169
162 The logic is close enough of uncompressed.
170 The logic is close enough of uncompressed.
163 This is present here to reuse the testing around file with "special" names.
171 This is present here to reuse the testing around file with "special" names.
164
172
165 $ hg clone server local-clone
173 $ hg clone server local-clone
166 updating to branch default
174 updating to branch default
167 1086 files updated, 0 files merged, 0 files removed, 0 files unresolved
175 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved
168
176
169 Check uncompressed
177 Check uncompressed
170 ==================
178 ==================
171
179
172 Cannot stream clone when server.uncompressed is set
180 Cannot stream clone when server.uncompressed is set
173
181
174 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=stream_out'
182 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=stream_out'
175 200 Script output follows
183 200 Script output follows
176
184
177 1
185 1
178
186
179 #if stream-legacy
187 #if stream-legacy
180 $ hg debugcapabilities http://localhost:$HGPORT
188 $ hg debugcapabilities http://localhost:$HGPORT
181 Main capabilities:
189 Main capabilities:
182 batch
190 batch
183 branchmap
191 branchmap
184 $USUAL_BUNDLE2_CAPS_SERVER$
192 $USUAL_BUNDLE2_CAPS_SERVER$
185 changegroupsubset
193 changegroupsubset
186 compression=$BUNDLE2_COMPRESSIONS$
194 compression=$BUNDLE2_COMPRESSIONS$
187 getbundle
195 getbundle
188 httpheader=1024
196 httpheader=1024
189 httpmediatype=0.1rx,0.1tx,0.2tx
197 httpmediatype=0.1rx,0.1tx,0.2tx
190 known
198 known
191 lookup
199 lookup
192 pushkey
200 pushkey
193 unbundle=HG10GZ,HG10BZ,HG10UN
201 unbundle=HG10GZ,HG10BZ,HG10UN
194 unbundlehash
202 unbundlehash
195 Bundle2 capabilities:
203 Bundle2 capabilities:
196 HG20
204 HG20
197 bookmarks
205 bookmarks
198 changegroup
206 changegroup
199 01
207 01
200 02
208 02
201 checkheads
209 checkheads
202 related
210 related
203 digests
211 digests
204 md5
212 md5
205 sha1
213 sha1
206 sha512
214 sha512
207 error
215 error
208 abort
216 abort
209 unsupportedcontent
217 unsupportedcontent
210 pushraced
218 pushraced
211 pushkey
219 pushkey
212 hgtagsfnodes
220 hgtagsfnodes
213 listkeys
221 listkeys
214 phases
222 phases
215 heads
223 heads
216 pushkey
224 pushkey
217 remote-changegroup
225 remote-changegroup
218 http
226 http
219 https
227 https
220
228
221 $ hg clone --stream -U http://localhost:$HGPORT server-disabled
229 $ hg clone --stream -U http://localhost:$HGPORT server-disabled
222 warning: stream clone requested but server has them disabled
230 warning: stream clone requested but server has them disabled
223 requesting all changes
231 requesting all changes
224 adding changesets
232 adding changesets
225 adding manifests
233 adding manifests
226 adding file changes
234 adding file changes
227 added 3 changesets with 1086 changes to 1086 files
235 added 3 changesets with 1087 changes to 1087 files
228 new changesets 96ee1d7354c4:7406a3463c3d
236 new changesets 96ee1d7354c4:42e820400e84
229
237
230 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle' content-type --bodyfile body --hgproto 0.2 --requestheader "x-hgarg-1=bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1"
238 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle' content-type --bodyfile body --hgproto 0.2 --requestheader "x-hgarg-1=bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1"
231 200 Script output follows
239 200 Script output follows
232 content-type: application/mercurial-0.2
240 content-type: application/mercurial-0.2
233
241
234
242
235 $ f --size body --hexdump --bytes 100
243 $ f --size body --hexdump --bytes 100
236 body: size=232
244 body: size=232
237 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
245 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
238 0010: cf 0b 45 52 52 4f 52 3a 41 42 4f 52 54 00 00 00 |..ERROR:ABORT...|
246 0010: cf 0b 45 52 52 4f 52 3a 41 42 4f 52 54 00 00 00 |..ERROR:ABORT...|
239 0020: 00 01 01 07 3c 04 72 6d 65 73 73 61 67 65 73 74 |....<.rmessagest|
247 0020: 00 01 01 07 3c 04 72 6d 65 73 73 61 67 65 73 74 |....<.rmessagest|
240 0030: 72 65 61 6d 20 64 61 74 61 20 72 65 71 75 65 73 |ream data reques|
248 0030: 72 65 61 6d 20 64 61 74 61 20 72 65 71 75 65 73 |ream data reques|
241 0040: 74 65 64 20 62 75 74 20 73 65 72 76 65 72 20 64 |ted but server d|
249 0040: 74 65 64 20 62 75 74 20 73 65 72 76 65 72 20 64 |ted but server d|
242 0050: 6f 65 73 20 6e 6f 74 20 61 6c 6c 6f 77 20 74 68 |oes not allow th|
250 0050: 6f 65 73 20 6e 6f 74 20 61 6c 6c 6f 77 20 74 68 |oes not allow th|
243 0060: 69 73 20 66 |is f|
251 0060: 69 73 20 66 |is f|
244
252
245 #endif
253 #endif
246 #if stream-bundle2
254 #if stream-bundle2
247 $ hg debugcapabilities http://localhost:$HGPORT
255 $ hg debugcapabilities http://localhost:$HGPORT
248 Main capabilities:
256 Main capabilities:
249 batch
257 batch
250 branchmap
258 branchmap
251 $USUAL_BUNDLE2_CAPS_SERVER$
259 $USUAL_BUNDLE2_CAPS_SERVER$
252 changegroupsubset
260 changegroupsubset
253 compression=$BUNDLE2_COMPRESSIONS$
261 compression=$BUNDLE2_COMPRESSIONS$
254 getbundle
262 getbundle
255 httpheader=1024
263 httpheader=1024
256 httpmediatype=0.1rx,0.1tx,0.2tx
264 httpmediatype=0.1rx,0.1tx,0.2tx
257 known
265 known
258 lookup
266 lookup
259 pushkey
267 pushkey
260 unbundle=HG10GZ,HG10BZ,HG10UN
268 unbundle=HG10GZ,HG10BZ,HG10UN
261 unbundlehash
269 unbundlehash
262 Bundle2 capabilities:
270 Bundle2 capabilities:
263 HG20
271 HG20
264 bookmarks
272 bookmarks
265 changegroup
273 changegroup
266 01
274 01
267 02
275 02
268 checkheads
276 checkheads
269 related
277 related
270 digests
278 digests
271 md5
279 md5
272 sha1
280 sha1
273 sha512
281 sha512
274 error
282 error
275 abort
283 abort
276 unsupportedcontent
284 unsupportedcontent
277 pushraced
285 pushraced
278 pushkey
286 pushkey
279 hgtagsfnodes
287 hgtagsfnodes
280 listkeys
288 listkeys
281 phases
289 phases
282 heads
290 heads
283 pushkey
291 pushkey
284 remote-changegroup
292 remote-changegroup
285 http
293 http
286 https
294 https
287
295
288 $ hg clone --stream -U http://localhost:$HGPORT server-disabled
296 $ hg clone --stream -U http://localhost:$HGPORT server-disabled
289 warning: stream clone requested but server has them disabled
297 warning: stream clone requested but server has them disabled
290 requesting all changes
298 requesting all changes
291 adding changesets
299 adding changesets
292 adding manifests
300 adding manifests
293 adding file changes
301 adding file changes
294 added 3 changesets with 1086 changes to 1086 files
302 added 3 changesets with 1087 changes to 1087 files
295 new changesets 96ee1d7354c4:7406a3463c3d
303 new changesets 96ee1d7354c4:42e820400e84
296
304
297 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle' content-type --bodyfile body --hgproto 0.2 --requestheader "x-hgarg-1=bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1"
305 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle' content-type --bodyfile body --hgproto 0.2 --requestheader "x-hgarg-1=bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1"
298 200 Script output follows
306 200 Script output follows
299 content-type: application/mercurial-0.2
307 content-type: application/mercurial-0.2
300
308
301
309
302 $ f --size body --hexdump --bytes 100
310 $ f --size body --hexdump --bytes 100
303 body: size=232
311 body: size=232
304 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
312 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
305 0010: cf 0b 45 52 52 4f 52 3a 41 42 4f 52 54 00 00 00 |..ERROR:ABORT...|
313 0010: cf 0b 45 52 52 4f 52 3a 41 42 4f 52 54 00 00 00 |..ERROR:ABORT...|
306 0020: 00 01 01 07 3c 04 72 6d 65 73 73 61 67 65 73 74 |....<.rmessagest|
314 0020: 00 01 01 07 3c 04 72 6d 65 73 73 61 67 65 73 74 |....<.rmessagest|
307 0030: 72 65 61 6d 20 64 61 74 61 20 72 65 71 75 65 73 |ream data reques|
315 0030: 72 65 61 6d 20 64 61 74 61 20 72 65 71 75 65 73 |ream data reques|
308 0040: 74 65 64 20 62 75 74 20 73 65 72 76 65 72 20 64 |ted but server d|
316 0040: 74 65 64 20 62 75 74 20 73 65 72 76 65 72 20 64 |ted but server d|
309 0050: 6f 65 73 20 6e 6f 74 20 61 6c 6c 6f 77 20 74 68 |oes not allow th|
317 0050: 6f 65 73 20 6e 6f 74 20 61 6c 6c 6f 77 20 74 68 |oes not allow th|
310 0060: 69 73 20 66 |is f|
318 0060: 69 73 20 66 |is f|
311
319
312 #endif
320 #endif
313
321
314 $ killdaemons.py
322 $ killdaemons.py
315 $ cd server
323 $ cd server
316 $ hg serve -p $HGPORT -d --pid-file=hg.pid --error errors.txt
324 $ hg serve -p $HGPORT -d --pid-file=hg.pid --error errors.txt
317 $ cat hg.pid > $DAEMON_PIDS
325 $ cat hg.pid > $DAEMON_PIDS
318 $ cd ..
326 $ cd ..
319
327
320 Basic clone
328 Basic clone
321
329
322 #if stream-legacy
330 #if stream-legacy
323 $ hg clone --stream -U http://localhost:$HGPORT clone1
331 $ hg clone --stream -U http://localhost:$HGPORT clone1
324 streaming all changes
332 streaming all changes
325 1088 files to transfer, 101 KB of data (no-zstd !)
333 1089 files to transfer, 101 KB of data (no-zstd !)
326 transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !)
334 transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !)
327 1088 files to transfer, 98.4 KB of data (zstd !)
335 1089 files to transfer, 98.5 KB of data (zstd !)
328 transferred 98.4 KB in * seconds (*/sec) (glob) (zstd !)
336 transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !)
329 searching for changes
337 searching for changes
330 no changes found
338 no changes found
331 $ cat server/errors.txt
339 $ cat server/errors.txt
332 #endif
340 #endif
333 #if stream-bundle2
341 #if stream-bundle2
334 $ hg clone --stream -U http://localhost:$HGPORT clone1
342 $ hg clone --stream -U http://localhost:$HGPORT clone1
335 streaming all changes
343 streaming all changes
336 1091 files to transfer, 101 KB of data (no-zstd !)
344 1092 files to transfer, 101 KB of data (no-zstd !)
337 transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !)
345 transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !)
338 1091 files to transfer, 98.5 KB of data (zstd !)
346 1092 files to transfer, 98.6 KB of data (zstd !)
339 transferred 98.5 KB in * seconds (* */sec) (glob) (zstd !)
347 transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !)
340
348
341 $ ls -1 clone1/.hg/cache
349 $ ls -1 clone1/.hg/cache
342 branch2-base
350 branch2-base
343 branch2-immutable
351 branch2-immutable
344 branch2-served
352 branch2-served
345 branch2-served.hidden
353 branch2-served.hidden
346 branch2-visible
354 branch2-visible
347 branch2-visible-hidden
355 branch2-visible-hidden
348 rbc-names-v1
356 rbc-names-v1
349 rbc-revs-v1
357 rbc-revs-v1
350 tags2
358 tags2
351 tags2-served
359 tags2-served
352 $ cat server/errors.txt
360 $ cat server/errors.txt
353 #endif
361 #endif
354
362
355 getbundle requests with stream=1 are uncompressed
363 getbundle requests with stream=1 are uncompressed
356
364
357 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle' content-type --bodyfile body --hgproto '0.1 0.2 comp=zlib,none' --requestheader "x-hgarg-1=bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1"
365 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=getbundle' content-type --bodyfile body --hgproto '0.1 0.2 comp=zlib,none' --requestheader "x-hgarg-1=bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1"
358 200 Script output follows
366 200 Script output follows
359 content-type: application/mercurial-0.2
367 content-type: application/mercurial-0.2
360
368
361
369
362 #if no-zstd no-rust
370 #if no-zstd no-rust
363 $ f --size --hex --bytes 256 body
371 $ f --size --hex --bytes 256 body
364 body: size=118551
372 body: size=118737
365 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
373 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
366 0010: 80 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
374 0010: 80 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
367 0020: 06 09 04 0c 44 62 79 74 65 63 6f 75 6e 74 31 30 |....Dbytecount10|
375 0020: 06 09 04 0c 44 62 79 74 65 63 6f 75 6e 74 31 30 |....Dbytecount10|
368 0030: 33 36 39 35 66 69 6c 65 63 6f 75 6e 74 31 30 39 |3695filecount109|
376 0030: 33 38 33 34 66 69 6c 65 63 6f 75 6e 74 31 30 39 |3834filecount109|
369 0040: 31 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |1requirementsdot|
377 0040: 32 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |2requirementsdot|
370 0050: 65 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 |encode%2Cfncache|
378 0050: 65 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 |encode%2Cfncache|
371 0060: 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 |%2Cgeneraldelta%|
379 0060: 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 |%2Cgeneraldelta%|
372 0070: 32 43 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 |2Crevlogv1%2Cspa|
380 0070: 32 43 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 |2Crevlogv1%2Cspa|
373 0080: 72 73 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 |rserevlog%2Cstor|
381 0080: 72 73 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 |rserevlog%2Cstor|
374 0090: 65 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 |e....s.Bdata/0.i|
382 0090: 65 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 |e....s.Bdata/0.i|
375 00a0: 00 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 |................|
383 00a0: 00 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 |................|
376 00b0: 00 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff |................|
384 00b0: 00 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff |................|
377 00c0: 80 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c |.)c.I.#....Vg.g,|
385 00c0: 80 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c |.)c.I.#....Vg.g,|
378 00d0: 69 d1 ec 39 00 00 00 00 00 00 00 00 00 00 00 00 |i..9............|
386 00d0: 69 d1 ec 39 00 00 00 00 00 00 00 00 00 00 00 00 |i..9............|
379 00e0: 75 30 73 26 45 64 61 74 61 2f 30 30 63 68 61 6e |u0s&Edata/00chan|
387 00e0: 75 30 73 26 45 64 61 74 61 2f 30 30 63 68 61 6e |u0s&Edata/00chan|
380 00f0: 67 65 6c 6f 67 2d 61 62 33 34 39 31 38 30 61 30 |gelog-ab349180a0|
388 00f0: 67 65 6c 6f 67 2d 61 62 33 34 39 31 38 30 61 30 |gelog-ab349180a0|
381 #endif
389 #endif
382 #if zstd no-rust
390 #if zstd no-rust
383 $ f --size --hex --bytes 256 body
391 $ f --size --hex --bytes 256 body
384 body: size=115738
392 body: size=115921
385 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
393 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
386 0010: 9a 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
394 0010: 9a 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
387 0020: 06 09 04 0c 5e 62 79 74 65 63 6f 75 6e 74 31 30 |....^bytecount10|
395 0020: 06 09 04 0c 5e 62 79 74 65 63 6f 75 6e 74 31 30 |....^bytecount10|
388 0030: 30 38 35 36 66 69 6c 65 63 6f 75 6e 74 31 30 39 |0856filecount109|
396 0030: 30 39 39 32 66 69 6c 65 63 6f 75 6e 74 31 30 39 |0992filecount109|
389 0040: 31 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |1requirementsdot|
397 0040: 32 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |2requirementsdot|
390 0050: 65 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 |encode%2Cfncache|
398 0050: 65 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 |encode%2Cfncache|
391 0060: 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 |%2Cgeneraldelta%|
399 0060: 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 |%2Cgeneraldelta%|
392 0070: 32 43 72 65 76 6c 6f 67 2d 63 6f 6d 70 72 65 73 |2Crevlog-compres|
400 0070: 32 43 72 65 76 6c 6f 67 2d 63 6f 6d 70 72 65 73 |2Crevlog-compres|
393 0080: 73 69 6f 6e 2d 7a 73 74 64 25 32 43 72 65 76 6c |sion-zstd%2Crevl|
401 0080: 73 69 6f 6e 2d 7a 73 74 64 25 32 43 72 65 76 6c |sion-zstd%2Crevl|
394 0090: 6f 67 76 31 25 32 43 73 70 61 72 73 65 72 65 76 |ogv1%2Csparserev|
402 0090: 6f 67 76 31 25 32 43 73 70 61 72 73 65 72 65 76 |ogv1%2Csparserev|
395 00a0: 6c 6f 67 25 32 43 73 74 6f 72 65 00 00 80 00 73 |log%2Cstore....s|
403 00a0: 6c 6f 67 25 32 43 73 74 6f 72 65 00 00 80 00 73 |log%2Cstore....s|
396 00b0: 08 42 64 61 74 61 2f 30 2e 69 00 03 00 01 00 00 |.Bdata/0.i......|
404 00b0: 08 42 64 61 74 61 2f 30 2e 69 00 03 00 01 00 00 |.Bdata/0.i......|
397 00c0: 00 00 00 00 00 02 00 00 00 01 00 00 00 00 00 00 |................|
405 00c0: 00 00 00 00 00 02 00 00 00 01 00 00 00 00 00 00 |................|
398 00d0: 00 01 ff ff ff ff ff ff ff ff 80 29 63 a0 49 d3 |...........)c.I.|
406 00d0: 00 01 ff ff ff ff ff ff ff ff 80 29 63 a0 49 d3 |...........)c.I.|
399 00e0: 23 87 bf ce fe 56 67 92 67 2c 69 d1 ec 39 00 00 |#....Vg.g,i..9..|
407 00e0: 23 87 bf ce fe 56 67 92 67 2c 69 d1 ec 39 00 00 |#....Vg.g,i..9..|
400 00f0: 00 00 00 00 00 00 00 00 00 00 75 30 73 26 45 64 |..........u0s&Ed|
408 00f0: 00 00 00 00 00 00 00 00 00 00 75 30 73 26 45 64 |..........u0s&Ed|
401 #endif
409 #endif
402 #if zstd rust no-dirstate-v2
410 #if zstd rust no-dirstate-v2
403 $ f --size --hex --bytes 256 body
411 $ f --size --hex --bytes 256 body
404 body: size=115759
412 body: size=115942
405 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
413 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
406 0010: af 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
414 0010: af 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
407 0020: 06 09 04 0c 73 62 79 74 65 63 6f 75 6e 74 31 30 |....sbytecount10|
415 0020: 06 09 04 0c 73 62 79 74 65 63 6f 75 6e 74 31 30 |....sbytecount10|
408 0030: 30 38 35 36 66 69 6c 65 63 6f 75 6e 74 31 30 39 |0856filecount109|
416 0030: 30 39 39 32 66 69 6c 65 63 6f 75 6e 74 31 30 39 |0992filecount109|
409 0040: 31 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |1requirementsdot|
417 0040: 32 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |2requirementsdot|
410 0050: 65 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 |encode%2Cfncache|
418 0050: 65 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 |encode%2Cfncache|
411 0060: 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 |%2Cgeneraldelta%|
419 0060: 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 |%2Cgeneraldelta%|
412 0070: 32 43 70 65 72 73 69 73 74 65 6e 74 2d 6e 6f 64 |2Cpersistent-nod|
420 0070: 32 43 70 65 72 73 69 73 74 65 6e 74 2d 6e 6f 64 |2Cpersistent-nod|
413 0080: 65 6d 61 70 25 32 43 72 65 76 6c 6f 67 2d 63 6f |emap%2Crevlog-co|
421 0080: 65 6d 61 70 25 32 43 72 65 76 6c 6f 67 2d 63 6f |emap%2Crevlog-co|
414 0090: 6d 70 72 65 73 73 69 6f 6e 2d 7a 73 74 64 25 32 |mpression-zstd%2|
422 0090: 6d 70 72 65 73 73 69 6f 6e 2d 7a 73 74 64 25 32 |mpression-zstd%2|
415 00a0: 43 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 72 |Crevlogv1%2Cspar|
423 00a0: 43 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 72 |Crevlogv1%2Cspar|
416 00b0: 73 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 65 |serevlog%2Cstore|
424 00b0: 73 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 65 |serevlog%2Cstore|
417 00c0: 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 00 |....s.Bdata/0.i.|
425 00c0: 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 00 |....s.Bdata/0.i.|
418 00d0: 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 00 |................|
426 00d0: 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 00 |................|
419 00e0: 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff 80 |................|
427 00e0: 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff 80 |................|
420 00f0: 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c 69 |)c.I.#....Vg.g,i|
428 00f0: 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c 69 |)c.I.#....Vg.g,i|
421 #endif
429 #endif
422 #if zstd dirstate-v2
430 #if zstd dirstate-v2
423 $ f --size --hex --bytes 256 body
431 $ f --size --hex --bytes 256 body
424 body: size=109449
432 body: size=109549
425 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
433 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
426 0010: c0 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
434 0010: c0 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
427 0020: 05 09 04 0c 85 62 79 74 65 63 6f 75 6e 74 39 35 |.....bytecount95|
435 0020: 05 09 04 0c 85 62 79 74 65 63 6f 75 6e 74 39 35 |.....bytecount95|
428 0030: 38 39 37 66 69 6c 65 63 6f 75 6e 74 31 30 33 30 |897filecount1030|
436 0030: 38 39 37 66 69 6c 65 63 6f 75 6e 74 31 30 33 30 |897filecount1030|
429 0040: 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 65 |requirementsdote|
437 0040: 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 65 |requirementsdote|
430 0050: 6e 63 6f 64 65 25 32 43 65 78 70 2d 64 69 72 73 |ncode%2Cexp-dirs|
438 0050: 6e 63 6f 64 65 25 32 43 65 78 70 2d 64 69 72 73 |ncode%2Cexp-dirs|
431 0060: 74 61 74 65 2d 76 32 25 32 43 66 6e 63 61 63 68 |tate-v2%2Cfncach|
439 0060: 74 61 74 65 2d 76 32 25 32 43 66 6e 63 61 63 68 |tate-v2%2Cfncach|
432 0070: 65 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 |e%2Cgeneraldelta|
440 0070: 65 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 |e%2Cgeneraldelta|
433 0080: 25 32 43 70 65 72 73 69 73 74 65 6e 74 2d 6e 6f |%2Cpersistent-no|
441 0080: 25 32 43 70 65 72 73 69 73 74 65 6e 74 2d 6e 6f |%2Cpersistent-no|
434 0090: 64 65 6d 61 70 25 32 43 72 65 76 6c 6f 67 2d 63 |demap%2Crevlog-c|
442 0090: 64 65 6d 61 70 25 32 43 72 65 76 6c 6f 67 2d 63 |demap%2Crevlog-c|
435 00a0: 6f 6d 70 72 65 73 73 69 6f 6e 2d 7a 73 74 64 25 |ompression-zstd%|
443 00a0: 6f 6d 70 72 65 73 73 69 6f 6e 2d 7a 73 74 64 25 |ompression-zstd%|
436 00b0: 32 43 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 |2Crevlogv1%2Cspa|
444 00b0: 32 43 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 |2Crevlogv1%2Cspa|
437 00c0: 72 73 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 |rserevlog%2Cstor|
445 00c0: 72 73 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 |rserevlog%2Cstor|
438 00d0: 65 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 |e....s.Bdata/0.i|
446 00d0: 65 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 |e....s.Bdata/0.i|
439 00e0: 00 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 |................|
447 00e0: 00 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 |................|
440 00f0: 00 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff |................|
448 00f0: 00 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff |................|
441 #endif
449 #endif
442
450
443 --uncompressed is an alias to --stream
451 --uncompressed is an alias to --stream
444
452
445 #if stream-legacy
453 #if stream-legacy
446 $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed
454 $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed
447 streaming all changes
455 streaming all changes
448 1088 files to transfer, 101 KB of data (no-zstd !)
456 1089 files to transfer, 101 KB of data (no-zstd !)
449 transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !)
457 transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !)
450 1088 files to transfer, 98.4 KB of data (zstd !)
458 1089 files to transfer, 98.5 KB of data (zstd !)
451 transferred 98.4 KB in * seconds (*/sec) (glob) (zstd !)
459 transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !)
452 searching for changes
460 searching for changes
453 no changes found
461 no changes found
454 #endif
462 #endif
455 #if stream-bundle2
463 #if stream-bundle2
456 $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed
464 $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed
457 streaming all changes
465 streaming all changes
458 1091 files to transfer, 101 KB of data (no-zstd !)
466 1092 files to transfer, 101 KB of data (no-zstd !)
459 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
467 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
460 1091 files to transfer, 98.5 KB of data (zstd !)
468 1092 files to transfer, 98.6 KB of data (zstd !)
461 transferred 98.5 KB in * seconds (* */sec) (glob) (zstd !)
469 transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !)
462 #endif
470 #endif
463
471
464 Clone with background file closing enabled
472 Clone with background file closing enabled
465
473
466 #if stream-legacy
474 #if stream-legacy
467 $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding
475 $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding
468 using http://localhost:$HGPORT/
476 using http://localhost:$HGPORT/
469 sending capabilities command
477 sending capabilities command
470 sending branchmap command
478 sending branchmap command
471 streaming all changes
479 streaming all changes
472 sending stream_out command
480 sending stream_out command
473 1088 files to transfer, 101 KB of data (no-zstd !)
481 1089 files to transfer, 101 KB of data (no-zstd !)
474 1088 files to transfer, 98.4 KB of data (zstd !)
482 1089 files to transfer, 98.5 KB of data (zstd !)
475 starting 4 threads for background file closing
483 starting 4 threads for background file closing
476 updating the branch cache
484 updating the branch cache
477 transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !)
485 transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !)
478 transferred 98.4 KB in * seconds (*/sec) (glob) (zstd !)
486 transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !)
479 query 1; heads
487 query 1; heads
480 sending batch command
488 sending batch command
481 searching for changes
489 searching for changes
482 all remote heads known locally
490 all remote heads known locally
483 no changes found
491 no changes found
484 sending getbundle command
492 sending getbundle command
485 bundle2-input-bundle: with-transaction
493 bundle2-input-bundle: with-transaction
486 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
494 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
487 bundle2-input-part: "phase-heads" supported
495 bundle2-input-part: "phase-heads" supported
488 bundle2-input-part: total payload size 24
496 bundle2-input-part: total payload size 24
489 bundle2-input-bundle: 2 parts total
497 bundle2-input-bundle: 2 parts total
490 checking for updated bookmarks
498 checking for updated bookmarks
491 updating the branch cache
499 updating the branch cache
492 (sent 5 HTTP requests and * bytes; received * bytes in responses) (glob)
500 (sent 5 HTTP requests and * bytes; received * bytes in responses) (glob)
493 #endif
501 #endif
494 #if stream-bundle2
502 #if stream-bundle2
495 $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding
503 $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding
496 using http://localhost:$HGPORT/
504 using http://localhost:$HGPORT/
497 sending capabilities command
505 sending capabilities command
498 query 1; heads
506 query 1; heads
499 sending batch command
507 sending batch command
500 streaming all changes
508 streaming all changes
501 sending getbundle command
509 sending getbundle command
502 bundle2-input-bundle: with-transaction
510 bundle2-input-bundle: with-transaction
503 bundle2-input-part: "stream2" (params: 3 mandatory) supported
511 bundle2-input-part: "stream2" (params: 3 mandatory) supported
504 applying stream bundle
512 applying stream bundle
505 1091 files to transfer, 101 KB of data (no-zstd !)
513 1092 files to transfer, 101 KB of data (no-zstd !)
506 1091 files to transfer, 98.5 KB of data (zstd !)
514 1092 files to transfer, 98.6 KB of data (zstd !)
507 starting 4 threads for background file closing
515 starting 4 threads for background file closing
508 starting 4 threads for background file closing
516 starting 4 threads for background file closing
509 updating the branch cache
517 updating the branch cache
510 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
518 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
511 bundle2-input-part: total payload size 118382 (no-zstd !)
519 bundle2-input-part: total payload size 118568 (no-zstd !)
512 transferred 98.5 KB in * seconds (* */sec) (glob) (zstd !)
520 transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !)
513 bundle2-input-part: total payload size 115543 (zstd !)
521 bundle2-input-part: total payload size 115726 (zstd !)
514 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
522 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
515 bundle2-input-bundle: 2 parts total
523 bundle2-input-bundle: 2 parts total
516 checking for updated bookmarks
524 checking for updated bookmarks
517 updating the branch cache
525 updating the branch cache
518 (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob)
526 (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob)
519 #endif
527 #endif
520
528
521 Cannot stream clone when there are secret changesets
529 Cannot stream clone when there are secret changesets
522
530
523 $ hg -R server phase --force --secret -r tip
531 $ hg -R server phase --force --secret -r tip
524 $ hg clone --stream -U http://localhost:$HGPORT secret-denied
532 $ hg clone --stream -U http://localhost:$HGPORT secret-denied
525 warning: stream clone requested but server has them disabled
533 warning: stream clone requested but server has them disabled
526 requesting all changes
534 requesting all changes
527 adding changesets
535 adding changesets
528 adding manifests
536 adding manifests
529 adding file changes
537 adding file changes
530 added 2 changesets with 1025 changes to 1025 files
538 added 2 changesets with 1025 changes to 1025 files
531 new changesets 96ee1d7354c4:c17445101a72
539 new changesets 96ee1d7354c4:c17445101a72
532
540
533 $ killdaemons.py
541 $ killdaemons.py
534
542
535 Streaming of secrets can be overridden by server config
543 Streaming of secrets can be overridden by server config
536
544
537 $ cd server
545 $ cd server
538 $ hg serve --config server.uncompressedallowsecret=true -p $HGPORT -d --pid-file=hg.pid
546 $ hg serve --config server.uncompressedallowsecret=true -p $HGPORT -d --pid-file=hg.pid
539 $ cat hg.pid > $DAEMON_PIDS
547 $ cat hg.pid > $DAEMON_PIDS
540 $ cd ..
548 $ cd ..
541
549
542 #if stream-legacy
550 #if stream-legacy
543 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
551 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
544 streaming all changes
552 streaming all changes
545 1088 files to transfer, 101 KB of data (no-zstd !)
553 1089 files to transfer, 101 KB of data (no-zstd !)
546 transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !)
554 transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !)
547 1088 files to transfer, 98.4 KB of data (zstd !)
555 1089 files to transfer, 98.5 KB of data (zstd !)
548 transferred 98.4 KB in * seconds (*/sec) (glob) (zstd !)
556 transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !)
549 searching for changes
557 searching for changes
550 no changes found
558 no changes found
551 #endif
559 #endif
552 #if stream-bundle2
560 #if stream-bundle2
553 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
561 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
554 streaming all changes
562 streaming all changes
555 1091 files to transfer, 101 KB of data (no-zstd !)
563 1092 files to transfer, 101 KB of data (no-zstd !)
556 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
564 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
557 1091 files to transfer, 98.5 KB of data (zstd !)
565 1092 files to transfer, 98.6 KB of data (zstd !)
558 transferred 98.5 KB in * seconds (* */sec) (glob) (zstd !)
566 transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !)
559 #endif
567 #endif
560
568
561 $ killdaemons.py
569 $ killdaemons.py
562
570
563 Verify interaction between preferuncompressed and secret presence
571 Verify interaction between preferuncompressed and secret presence
564
572
565 $ cd server
573 $ cd server
566 $ hg serve --config server.preferuncompressed=true -p $HGPORT -d --pid-file=hg.pid
574 $ hg serve --config server.preferuncompressed=true -p $HGPORT -d --pid-file=hg.pid
567 $ cat hg.pid > $DAEMON_PIDS
575 $ cat hg.pid > $DAEMON_PIDS
568 $ cd ..
576 $ cd ..
569
577
570 $ hg clone -U http://localhost:$HGPORT preferuncompressed-secret
578 $ hg clone -U http://localhost:$HGPORT preferuncompressed-secret
571 requesting all changes
579 requesting all changes
572 adding changesets
580 adding changesets
573 adding manifests
581 adding manifests
574 adding file changes
582 adding file changes
575 added 2 changesets with 1025 changes to 1025 files
583 added 2 changesets with 1025 changes to 1025 files
576 new changesets 96ee1d7354c4:c17445101a72
584 new changesets 96ee1d7354c4:c17445101a72
577
585
578 $ killdaemons.py
586 $ killdaemons.py
579
587
580 Clone not allowed when full bundles disabled and can't serve secrets
588 Clone not allowed when full bundles disabled and can't serve secrets
581
589
582 $ cd server
590 $ cd server
583 $ hg serve --config server.disablefullbundle=true -p $HGPORT -d --pid-file=hg.pid
591 $ hg serve --config server.disablefullbundle=true -p $HGPORT -d --pid-file=hg.pid
584 $ cat hg.pid > $DAEMON_PIDS
592 $ cat hg.pid > $DAEMON_PIDS
585 $ cd ..
593 $ cd ..
586
594
587 $ hg clone --stream http://localhost:$HGPORT secret-full-disabled
595 $ hg clone --stream http://localhost:$HGPORT secret-full-disabled
588 warning: stream clone requested but server has them disabled
596 warning: stream clone requested but server has them disabled
589 requesting all changes
597 requesting all changes
590 remote: abort: server has pull-based clones disabled
598 remote: abort: server has pull-based clones disabled
591 abort: pull failed on remote
599 abort: pull failed on remote
592 (remove --pull if specified or upgrade Mercurial)
600 (remove --pull if specified or upgrade Mercurial)
593 [100]
601 [100]
594
602
595 Local stream clone with secrets involved
603 Local stream clone with secrets involved
596 (This is just a test over behavior: if you have access to the repo's files,
604 (This is just a test over behavior: if you have access to the repo's files,
597 there is no security so it isn't important to prevent a clone here.)
605 there is no security so it isn't important to prevent a clone here.)
598
606
599 $ hg clone -U --stream server local-secret
607 $ hg clone -U --stream server local-secret
600 warning: stream clone requested but server has them disabled
608 warning: stream clone requested but server has them disabled
601 requesting all changes
609 requesting all changes
602 adding changesets
610 adding changesets
603 adding manifests
611 adding manifests
604 adding file changes
612 adding file changes
605 added 2 changesets with 1025 changes to 1025 files
613 added 2 changesets with 1025 changes to 1025 files
606 new changesets 96ee1d7354c4:c17445101a72
614 new changesets 96ee1d7354c4:c17445101a72
607
615
608 Stream clone while repo is changing:
616 Stream clone while repo is changing:
609
617
610 $ mkdir changing
618 $ mkdir changing
611 $ cd changing
619 $ cd changing
612
620
613 extension for delaying the server process so we reliably can modify the repo
621 extension for delaying the server process so we reliably can modify the repo
614 while cloning
622 while cloning
615
623
616 $ cat > stream_steps.py <<EOF
624 $ cat > stream_steps.py <<EOF
617 > import os
625 > import os
618 > import sys
626 > import sys
619 > from mercurial import (
627 > from mercurial import (
620 > encoding,
628 > encoding,
621 > extensions,
629 > extensions,
622 > streamclone,
630 > streamclone,
623 > testing,
631 > testing,
624 > )
632 > )
625 > WALKED_FILE_1 = encoding.environ[b'HG_TEST_STREAM_WALKED_FILE_1']
633 > WALKED_FILE_1 = encoding.environ[b'HG_TEST_STREAM_WALKED_FILE_1']
626 > WALKED_FILE_2 = encoding.environ[b'HG_TEST_STREAM_WALKED_FILE_2']
634 > WALKED_FILE_2 = encoding.environ[b'HG_TEST_STREAM_WALKED_FILE_2']
627 >
635 >
628 > def _test_sync_point_walk_1(orig, repo):
636 > def _test_sync_point_walk_1(orig, repo):
629 > testing.write_file(WALKED_FILE_1)
637 > testing.write_file(WALKED_FILE_1)
630 >
638 >
631 > def _test_sync_point_walk_2(orig, repo):
639 > def _test_sync_point_walk_2(orig, repo):
632 > assert repo._currentlock(repo._lockref) is None
640 > assert repo._currentlock(repo._lockref) is None
633 > testing.wait_file(WALKED_FILE_2)
641 > testing.wait_file(WALKED_FILE_2)
634 >
642 >
635 > extensions.wrapfunction(
643 > extensions.wrapfunction(
636 > streamclone,
644 > streamclone,
637 > '_test_sync_point_walk_1',
645 > '_test_sync_point_walk_1',
638 > _test_sync_point_walk_1
646 > _test_sync_point_walk_1
639 > )
647 > )
640 > extensions.wrapfunction(
648 > extensions.wrapfunction(
641 > streamclone,
649 > streamclone,
642 > '_test_sync_point_walk_2',
650 > '_test_sync_point_walk_2',
643 > _test_sync_point_walk_2
651 > _test_sync_point_walk_2
644 > )
652 > )
645 > EOF
653 > EOF
646
654
647 prepare repo with small and big file to cover both code paths in emitrevlogdata
655 prepare repo with small and big file to cover both code paths in emitrevlogdata
648
656
649 $ hg init repo
657 $ hg init repo
650 $ touch repo/f1
658 $ touch repo/f1
651 $ $TESTDIR/seq.py 50000 > repo/f2
659 $ $TESTDIR/seq.py 50000 > repo/f2
652 $ hg -R repo ci -Aqm "0"
660 $ hg -R repo ci -Aqm "0"
653 $ HG_TEST_STREAM_WALKED_FILE_1="$TESTTMP/sync_file_walked_1"
661 $ HG_TEST_STREAM_WALKED_FILE_1="$TESTTMP/sync_file_walked_1"
654 $ export HG_TEST_STREAM_WALKED_FILE_1
662 $ export HG_TEST_STREAM_WALKED_FILE_1
655 $ HG_TEST_STREAM_WALKED_FILE_2="$TESTTMP/sync_file_walked_2"
663 $ HG_TEST_STREAM_WALKED_FILE_2="$TESTTMP/sync_file_walked_2"
656 $ export HG_TEST_STREAM_WALKED_FILE_2
664 $ export HG_TEST_STREAM_WALKED_FILE_2
657 $ HG_TEST_STREAM_WALKED_FILE_3="$TESTTMP/sync_file_walked_3"
665 $ HG_TEST_STREAM_WALKED_FILE_3="$TESTTMP/sync_file_walked_3"
658 $ export HG_TEST_STREAM_WALKED_FILE_3
666 $ export HG_TEST_STREAM_WALKED_FILE_3
659 # $ cat << EOF >> $HGRCPATH
667 # $ cat << EOF >> $HGRCPATH
660 # > [hooks]
668 # > [hooks]
661 # > pre-clone=rm -f "$TESTTMP/sync_file_walked_*"
669 # > pre-clone=rm -f "$TESTTMP/sync_file_walked_*"
662 # > EOF
670 # > EOF
663 $ hg serve -R repo -p $HGPORT1 -d --error errors.log --pid-file=hg.pid --config extensions.stream_steps="$RUNTESTDIR/testlib/ext-stream-clone-steps.py"
671 $ hg serve -R repo -p $HGPORT1 -d --error errors.log --pid-file=hg.pid --config extensions.stream_steps="$RUNTESTDIR/testlib/ext-stream-clone-steps.py"
664 $ cat hg.pid >> $DAEMON_PIDS
672 $ cat hg.pid >> $DAEMON_PIDS
665
673
666 clone while modifying the repo between stating file with write lock and
674 clone while modifying the repo between stating file with write lock and
667 actually serving file content
675 actually serving file content
668
676
669 $ (hg clone -q --stream -U http://localhost:$HGPORT1 clone; touch "$HG_TEST_STREAM_WALKED_FILE_3") &
677 $ (hg clone -q --stream -U http://localhost:$HGPORT1 clone; touch "$HG_TEST_STREAM_WALKED_FILE_3") &
670 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1
678 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1
671 $ echo >> repo/f1
679 $ echo >> repo/f1
672 $ echo >> repo/f2
680 $ echo >> repo/f2
673 $ hg -R repo ci -m "1" --config ui.timeout.warn=-1
681 $ hg -R repo ci -m "1" --config ui.timeout.warn=-1
674 $ touch $HG_TEST_STREAM_WALKED_FILE_2
682 $ touch $HG_TEST_STREAM_WALKED_FILE_2
675 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3
683 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3
676 $ hg -R clone id
684 $ hg -R clone id
677 000000000000
685 000000000000
678 $ cat errors.log
686 $ cat errors.log
679 $ cd ..
687 $ cd ..
680
688
681 Stream repository with bookmarks
689 Stream repository with bookmarks
682 --------------------------------
690 --------------------------------
683
691
684 (revert introduction of secret changeset)
692 (revert introduction of secret changeset)
685
693
686 $ hg -R server phase --draft 'secret()'
694 $ hg -R server phase --draft 'secret()'
687
695
688 add a bookmark
696 add a bookmark
689
697
690 $ hg -R server bookmark -r tip some-bookmark
698 $ hg -R server bookmark -r tip some-bookmark
691
699
692 clone it
700 clone it
693
701
694 #if stream-legacy
702 #if stream-legacy
695 $ hg clone --stream http://localhost:$HGPORT with-bookmarks
703 $ hg clone --stream http://localhost:$HGPORT with-bookmarks
696 streaming all changes
704 streaming all changes
697 1088 files to transfer, 101 KB of data (no-zstd !)
705 1089 files to transfer, 101 KB of data (no-zstd !)
698 transferred 101 KB in * seconds (*) (glob) (no-zstd !)
706 transferred 101 KB in * seconds (*) (glob) (no-zstd !)
699 1088 files to transfer, 98.4 KB of data (zstd !)
707 1089 files to transfer, 98.5 KB of data (zstd !)
700 transferred 98.4 KB in * seconds (*/sec) (glob) (zstd !)
708 transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !)
701 searching for changes
709 searching for changes
702 no changes found
710 no changes found
703 updating to branch default
711 updating to branch default
704 1086 files updated, 0 files merged, 0 files removed, 0 files unresolved
712 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved
705 #endif
713 #endif
706 #if stream-bundle2
714 #if stream-bundle2
707 $ hg clone --stream http://localhost:$HGPORT with-bookmarks
715 $ hg clone --stream http://localhost:$HGPORT with-bookmarks
708 streaming all changes
716 streaming all changes
709 1094 files to transfer, 101 KB of data (no-zstd !)
717 1095 files to transfer, 102 KB of data (no-zstd !)
710 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
718 transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
711 1094 files to transfer, 98.7 KB of data (zstd !)
719 1095 files to transfer, 98.8 KB of data (zstd !)
712 transferred 98.7 KB in * seconds (* */sec) (glob) (zstd !)
720 transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !)
713 updating to branch default
721 updating to branch default
714 1086 files updated, 0 files merged, 0 files removed, 0 files unresolved
722 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved
715 #endif
723 #endif
716 $ hg verify -R with-bookmarks
724 $ hg verify -R with-bookmarks
717 checking changesets
725 checking changesets
718 checking manifests
726 checking manifests
719 crosschecking files in changesets and manifests
727 crosschecking files in changesets and manifests
720 checking files
728 checking files
721 checked 3 changesets with 1086 changes to 1086 files
729 checked 3 changesets with 1087 changes to 1087 files
722 $ hg -R with-bookmarks bookmarks
730 $ hg -R with-bookmarks bookmarks
723 some-bookmark 2:7406a3463c3d
731 some-bookmark 2:42e820400e84
724
732
725 Stream repository with phases
733 Stream repository with phases
726 -----------------------------
734 -----------------------------
727
735
728 Clone as publishing
736 Clone as publishing
729
737
730 $ hg -R server phase -r 'all()'
738 $ hg -R server phase -r 'all()'
731 0: draft
739 0: draft
732 1: draft
740 1: draft
733 2: draft
741 2: draft
734
742
735 #if stream-legacy
743 #if stream-legacy
736 $ hg clone --stream http://localhost:$HGPORT phase-publish
744 $ hg clone --stream http://localhost:$HGPORT phase-publish
737 streaming all changes
745 streaming all changes
738 1088 files to transfer, 101 KB of data (no-zstd !)
746 1089 files to transfer, 101 KB of data (no-zstd !)
739 transferred 101 KB in * seconds (*) (glob) (no-zstd !)
747 transferred 101 KB in * seconds (*) (glob) (no-zstd !)
740 1088 files to transfer, 98.4 KB of data (zstd !)
748 1089 files to transfer, 98.5 KB of data (zstd !)
741 transferred 98.4 KB in * seconds (*/sec) (glob) (zstd !)
749 transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !)
742 searching for changes
750 searching for changes
743 no changes found
751 no changes found
744 updating to branch default
752 updating to branch default
745 1086 files updated, 0 files merged, 0 files removed, 0 files unresolved
753 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved
746 #endif
754 #endif
747 #if stream-bundle2
755 #if stream-bundle2
748 $ hg clone --stream http://localhost:$HGPORT phase-publish
756 $ hg clone --stream http://localhost:$HGPORT phase-publish
749 streaming all changes
757 streaming all changes
750 1094 files to transfer, 101 KB of data (no-zstd !)
758 1095 files to transfer, 102 KB of data (no-zstd !)
751 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
759 transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
752 1094 files to transfer, 98.7 KB of data (zstd !)
760 1095 files to transfer, 98.8 KB of data (zstd !)
753 transferred 98.7 KB in * seconds (* */sec) (glob) (zstd !)
761 transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !)
754 updating to branch default
762 updating to branch default
755 1086 files updated, 0 files merged, 0 files removed, 0 files unresolved
763 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved
756 #endif
764 #endif
757 $ hg verify -R phase-publish
765 $ hg verify -R phase-publish
758 checking changesets
766 checking changesets
759 checking manifests
767 checking manifests
760 crosschecking files in changesets and manifests
768 crosschecking files in changesets and manifests
761 checking files
769 checking files
762 checked 3 changesets with 1086 changes to 1086 files
770 checked 3 changesets with 1087 changes to 1087 files
763 $ hg -R phase-publish phase -r 'all()'
771 $ hg -R phase-publish phase -r 'all()'
764 0: public
772 0: public
765 1: public
773 1: public
766 2: public
774 2: public
767
775
768 Clone as non publishing
776 Clone as non publishing
769
777
770 $ cat << EOF >> server/.hg/hgrc
778 $ cat << EOF >> server/.hg/hgrc
771 > [phases]
779 > [phases]
772 > publish = False
780 > publish = False
773 > EOF
781 > EOF
774 $ killdaemons.py
782 $ killdaemons.py
775 $ hg -R server serve -p $HGPORT -d --pid-file=hg.pid
783 $ hg -R server serve -p $HGPORT -d --pid-file=hg.pid
776 $ cat hg.pid > $DAEMON_PIDS
784 $ cat hg.pid > $DAEMON_PIDS
777
785
778 #if stream-legacy
786 #if stream-legacy
779
787
780 With v1 of the stream protocol, changeset are always cloned as public. It make
788 With v1 of the stream protocol, changeset are always cloned as public. It make
781 stream v1 unsuitable for non-publishing repository.
789 stream v1 unsuitable for non-publishing repository.
782
790
783 $ hg clone --stream http://localhost:$HGPORT phase-no-publish
791 $ hg clone --stream http://localhost:$HGPORT phase-no-publish
784 streaming all changes
792 streaming all changes
785 1088 files to transfer, 101 KB of data (no-zstd !)
793 1089 files to transfer, 101 KB of data (no-zstd !)
786 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
794 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
787 1088 files to transfer, 98.4 KB of data (zstd !)
795 1089 files to transfer, 98.5 KB of data (zstd !)
788 transferred 98.4 KB in * seconds (*/sec) (glob) (zstd !)
796 transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !)
789 searching for changes
797 searching for changes
790 no changes found
798 no changes found
791 updating to branch default
799 updating to branch default
792 1086 files updated, 0 files merged, 0 files removed, 0 files unresolved
800 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved
793 $ hg -R phase-no-publish phase -r 'all()'
801 $ hg -R phase-no-publish phase -r 'all()'
794 0: public
802 0: public
795 1: public
803 1: public
796 2: public
804 2: public
797 #endif
805 #endif
798 #if stream-bundle2
806 #if stream-bundle2
799 $ hg clone --stream http://localhost:$HGPORT phase-no-publish
807 $ hg clone --stream http://localhost:$HGPORT phase-no-publish
800 streaming all changes
808 streaming all changes
801 1095 files to transfer, 101 KB of data (no-zstd !)
809 1096 files to transfer, 102 KB of data (no-zstd !)
802 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
810 transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
803 1095 files to transfer, 98.7 KB of data (zstd !)
811 1096 files to transfer, 98.8 KB of data (zstd !)
804 transferred 98.7 KB in * seconds (* */sec) (glob) (zstd !)
812 transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !)
805 updating to branch default
813 updating to branch default
806 1086 files updated, 0 files merged, 0 files removed, 0 files unresolved
814 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved
807 $ hg -R phase-no-publish phase -r 'all()'
815 $ hg -R phase-no-publish phase -r 'all()'
808 0: draft
816 0: draft
809 1: draft
817 1: draft
810 2: draft
818 2: draft
811 #endif
819 #endif
812 $ hg verify -R phase-no-publish
820 $ hg verify -R phase-no-publish
813 checking changesets
821 checking changesets
814 checking manifests
822 checking manifests
815 crosschecking files in changesets and manifests
823 crosschecking files in changesets and manifests
816 checking files
824 checking files
817 checked 3 changesets with 1086 changes to 1086 files
825 checked 3 changesets with 1087 changes to 1087 files
818
826
819 $ killdaemons.py
827 $ killdaemons.py
820
828
821 #if stream-legacy
829 #if stream-legacy
822
830
823 With v1 of the stream protocol, changeset are always cloned as public. There's
831 With v1 of the stream protocol, changeset are always cloned as public. There's
824 no obsolescence markers exchange in stream v1.
832 no obsolescence markers exchange in stream v1.
825
833
826 #endif
834 #endif
827 #if stream-bundle2
835 #if stream-bundle2
828
836
829 Stream repository with obsolescence
837 Stream repository with obsolescence
830 -----------------------------------
838 -----------------------------------
831
839
832 Clone non-publishing with obsolescence
840 Clone non-publishing with obsolescence
833
841
834 $ cat >> $HGRCPATH << EOF
842 $ cat >> $HGRCPATH << EOF
835 > [experimental]
843 > [experimental]
836 > evolution=all
844 > evolution=all
837 > EOF
845 > EOF
838
846
839 $ cd server
847 $ cd server
840 $ echo foo > foo
848 $ echo foo > foo
841 $ hg -q commit -m 'about to be pruned'
849 $ hg -q commit -m 'about to be pruned'
842 $ hg debugobsolete `hg log -r . -T '{node}'` -d '0 0' -u test --record-parents
850 $ hg debugobsolete `hg log -r . -T '{node}'` -d '0 0' -u test --record-parents
843 1 new obsolescence markers
851 1 new obsolescence markers
844 obsoleted 1 changesets
852 obsoleted 1 changesets
845 $ hg up null -q
853 $ hg up null -q
846 $ hg log -T '{rev}: {phase}\n'
854 $ hg log -T '{rev}: {phase}\n'
847 2: draft
855 2: draft
848 1: draft
856 1: draft
849 0: draft
857 0: draft
850 $ hg serve -p $HGPORT -d --pid-file=hg.pid
858 $ hg serve -p $HGPORT -d --pid-file=hg.pid
851 $ cat hg.pid > $DAEMON_PIDS
859 $ cat hg.pid > $DAEMON_PIDS
852 $ cd ..
860 $ cd ..
853
861
854 $ hg clone -U --stream http://localhost:$HGPORT with-obsolescence
862 $ hg clone -U --stream http://localhost:$HGPORT with-obsolescence
855 streaming all changes
863 streaming all changes
856 1096 files to transfer, 102 KB of data (no-zstd !)
864 1097 files to transfer, 102 KB of data (no-zstd !)
857 transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
865 transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
858 1096 files to transfer, 99.1 KB of data (zstd !)
866 1097 files to transfer, 99.2 KB of data (zstd !)
859 transferred 99.1 KB in * seconds (* */sec) (glob) (zstd !)
867 transferred 99.2 KB in * seconds (* */sec) (glob) (zstd !)
860 $ hg -R with-obsolescence log -T '{rev}: {phase}\n'
868 $ hg -R with-obsolescence log -T '{rev}: {phase}\n'
861 2: draft
869 2: draft
862 1: draft
870 1: draft
863 0: draft
871 0: draft
864 $ hg debugobsolete -R with-obsolescence
872 $ hg debugobsolete -R with-obsolescence
865 aa82d3f59e13f41649d8ba3324e1ac8849ba78e7 0 {7406a3463c3de22c4288b4306d199705369a285a} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
873 e53e122156df12330d3a0b72351e3a84bfd14195 0 {42e820400e843bc479ad36068ff772a69c8affe9} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
866 $ hg verify -R with-obsolescence
874 $ hg verify -R with-obsolescence
867 checking changesets
875 checking changesets
868 checking manifests
876 checking manifests
869 crosschecking files in changesets and manifests
877 crosschecking files in changesets and manifests
870 checking files
878 checking files
871 checked 4 changesets with 1087 changes to 1086 files
879 checked 4 changesets with 1088 changes to 1087 files
872
880
873 $ hg clone -U --stream --config experimental.evolution=0 http://localhost:$HGPORT with-obsolescence-no-evolution
881 $ hg clone -U --stream --config experimental.evolution=0 http://localhost:$HGPORT with-obsolescence-no-evolution
874 streaming all changes
882 streaming all changes
875 remote: abort: server has obsolescence markers, but client cannot receive them via stream clone
883 remote: abort: server has obsolescence markers, but client cannot receive them via stream clone
876 abort: pull failed on remote
884 abort: pull failed on remote
877 [100]
885 [100]
878
886
879 $ killdaemons.py
887 $ killdaemons.py
880
888
881 #endif
889 #endif
General Comments 0
You need to be logged in to leave comments. Login now