Show More
@@ -1,889 +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 |
|
92 | |||
93 | Name with special characters |
|
93 | Name with special characters | |
94 |
|
94 | |||
95 | $ echo foo > store/CΓ©lesteVille_is_a_Capital_City |
|
95 | $ echo foo > store/CΓ©lesteVille_is_a_Capital_City | |
96 |
|
96 | |||
97 |
A |
|
97 | Add all that | |
98 |
|
98 | |||
99 | $ hg add . |
|
99 | $ hg add . | |
100 | adding 00changelog-ab349180a0405010.nd |
|
100 | adding 00changelog-ab349180a0405010.nd | |
101 | adding 00changelog.d |
|
101 | adding 00changelog.d | |
102 | adding 00changelog.i |
|
102 | adding 00changelog.i | |
103 | adding 00changelog.n |
|
103 | adding 00changelog.n | |
104 | adding 00manifest.d |
|
104 | adding 00manifest.d | |
105 | adding 00manifest.i |
|
105 | adding 00manifest.i | |
106 | adding data/foo.d |
|
106 | adding data/foo.d | |
107 | adding data/foo.i |
|
107 | adding data/foo.i | |
108 | adding data/foo.n |
|
108 | adding data/foo.n | |
109 | adding data/undo.babar |
|
109 | adding data/undo.babar | |
110 | adding data/undo.d |
|
110 | adding data/undo.d | |
111 | adding data/undo.foo.d |
|
111 | adding data/undo.foo.d | |
112 | adding data/undo.foo.i |
|
112 | adding data/undo.foo.i | |
113 | adding data/undo.foo.n |
|
113 | adding data/undo.foo.n | |
114 | adding data/undo.i |
|
114 | adding data/undo.i | |
115 | adding data/undo.n |
|
115 | adding data/undo.n | |
116 | adding data/undo.py |
|
116 | adding data/undo.py | |
117 | adding foo.d |
|
117 | adding foo.d | |
118 | adding foo.i |
|
118 | adding foo.i | |
119 | adding foo.n |
|
119 | adding foo.n | |
120 | adding meta/foo.d |
|
120 | adding meta/foo.d | |
121 | adding meta/foo.i |
|
121 | adding meta/foo.i | |
122 | adding meta/foo.n |
|
122 | adding meta/foo.n | |
123 | adding meta/undo.babar |
|
123 | adding meta/undo.babar | |
124 | adding meta/undo.d |
|
124 | adding meta/undo.d | |
125 | adding meta/undo.foo.d |
|
125 | adding meta/undo.foo.d | |
126 | adding meta/undo.foo.i |
|
126 | adding meta/undo.foo.i | |
127 | adding meta/undo.foo.n |
|
127 | adding meta/undo.foo.n | |
128 | adding meta/undo.i |
|
128 | adding meta/undo.i | |
129 | adding meta/undo.n |
|
129 | adding meta/undo.n | |
130 | adding meta/undo.py |
|
130 | adding meta/undo.py | |
131 | adding savanah/foo.d |
|
131 | adding savanah/foo.d | |
132 | adding savanah/foo.i |
|
132 | adding savanah/foo.i | |
133 | adding savanah/foo.n |
|
133 | adding savanah/foo.n | |
134 | adding savanah/undo.babar |
|
134 | adding savanah/undo.babar | |
135 | adding savanah/undo.d |
|
135 | adding savanah/undo.d | |
136 | adding savanah/undo.foo.d |
|
136 | adding savanah/undo.foo.d | |
137 | adding savanah/undo.foo.i |
|
137 | adding savanah/undo.foo.i | |
138 | adding savanah/undo.foo.n |
|
138 | adding savanah/undo.foo.n | |
139 | adding savanah/undo.i |
|
139 | adding savanah/undo.i | |
140 | adding savanah/undo.n |
|
140 | adding savanah/undo.n | |
141 | adding savanah/undo.py |
|
141 | adding savanah/undo.py | |
142 | adding store/C\xc3\xa9lesteVille_is_a_Capital_City (esc) |
|
142 | adding store/C\xc3\xa9lesteVille_is_a_Capital_City (esc) | |
143 | adding store/foo.d |
|
143 | adding store/foo.d | |
144 | adding store/foo.i |
|
144 | adding store/foo.i | |
145 | adding store/foo.n |
|
145 | adding store/foo.n | |
146 | adding store/undo.babar |
|
146 | adding store/undo.babar | |
147 | adding store/undo.d |
|
147 | adding store/undo.d | |
148 | adding store/undo.foo.d |
|
148 | adding store/undo.foo.d | |
149 | adding store/undo.foo.i |
|
149 | adding store/undo.foo.i | |
150 | adding store/undo.foo.n |
|
150 | adding store/undo.foo.n | |
151 | adding store/undo.i |
|
151 | adding store/undo.i | |
152 | adding store/undo.n |
|
152 | adding store/undo.n | |
153 | adding store/undo.py |
|
153 | adding store/undo.py | |
154 | adding undo.babar |
|
154 | adding undo.babar | |
155 | adding undo.d |
|
155 | adding undo.d | |
156 | adding undo.foo.d |
|
156 | adding undo.foo.d | |
157 | adding undo.foo.i |
|
157 | adding undo.foo.i | |
158 | adding undo.foo.n |
|
158 | adding undo.foo.n | |
159 | adding undo.i |
|
159 | adding undo.i | |
160 | adding undo.n |
|
160 | adding undo.n | |
161 | adding undo.py |
|
161 | adding undo.py | |
162 | $ hg ci -m 'add files with "tricky" name' |
|
162 | $ hg ci -m 'add files with "tricky" name' | |
163 | $ 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 | |
164 | $ cat hg.pid > $DAEMON_PIDS |
|
164 | $ cat hg.pid > $DAEMON_PIDS | |
165 | $ cd .. |
|
165 | $ cd .. | |
166 |
|
166 | |||
167 | Check local clone |
|
167 | Check local clone | |
168 | ================== |
|
168 | ================== | |
169 |
|
169 | |||
170 | The logic is close enough of uncompressed. |
|
170 | The logic is close enough of uncompressed. | |
171 | 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. | |
172 |
|
172 | |||
173 | $ hg clone server local-clone |
|
173 | $ hg clone server local-clone | |
174 | updating to branch default |
|
174 | updating to branch default | |
175 | 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
175 | 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
176 |
|
176 | |||
177 | Check uncompressed |
|
177 | Check uncompressed | |
178 | ================== |
|
178 | ================== | |
179 |
|
179 | |||
180 | Cannot stream clone when server.uncompressed is set |
|
180 | Cannot stream clone when server.uncompressed is set | |
181 |
|
181 | |||
182 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=stream_out' |
|
182 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=stream_out' | |
183 | 200 Script output follows |
|
183 | 200 Script output follows | |
184 |
|
184 | |||
185 | 1 |
|
185 | 1 | |
186 |
|
186 | |||
187 | #if stream-legacy |
|
187 | #if stream-legacy | |
188 | $ hg debugcapabilities http://localhost:$HGPORT |
|
188 | $ hg debugcapabilities http://localhost:$HGPORT | |
189 | Main capabilities: |
|
189 | Main capabilities: | |
190 | batch |
|
190 | batch | |
191 | branchmap |
|
191 | branchmap | |
192 | $USUAL_BUNDLE2_CAPS_SERVER$ |
|
192 | $USUAL_BUNDLE2_CAPS_SERVER$ | |
193 | changegroupsubset |
|
193 | changegroupsubset | |
194 | compression=$BUNDLE2_COMPRESSIONS$ |
|
194 | compression=$BUNDLE2_COMPRESSIONS$ | |
195 | getbundle |
|
195 | getbundle | |
196 | httpheader=1024 |
|
196 | httpheader=1024 | |
197 | httpmediatype=0.1rx,0.1tx,0.2tx |
|
197 | httpmediatype=0.1rx,0.1tx,0.2tx | |
198 | known |
|
198 | known | |
199 | lookup |
|
199 | lookup | |
200 | pushkey |
|
200 | pushkey | |
201 | unbundle=HG10GZ,HG10BZ,HG10UN |
|
201 | unbundle=HG10GZ,HG10BZ,HG10UN | |
202 | unbundlehash |
|
202 | unbundlehash | |
203 | Bundle2 capabilities: |
|
203 | Bundle2 capabilities: | |
204 | HG20 |
|
204 | HG20 | |
205 | bookmarks |
|
205 | bookmarks | |
206 | changegroup |
|
206 | changegroup | |
207 | 01 |
|
207 | 01 | |
208 | 02 |
|
208 | 02 | |
209 | checkheads |
|
209 | checkheads | |
210 | related |
|
210 | related | |
211 | digests |
|
211 | digests | |
212 | md5 |
|
212 | md5 | |
213 | sha1 |
|
213 | sha1 | |
214 | sha512 |
|
214 | sha512 | |
215 | error |
|
215 | error | |
216 | abort |
|
216 | abort | |
217 | unsupportedcontent |
|
217 | unsupportedcontent | |
218 | pushraced |
|
218 | pushraced | |
219 | pushkey |
|
219 | pushkey | |
220 | hgtagsfnodes |
|
220 | hgtagsfnodes | |
221 | listkeys |
|
221 | listkeys | |
222 | phases |
|
222 | phases | |
223 | heads |
|
223 | heads | |
224 | pushkey |
|
224 | pushkey | |
225 | remote-changegroup |
|
225 | remote-changegroup | |
226 | http |
|
226 | http | |
227 | https |
|
227 | https | |
228 |
|
228 | |||
229 | $ hg clone --stream -U http://localhost:$HGPORT server-disabled |
|
229 | $ hg clone --stream -U http://localhost:$HGPORT server-disabled | |
230 | warning: stream clone requested but server has them disabled |
|
230 | warning: stream clone requested but server has them disabled | |
231 | requesting all changes |
|
231 | requesting all changes | |
232 | adding changesets |
|
232 | adding changesets | |
233 | adding manifests |
|
233 | adding manifests | |
234 | adding file changes |
|
234 | adding file changes | |
235 | added 3 changesets with 1087 changes to 1087 files |
|
235 | added 3 changesets with 1087 changes to 1087 files | |
236 | new changesets 96ee1d7354c4:42e820400e84 |
|
236 | new changesets 96ee1d7354c4:42e820400e84 | |
237 |
|
237 | |||
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" |
|
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" | |
239 | 200 Script output follows |
|
239 | 200 Script output follows | |
240 | content-type: application/mercurial-0.2 |
|
240 | content-type: application/mercurial-0.2 | |
241 |
|
241 | |||
242 |
|
242 | |||
243 | $ f --size body --hexdump --bytes 100 |
|
243 | $ f --size body --hexdump --bytes 100 | |
244 | body: size=232 |
|
244 | body: size=232 | |
245 | 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.......| | |
246 | 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...| | |
247 | 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| | |
248 | 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| | |
249 | 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| | |
250 | 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| | |
251 | 0060: 69 73 20 66 |is f| |
|
251 | 0060: 69 73 20 66 |is f| | |
252 |
|
252 | |||
253 | #endif |
|
253 | #endif | |
254 | #if stream-bundle2 |
|
254 | #if stream-bundle2 | |
255 | $ hg debugcapabilities http://localhost:$HGPORT |
|
255 | $ hg debugcapabilities http://localhost:$HGPORT | |
256 | Main capabilities: |
|
256 | Main capabilities: | |
257 | batch |
|
257 | batch | |
258 | branchmap |
|
258 | branchmap | |
259 | $USUAL_BUNDLE2_CAPS_SERVER$ |
|
259 | $USUAL_BUNDLE2_CAPS_SERVER$ | |
260 | changegroupsubset |
|
260 | changegroupsubset | |
261 | compression=$BUNDLE2_COMPRESSIONS$ |
|
261 | compression=$BUNDLE2_COMPRESSIONS$ | |
262 | getbundle |
|
262 | getbundle | |
263 | httpheader=1024 |
|
263 | httpheader=1024 | |
264 | httpmediatype=0.1rx,0.1tx,0.2tx |
|
264 | httpmediatype=0.1rx,0.1tx,0.2tx | |
265 | known |
|
265 | known | |
266 | lookup |
|
266 | lookup | |
267 | pushkey |
|
267 | pushkey | |
268 | unbundle=HG10GZ,HG10BZ,HG10UN |
|
268 | unbundle=HG10GZ,HG10BZ,HG10UN | |
269 | unbundlehash |
|
269 | unbundlehash | |
270 | Bundle2 capabilities: |
|
270 | Bundle2 capabilities: | |
271 | HG20 |
|
271 | HG20 | |
272 | bookmarks |
|
272 | bookmarks | |
273 | changegroup |
|
273 | changegroup | |
274 | 01 |
|
274 | 01 | |
275 | 02 |
|
275 | 02 | |
276 | checkheads |
|
276 | checkheads | |
277 | related |
|
277 | related | |
278 | digests |
|
278 | digests | |
279 | md5 |
|
279 | md5 | |
280 | sha1 |
|
280 | sha1 | |
281 | sha512 |
|
281 | sha512 | |
282 | error |
|
282 | error | |
283 | abort |
|
283 | abort | |
284 | unsupportedcontent |
|
284 | unsupportedcontent | |
285 | pushraced |
|
285 | pushraced | |
286 | pushkey |
|
286 | pushkey | |
287 | hgtagsfnodes |
|
287 | hgtagsfnodes | |
288 | listkeys |
|
288 | listkeys | |
289 | phases |
|
289 | phases | |
290 | heads |
|
290 | heads | |
291 | pushkey |
|
291 | pushkey | |
292 | remote-changegroup |
|
292 | remote-changegroup | |
293 | http |
|
293 | http | |
294 | https |
|
294 | https | |
295 |
|
295 | |||
296 | $ hg clone --stream -U http://localhost:$HGPORT server-disabled |
|
296 | $ hg clone --stream -U http://localhost:$HGPORT server-disabled | |
297 | warning: stream clone requested but server has them disabled |
|
297 | warning: stream clone requested but server has them disabled | |
298 | requesting all changes |
|
298 | requesting all changes | |
299 | adding changesets |
|
299 | adding changesets | |
300 | adding manifests |
|
300 | adding manifests | |
301 | adding file changes |
|
301 | adding file changes | |
302 | added 3 changesets with 1087 changes to 1087 files |
|
302 | added 3 changesets with 1087 changes to 1087 files | |
303 | new changesets 96ee1d7354c4:42e820400e84 |
|
303 | new changesets 96ee1d7354c4:42e820400e84 | |
304 |
|
304 | |||
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" |
|
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" | |
306 | 200 Script output follows |
|
306 | 200 Script output follows | |
307 | content-type: application/mercurial-0.2 |
|
307 | content-type: application/mercurial-0.2 | |
308 |
|
308 | |||
309 |
|
309 | |||
310 | $ f --size body --hexdump --bytes 100 |
|
310 | $ f --size body --hexdump --bytes 100 | |
311 | body: size=232 |
|
311 | body: size=232 | |
312 | 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.......| | |
313 | 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...| | |
314 | 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| | |
315 | 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| | |
316 | 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| | |
317 | 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| | |
318 | 0060: 69 73 20 66 |is f| |
|
318 | 0060: 69 73 20 66 |is f| | |
319 |
|
319 | |||
320 | #endif |
|
320 | #endif | |
321 |
|
321 | |||
322 | $ killdaemons.py |
|
322 | $ killdaemons.py | |
323 | $ cd server |
|
323 | $ cd server | |
324 | $ 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 | |
325 | $ cat hg.pid > $DAEMON_PIDS |
|
325 | $ cat hg.pid > $DAEMON_PIDS | |
326 | $ cd .. |
|
326 | $ cd .. | |
327 |
|
327 | |||
328 | Basic clone |
|
328 | Basic clone | |
329 |
|
329 | |||
330 | #if stream-legacy |
|
330 | #if stream-legacy | |
331 | $ hg clone --stream -U http://localhost:$HGPORT clone1 |
|
331 | $ hg clone --stream -U http://localhost:$HGPORT clone1 | |
332 | streaming all changes |
|
332 | streaming all changes | |
333 | 1089 files to transfer, 101 KB of data (no-zstd !) |
|
333 | 1089 files to transfer, 101 KB of data (no-zstd !) | |
334 | transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !) |
|
334 | transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !) | |
335 | 1089 files to transfer, 98.5 KB of data (zstd !) |
|
335 | 1089 files to transfer, 98.5 KB of data (zstd !) | |
336 | transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) |
|
336 | transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) | |
337 | searching for changes |
|
337 | searching for changes | |
338 | no changes found |
|
338 | no changes found | |
339 | $ cat server/errors.txt |
|
339 | $ cat server/errors.txt | |
340 | #endif |
|
340 | #endif | |
341 | #if stream-bundle2 |
|
341 | #if stream-bundle2 | |
342 | $ hg clone --stream -U http://localhost:$HGPORT clone1 |
|
342 | $ hg clone --stream -U http://localhost:$HGPORT clone1 | |
343 | streaming all changes |
|
343 | streaming all changes | |
344 | 1092 files to transfer, 101 KB of data (no-zstd !) |
|
344 | 1092 files to transfer, 101 KB of data (no-zstd !) | |
345 | transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !) |
|
345 | transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !) | |
346 | 1092 files to transfer, 98.6 KB of data (zstd !) |
|
346 | 1092 files to transfer, 98.6 KB of data (zstd !) | |
347 | transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !) |
|
347 | transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !) | |
348 |
|
348 | |||
349 | $ ls -1 clone1/.hg/cache |
|
349 | $ ls -1 clone1/.hg/cache | |
350 | branch2-base |
|
350 | branch2-base | |
351 | branch2-immutable |
|
351 | branch2-immutable | |
352 | branch2-served |
|
352 | branch2-served | |
353 | branch2-served.hidden |
|
353 | branch2-served.hidden | |
354 | branch2-visible |
|
354 | branch2-visible | |
355 | branch2-visible-hidden |
|
355 | branch2-visible-hidden | |
356 | rbc-names-v1 |
|
356 | rbc-names-v1 | |
357 | rbc-revs-v1 |
|
357 | rbc-revs-v1 | |
358 | tags2 |
|
358 | tags2 | |
359 | tags2-served |
|
359 | tags2-served | |
360 | $ cat server/errors.txt |
|
360 | $ cat server/errors.txt | |
361 | #endif |
|
361 | #endif | |
362 |
|
362 | |||
363 | getbundle requests with stream=1 are uncompressed |
|
363 | getbundle requests with stream=1 are uncompressed | |
364 |
|
364 | |||
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" |
|
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" | |
366 | 200 Script output follows |
|
366 | 200 Script output follows | |
367 | content-type: application/mercurial-0.2 |
|
367 | content-type: application/mercurial-0.2 | |
368 |
|
368 | |||
369 |
|
369 | |||
370 | #if no-zstd no-rust |
|
370 | #if no-zstd no-rust | |
371 | $ f --size --hex --bytes 256 body |
|
371 | $ f --size --hex --bytes 256 body | |
372 | body: size=118737 |
|
372 | body: size=118737 | |
373 | 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.......| | |
374 | 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.......| | |
375 | 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| | |
376 | 0030: 33 38 33 34 66 69 6c 65 63 6f 75 6e 74 31 30 39 |3834filecount109| |
|
376 | 0030: 33 38 33 34 66 69 6c 65 63 6f 75 6e 74 31 30 39 |3834filecount109| | |
377 | 0040: 32 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |2requirementsdot| |
|
377 | 0040: 32 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |2requirementsdot| | |
378 | 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| | |
379 | 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%| | |
380 | 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| | |
381 | 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| | |
382 | 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| | |
383 | 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 |................| | |
384 | 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 |................| | |
385 | 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,| | |
386 | 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............| | |
387 | 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| | |
388 | 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| | |
389 | #endif |
|
389 | #endif | |
390 | #if zstd no-rust |
|
390 | #if zstd no-rust | |
391 | $ f --size --hex --bytes 256 body |
|
391 | $ f --size --hex --bytes 256 body | |
392 | body: size=115921 |
|
392 | body: size=115921 | |
393 | 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.......| | |
394 | 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.......| | |
395 | 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| | |
396 | 0030: 30 39 39 32 66 69 6c 65 63 6f 75 6e 74 31 30 39 |0992filecount109| |
|
396 | 0030: 30 39 39 32 66 69 6c 65 63 6f 75 6e 74 31 30 39 |0992filecount109| | |
397 | 0040: 32 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |2requirementsdot| |
|
397 | 0040: 32 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |2requirementsdot| | |
398 | 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| | |
399 | 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%| | |
400 | 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| | |
401 | 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| | |
402 | 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| | |
403 | 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| | |
404 | 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......| | |
405 | 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 |................| | |
406 | 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.| | |
407 | 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..| | |
408 | 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| | |
409 | #endif |
|
409 | #endif | |
410 | #if zstd rust no-dirstate-v2 |
|
410 | #if zstd rust no-dirstate-v2 | |
411 | $ f --size --hex --bytes 256 body |
|
411 | $ f --size --hex --bytes 256 body | |
412 | body: size=115942 |
|
412 | body: size=115942 | |
413 | 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.......| | |
414 | 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.......| | |
415 | 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| | |
416 | 0030: 30 39 39 32 66 69 6c 65 63 6f 75 6e 74 31 30 39 |0992filecount109| |
|
416 | 0030: 30 39 39 32 66 69 6c 65 63 6f 75 6e 74 31 30 39 |0992filecount109| | |
417 | 0040: 32 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |2requirementsdot| |
|
417 | 0040: 32 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |2requirementsdot| | |
418 | 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| | |
419 | 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%| | |
420 | 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| | |
421 | 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| | |
422 | 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| | |
423 | 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| | |
424 | 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| | |
425 | 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.| | |
426 | 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 |................| | |
427 | 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 |................| | |
428 | 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| | |
429 | #endif |
|
429 | #endif | |
430 | #if zstd dirstate-v2 |
|
430 | #if zstd dirstate-v2 | |
431 | $ f --size --hex --bytes 256 body |
|
431 | $ f --size --hex --bytes 256 body | |
432 | body: size=109549 |
|
432 | body: size=109549 | |
433 | 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.......| | |
434 | 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.......| | |
435 | 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| | |
436 | 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| | |
437 | 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| | |
438 | 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| | |
439 | 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| | |
440 | 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| | |
441 | 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| | |
442 | 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| | |
443 | 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%| | |
444 | 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| | |
445 | 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| | |
446 | 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| | |
447 | 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 |................| | |
448 | 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 |................| | |
449 | #endif |
|
449 | #endif | |
450 |
|
450 | |||
451 | --uncompressed is an alias to --stream |
|
451 | --uncompressed is an alias to --stream | |
452 |
|
452 | |||
453 | #if stream-legacy |
|
453 | #if stream-legacy | |
454 | $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed |
|
454 | $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed | |
455 | streaming all changes |
|
455 | streaming all changes | |
456 | 1089 files to transfer, 101 KB of data (no-zstd !) |
|
456 | 1089 files to transfer, 101 KB of data (no-zstd !) | |
457 | transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !) |
|
457 | transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !) | |
458 | 1089 files to transfer, 98.5 KB of data (zstd !) |
|
458 | 1089 files to transfer, 98.5 KB of data (zstd !) | |
459 | transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) |
|
459 | transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) | |
460 | searching for changes |
|
460 | searching for changes | |
461 | no changes found |
|
461 | no changes found | |
462 | #endif |
|
462 | #endif | |
463 | #if stream-bundle2 |
|
463 | #if stream-bundle2 | |
464 | $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed |
|
464 | $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed | |
465 | streaming all changes |
|
465 | streaming all changes | |
466 | 1092 files to transfer, 101 KB of data (no-zstd !) |
|
466 | 1092 files to transfer, 101 KB of data (no-zstd !) | |
467 | transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
467 | transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !) | |
468 | 1092 files to transfer, 98.6 KB of data (zstd !) |
|
468 | 1092 files to transfer, 98.6 KB of data (zstd !) | |
469 | transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !) |
|
469 | transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !) | |
470 | #endif |
|
470 | #endif | |
471 |
|
471 | |||
472 | Clone with background file closing enabled |
|
472 | Clone with background file closing enabled | |
473 |
|
473 | |||
474 | #if stream-legacy |
|
474 | #if stream-legacy | |
475 | $ 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 | |
476 | using http://localhost:$HGPORT/ |
|
476 | using http://localhost:$HGPORT/ | |
477 | sending capabilities command |
|
477 | sending capabilities command | |
478 | sending branchmap command |
|
478 | sending branchmap command | |
479 | streaming all changes |
|
479 | streaming all changes | |
480 | sending stream_out command |
|
480 | sending stream_out command | |
481 | 1089 files to transfer, 101 KB of data (no-zstd !) |
|
481 | 1089 files to transfer, 101 KB of data (no-zstd !) | |
482 | 1089 files to transfer, 98.5 KB of data (zstd !) |
|
482 | 1089 files to transfer, 98.5 KB of data (zstd !) | |
483 | starting 4 threads for background file closing |
|
483 | starting 4 threads for background file closing | |
484 | updating the branch cache |
|
484 | updating the branch cache | |
485 | transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !) |
|
485 | transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !) | |
486 | transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) |
|
486 | transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) | |
487 | query 1; heads |
|
487 | query 1; heads | |
488 | sending batch command |
|
488 | sending batch command | |
489 | searching for changes |
|
489 | searching for changes | |
490 | all remote heads known locally |
|
490 | all remote heads known locally | |
491 | no changes found |
|
491 | no changes found | |
492 | sending getbundle command |
|
492 | sending getbundle command | |
493 | bundle2-input-bundle: with-transaction |
|
493 | bundle2-input-bundle: with-transaction | |
494 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
494 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
495 | bundle2-input-part: "phase-heads" supported |
|
495 | bundle2-input-part: "phase-heads" supported | |
496 | bundle2-input-part: total payload size 24 |
|
496 | bundle2-input-part: total payload size 24 | |
497 | bundle2-input-bundle: 2 parts total |
|
497 | bundle2-input-bundle: 2 parts total | |
498 | checking for updated bookmarks |
|
498 | checking for updated bookmarks | |
499 | updating the branch cache |
|
499 | updating the branch cache | |
500 | (sent 5 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
500 | (sent 5 HTTP requests and * bytes; received * bytes in responses) (glob) | |
501 | #endif |
|
501 | #endif | |
502 | #if stream-bundle2 |
|
502 | #if stream-bundle2 | |
503 | $ 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 | |
504 | using http://localhost:$HGPORT/ |
|
504 | using http://localhost:$HGPORT/ | |
505 | sending capabilities command |
|
505 | sending capabilities command | |
506 | query 1; heads |
|
506 | query 1; heads | |
507 | sending batch command |
|
507 | sending batch command | |
508 | streaming all changes |
|
508 | streaming all changes | |
509 | sending getbundle command |
|
509 | sending getbundle command | |
510 | bundle2-input-bundle: with-transaction |
|
510 | bundle2-input-bundle: with-transaction | |
511 | bundle2-input-part: "stream2" (params: 3 mandatory) supported |
|
511 | bundle2-input-part: "stream2" (params: 3 mandatory) supported | |
512 | applying stream bundle |
|
512 | applying stream bundle | |
513 | 1092 files to transfer, 101 KB of data (no-zstd !) |
|
513 | 1092 files to transfer, 101 KB of data (no-zstd !) | |
514 | 1092 files to transfer, 98.6 KB of data (zstd !) |
|
514 | 1092 files to transfer, 98.6 KB of data (zstd !) | |
515 | starting 4 threads for background file closing |
|
515 | starting 4 threads for background file closing | |
516 | starting 4 threads for background file closing |
|
516 | starting 4 threads for background file closing | |
517 | updating the branch cache |
|
517 | updating the branch cache | |
518 | transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
518 | transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !) | |
519 | bundle2-input-part: total payload size 118568 (no-zstd !) |
|
519 | bundle2-input-part: total payload size 118568 (no-zstd !) | |
520 | transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !) |
|
520 | transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !) | |
521 | bundle2-input-part: total payload size 115726 (zstd !) |
|
521 | bundle2-input-part: total payload size 115726 (zstd !) | |
522 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported |
|
522 | bundle2-input-part: "listkeys" (params: 1 mandatory) supported | |
523 | bundle2-input-bundle: 2 parts total |
|
523 | bundle2-input-bundle: 2 parts total | |
524 | checking for updated bookmarks |
|
524 | checking for updated bookmarks | |
525 | updating the branch cache |
|
525 | updating the branch cache | |
526 | (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
526 | (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob) | |
527 | #endif |
|
527 | #endif | |
528 |
|
528 | |||
529 | Cannot stream clone when there are secret changesets |
|
529 | Cannot stream clone when there are secret changesets | |
530 |
|
530 | |||
531 | $ hg -R server phase --force --secret -r tip |
|
531 | $ hg -R server phase --force --secret -r tip | |
532 | $ hg clone --stream -U http://localhost:$HGPORT secret-denied |
|
532 | $ hg clone --stream -U http://localhost:$HGPORT secret-denied | |
533 | warning: stream clone requested but server has them disabled |
|
533 | warning: stream clone requested but server has them disabled | |
534 | requesting all changes |
|
534 | requesting all changes | |
535 | adding changesets |
|
535 | adding changesets | |
536 | adding manifests |
|
536 | adding manifests | |
537 | adding file changes |
|
537 | adding file changes | |
538 | added 2 changesets with 1025 changes to 1025 files |
|
538 | added 2 changesets with 1025 changes to 1025 files | |
539 | new changesets 96ee1d7354c4:c17445101a72 |
|
539 | new changesets 96ee1d7354c4:c17445101a72 | |
540 |
|
540 | |||
541 | $ killdaemons.py |
|
541 | $ killdaemons.py | |
542 |
|
542 | |||
543 | Streaming of secrets can be overridden by server config |
|
543 | Streaming of secrets can be overridden by server config | |
544 |
|
544 | |||
545 | $ cd server |
|
545 | $ cd server | |
546 | $ 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 | |
547 | $ cat hg.pid > $DAEMON_PIDS |
|
547 | $ cat hg.pid > $DAEMON_PIDS | |
548 | $ cd .. |
|
548 | $ cd .. | |
549 |
|
549 | |||
550 | #if stream-legacy |
|
550 | #if stream-legacy | |
551 | $ hg clone --stream -U http://localhost:$HGPORT secret-allowed |
|
551 | $ hg clone --stream -U http://localhost:$HGPORT secret-allowed | |
552 | streaming all changes |
|
552 | streaming all changes | |
553 | 1089 files to transfer, 101 KB of data (no-zstd !) |
|
553 | 1089 files to transfer, 101 KB of data (no-zstd !) | |
554 | transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !) |
|
554 | transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !) | |
555 | 1089 files to transfer, 98.5 KB of data (zstd !) |
|
555 | 1089 files to transfer, 98.5 KB of data (zstd !) | |
556 | transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) |
|
556 | transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) | |
557 | searching for changes |
|
557 | searching for changes | |
558 | no changes found |
|
558 | no changes found | |
559 | #endif |
|
559 | #endif | |
560 | #if stream-bundle2 |
|
560 | #if stream-bundle2 | |
561 | $ hg clone --stream -U http://localhost:$HGPORT secret-allowed |
|
561 | $ hg clone --stream -U http://localhost:$HGPORT secret-allowed | |
562 | streaming all changes |
|
562 | streaming all changes | |
563 | 1092 files to transfer, 101 KB of data (no-zstd !) |
|
563 | 1092 files to transfer, 101 KB of data (no-zstd !) | |
564 | transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
564 | transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !) | |
565 | 1092 files to transfer, 98.6 KB of data (zstd !) |
|
565 | 1092 files to transfer, 98.6 KB of data (zstd !) | |
566 | transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !) |
|
566 | transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !) | |
567 | #endif |
|
567 | #endif | |
568 |
|
568 | |||
569 | $ killdaemons.py |
|
569 | $ killdaemons.py | |
570 |
|
570 | |||
571 | Verify interaction between preferuncompressed and secret presence |
|
571 | Verify interaction between preferuncompressed and secret presence | |
572 |
|
572 | |||
573 | $ cd server |
|
573 | $ cd server | |
574 | $ 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 | |
575 | $ cat hg.pid > $DAEMON_PIDS |
|
575 | $ cat hg.pid > $DAEMON_PIDS | |
576 | $ cd .. |
|
576 | $ cd .. | |
577 |
|
577 | |||
578 | $ hg clone -U http://localhost:$HGPORT preferuncompressed-secret |
|
578 | $ hg clone -U http://localhost:$HGPORT preferuncompressed-secret | |
579 | requesting all changes |
|
579 | requesting all changes | |
580 | adding changesets |
|
580 | adding changesets | |
581 | adding manifests |
|
581 | adding manifests | |
582 | adding file changes |
|
582 | adding file changes | |
583 | added 2 changesets with 1025 changes to 1025 files |
|
583 | added 2 changesets with 1025 changes to 1025 files | |
584 | new changesets 96ee1d7354c4:c17445101a72 |
|
584 | new changesets 96ee1d7354c4:c17445101a72 | |
585 |
|
585 | |||
586 | $ killdaemons.py |
|
586 | $ killdaemons.py | |
587 |
|
587 | |||
588 | 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 | |
589 |
|
589 | |||
590 | $ cd server |
|
590 | $ cd server | |
591 | $ 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 | |
592 | $ cat hg.pid > $DAEMON_PIDS |
|
592 | $ cat hg.pid > $DAEMON_PIDS | |
593 | $ cd .. |
|
593 | $ cd .. | |
594 |
|
594 | |||
595 | $ hg clone --stream http://localhost:$HGPORT secret-full-disabled |
|
595 | $ hg clone --stream http://localhost:$HGPORT secret-full-disabled | |
596 | warning: stream clone requested but server has them disabled |
|
596 | warning: stream clone requested but server has them disabled | |
597 | requesting all changes |
|
597 | requesting all changes | |
598 | remote: abort: server has pull-based clones disabled |
|
598 | remote: abort: server has pull-based clones disabled | |
599 | abort: pull failed on remote |
|
599 | abort: pull failed on remote | |
600 | (remove --pull if specified or upgrade Mercurial) |
|
600 | (remove --pull if specified or upgrade Mercurial) | |
601 | [100] |
|
601 | [100] | |
602 |
|
602 | |||
603 | Local stream clone with secrets involved |
|
603 | Local stream clone with secrets involved | |
604 | (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, | |
605 | 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.) | |
606 |
|
606 | |||
607 | $ hg clone -U --stream server local-secret |
|
607 | $ hg clone -U --stream server local-secret | |
608 | warning: stream clone requested but server has them disabled |
|
608 | warning: stream clone requested but server has them disabled | |
609 | requesting all changes |
|
609 | requesting all changes | |
610 | adding changesets |
|
610 | adding changesets | |
611 | adding manifests |
|
611 | adding manifests | |
612 | adding file changes |
|
612 | adding file changes | |
613 | added 2 changesets with 1025 changes to 1025 files |
|
613 | added 2 changesets with 1025 changes to 1025 files | |
614 | new changesets 96ee1d7354c4:c17445101a72 |
|
614 | new changesets 96ee1d7354c4:c17445101a72 | |
615 |
|
615 | |||
616 | Stream clone while repo is changing: |
|
616 | Stream clone while repo is changing: | |
617 |
|
617 | |||
618 | $ mkdir changing |
|
618 | $ mkdir changing | |
619 | $ cd changing |
|
619 | $ cd changing | |
620 |
|
620 | |||
621 | 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 | |
622 | while cloning |
|
622 | while cloning | |
623 |
|
623 | |||
624 | $ cat > stream_steps.py <<EOF |
|
624 | $ cat > stream_steps.py <<EOF | |
625 | > import os |
|
625 | > import os | |
626 | > import sys |
|
626 | > import sys | |
627 | > from mercurial import ( |
|
627 | > from mercurial import ( | |
628 | > encoding, |
|
628 | > encoding, | |
629 | > extensions, |
|
629 | > extensions, | |
630 | > streamclone, |
|
630 | > streamclone, | |
631 | > testing, |
|
631 | > testing, | |
632 | > ) |
|
632 | > ) | |
633 | > 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'] | |
634 | > 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'] | |
635 | > |
|
635 | > | |
636 | > def _test_sync_point_walk_1(orig, repo): |
|
636 | > def _test_sync_point_walk_1(orig, repo): | |
637 | > testing.write_file(WALKED_FILE_1) |
|
637 | > testing.write_file(WALKED_FILE_1) | |
638 | > |
|
638 | > | |
639 | > def _test_sync_point_walk_2(orig, repo): |
|
639 | > def _test_sync_point_walk_2(orig, repo): | |
640 | > assert repo._currentlock(repo._lockref) is None |
|
640 | > assert repo._currentlock(repo._lockref) is None | |
641 | > testing.wait_file(WALKED_FILE_2) |
|
641 | > testing.wait_file(WALKED_FILE_2) | |
642 | > |
|
642 | > | |
643 | > extensions.wrapfunction( |
|
643 | > extensions.wrapfunction( | |
644 | > streamclone, |
|
644 | > streamclone, | |
645 | > '_test_sync_point_walk_1', |
|
645 | > '_test_sync_point_walk_1', | |
646 | > _test_sync_point_walk_1 |
|
646 | > _test_sync_point_walk_1 | |
647 | > ) |
|
647 | > ) | |
648 | > extensions.wrapfunction( |
|
648 | > extensions.wrapfunction( | |
649 | > streamclone, |
|
649 | > streamclone, | |
650 | > '_test_sync_point_walk_2', |
|
650 | > '_test_sync_point_walk_2', | |
651 | > _test_sync_point_walk_2 |
|
651 | > _test_sync_point_walk_2 | |
652 | > ) |
|
652 | > ) | |
653 | > EOF |
|
653 | > EOF | |
654 |
|
654 | |||
655 | 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 | |
656 |
|
656 | |||
657 | $ hg init repo |
|
657 | $ hg init repo | |
658 | $ touch repo/f1 |
|
658 | $ touch repo/f1 | |
659 | $ $TESTDIR/seq.py 50000 > repo/f2 |
|
659 | $ $TESTDIR/seq.py 50000 > repo/f2 | |
660 | $ hg -R repo ci -Aqm "0" |
|
660 | $ hg -R repo ci -Aqm "0" | |
661 | $ HG_TEST_STREAM_WALKED_FILE_1="$TESTTMP/sync_file_walked_1" |
|
661 | $ HG_TEST_STREAM_WALKED_FILE_1="$TESTTMP/sync_file_walked_1" | |
662 | $ export HG_TEST_STREAM_WALKED_FILE_1 |
|
662 | $ export HG_TEST_STREAM_WALKED_FILE_1 | |
663 | $ HG_TEST_STREAM_WALKED_FILE_2="$TESTTMP/sync_file_walked_2" |
|
663 | $ HG_TEST_STREAM_WALKED_FILE_2="$TESTTMP/sync_file_walked_2" | |
664 | $ export HG_TEST_STREAM_WALKED_FILE_2 |
|
664 | $ export HG_TEST_STREAM_WALKED_FILE_2 | |
665 | $ HG_TEST_STREAM_WALKED_FILE_3="$TESTTMP/sync_file_walked_3" |
|
665 | $ HG_TEST_STREAM_WALKED_FILE_3="$TESTTMP/sync_file_walked_3" | |
666 | $ export HG_TEST_STREAM_WALKED_FILE_3 |
|
666 | $ export HG_TEST_STREAM_WALKED_FILE_3 | |
667 | # $ cat << EOF >> $HGRCPATH |
|
667 | # $ cat << EOF >> $HGRCPATH | |
668 | # > [hooks] |
|
668 | # > [hooks] | |
669 | # > pre-clone=rm -f "$TESTTMP/sync_file_walked_*" |
|
669 | # > pre-clone=rm -f "$TESTTMP/sync_file_walked_*" | |
670 | # > EOF |
|
670 | # > EOF | |
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" |
|
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" | |
672 | $ cat hg.pid >> $DAEMON_PIDS |
|
672 | $ cat hg.pid >> $DAEMON_PIDS | |
673 |
|
673 | |||
674 | 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 | |
675 | actually serving file content |
|
675 | actually serving file content | |
676 |
|
676 | |||
677 | $ (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") & | |
678 | $ $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 | |
679 | $ echo >> repo/f1 |
|
679 | $ echo >> repo/f1 | |
680 | $ echo >> repo/f2 |
|
680 | $ echo >> repo/f2 | |
681 | $ hg -R repo ci -m "1" --config ui.timeout.warn=-1 |
|
681 | $ hg -R repo ci -m "1" --config ui.timeout.warn=-1 | |
682 | $ touch $HG_TEST_STREAM_WALKED_FILE_2 |
|
682 | $ touch $HG_TEST_STREAM_WALKED_FILE_2 | |
683 | $ $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 | |
684 | $ hg -R clone id |
|
684 | $ hg -R clone id | |
685 | 000000000000 |
|
685 | 000000000000 | |
686 | $ cat errors.log |
|
686 | $ cat errors.log | |
687 | $ cd .. |
|
687 | $ cd .. | |
688 |
|
688 | |||
689 | Stream repository with bookmarks |
|
689 | Stream repository with bookmarks | |
690 | -------------------------------- |
|
690 | -------------------------------- | |
691 |
|
691 | |||
692 | (revert introduction of secret changeset) |
|
692 | (revert introduction of secret changeset) | |
693 |
|
693 | |||
694 | $ hg -R server phase --draft 'secret()' |
|
694 | $ hg -R server phase --draft 'secret()' | |
695 |
|
695 | |||
696 | add a bookmark |
|
696 | add a bookmark | |
697 |
|
697 | |||
698 | $ hg -R server bookmark -r tip some-bookmark |
|
698 | $ hg -R server bookmark -r tip some-bookmark | |
699 |
|
699 | |||
700 | clone it |
|
700 | clone it | |
701 |
|
701 | |||
702 | #if stream-legacy |
|
702 | #if stream-legacy | |
703 | $ hg clone --stream http://localhost:$HGPORT with-bookmarks |
|
703 | $ hg clone --stream http://localhost:$HGPORT with-bookmarks | |
704 | streaming all changes |
|
704 | streaming all changes | |
705 | 1089 files to transfer, 101 KB of data (no-zstd !) |
|
705 | 1089 files to transfer, 101 KB of data (no-zstd !) | |
706 | transferred 101 KB in * seconds (*) (glob) (no-zstd !) |
|
706 | transferred 101 KB in * seconds (*) (glob) (no-zstd !) | |
707 | 1089 files to transfer, 98.5 KB of data (zstd !) |
|
707 | 1089 files to transfer, 98.5 KB of data (zstd !) | |
708 | transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) |
|
708 | transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) | |
709 | searching for changes |
|
709 | searching for changes | |
710 | no changes found |
|
710 | no changes found | |
711 | updating to branch default |
|
711 | updating to branch default | |
712 | 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
712 | 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
713 | #endif |
|
713 | #endif | |
714 | #if stream-bundle2 |
|
714 | #if stream-bundle2 | |
715 | $ hg clone --stream http://localhost:$HGPORT with-bookmarks |
|
715 | $ hg clone --stream http://localhost:$HGPORT with-bookmarks | |
716 | streaming all changes |
|
716 | streaming all changes | |
717 | 1095 files to transfer, 102 KB of data (no-zstd !) |
|
717 | 1095 files to transfer, 102 KB of data (no-zstd !) | |
718 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
718 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) | |
719 | 1095 files to transfer, 98.8 KB of data (zstd !) |
|
719 | 1095 files to transfer, 98.8 KB of data (zstd !) | |
720 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) |
|
720 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) | |
721 | updating to branch default |
|
721 | updating to branch default | |
722 | 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
722 | 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
723 | #endif |
|
723 | #endif | |
724 | $ hg verify -R with-bookmarks |
|
724 | $ hg verify -R with-bookmarks | |
725 | checking changesets |
|
725 | checking changesets | |
726 | checking manifests |
|
726 | checking manifests | |
727 | crosschecking files in changesets and manifests |
|
727 | crosschecking files in changesets and manifests | |
728 | checking files |
|
728 | checking files | |
729 | checked 3 changesets with 1087 changes to 1087 files |
|
729 | checked 3 changesets with 1087 changes to 1087 files | |
730 | $ hg -R with-bookmarks bookmarks |
|
730 | $ hg -R with-bookmarks bookmarks | |
731 | some-bookmark 2:42e820400e84 |
|
731 | some-bookmark 2:42e820400e84 | |
732 |
|
732 | |||
733 | Stream repository with phases |
|
733 | Stream repository with phases | |
734 | ----------------------------- |
|
734 | ----------------------------- | |
735 |
|
735 | |||
736 | Clone as publishing |
|
736 | Clone as publishing | |
737 |
|
737 | |||
738 | $ hg -R server phase -r 'all()' |
|
738 | $ hg -R server phase -r 'all()' | |
739 | 0: draft |
|
739 | 0: draft | |
740 | 1: draft |
|
740 | 1: draft | |
741 | 2: draft |
|
741 | 2: draft | |
742 |
|
742 | |||
743 | #if stream-legacy |
|
743 | #if stream-legacy | |
744 | $ hg clone --stream http://localhost:$HGPORT phase-publish |
|
744 | $ hg clone --stream http://localhost:$HGPORT phase-publish | |
745 | streaming all changes |
|
745 | streaming all changes | |
746 | 1089 files to transfer, 101 KB of data (no-zstd !) |
|
746 | 1089 files to transfer, 101 KB of data (no-zstd !) | |
747 | transferred 101 KB in * seconds (*) (glob) (no-zstd !) |
|
747 | transferred 101 KB in * seconds (*) (glob) (no-zstd !) | |
748 | 1089 files to transfer, 98.5 KB of data (zstd !) |
|
748 | 1089 files to transfer, 98.5 KB of data (zstd !) | |
749 | transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) |
|
749 | transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) | |
750 | searching for changes |
|
750 | searching for changes | |
751 | no changes found |
|
751 | no changes found | |
752 | updating to branch default |
|
752 | updating to branch default | |
753 | 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
753 | 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
754 | #endif |
|
754 | #endif | |
755 | #if stream-bundle2 |
|
755 | #if stream-bundle2 | |
756 | $ hg clone --stream http://localhost:$HGPORT phase-publish |
|
756 | $ hg clone --stream http://localhost:$HGPORT phase-publish | |
757 | streaming all changes |
|
757 | streaming all changes | |
758 | 1095 files to transfer, 102 KB of data (no-zstd !) |
|
758 | 1095 files to transfer, 102 KB of data (no-zstd !) | |
759 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
759 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) | |
760 | 1095 files to transfer, 98.8 KB of data (zstd !) |
|
760 | 1095 files to transfer, 98.8 KB of data (zstd !) | |
761 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) |
|
761 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) | |
762 | updating to branch default |
|
762 | updating to branch default | |
763 | 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
763 | 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
764 | #endif |
|
764 | #endif | |
765 | $ hg verify -R phase-publish |
|
765 | $ hg verify -R phase-publish | |
766 | checking changesets |
|
766 | checking changesets | |
767 | checking manifests |
|
767 | checking manifests | |
768 | crosschecking files in changesets and manifests |
|
768 | crosschecking files in changesets and manifests | |
769 | checking files |
|
769 | checking files | |
770 | checked 3 changesets with 1087 changes to 1087 files |
|
770 | checked 3 changesets with 1087 changes to 1087 files | |
771 | $ hg -R phase-publish phase -r 'all()' |
|
771 | $ hg -R phase-publish phase -r 'all()' | |
772 | 0: public |
|
772 | 0: public | |
773 | 1: public |
|
773 | 1: public | |
774 | 2: public |
|
774 | 2: public | |
775 |
|
775 | |||
776 | Clone as non publishing |
|
776 | Clone as non publishing | |
777 |
|
777 | |||
778 | $ cat << EOF >> server/.hg/hgrc |
|
778 | $ cat << EOF >> server/.hg/hgrc | |
779 | > [phases] |
|
779 | > [phases] | |
780 | > publish = False |
|
780 | > publish = False | |
781 | > EOF |
|
781 | > EOF | |
782 | $ killdaemons.py |
|
782 | $ killdaemons.py | |
783 | $ hg -R server serve -p $HGPORT -d --pid-file=hg.pid |
|
783 | $ hg -R server serve -p $HGPORT -d --pid-file=hg.pid | |
784 | $ cat hg.pid > $DAEMON_PIDS |
|
784 | $ cat hg.pid > $DAEMON_PIDS | |
785 |
|
785 | |||
786 | #if stream-legacy |
|
786 | #if stream-legacy | |
787 |
|
787 | |||
788 | 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 | |
789 | stream v1 unsuitable for non-publishing repository. |
|
789 | stream v1 unsuitable for non-publishing repository. | |
790 |
|
790 | |||
791 | $ hg clone --stream http://localhost:$HGPORT phase-no-publish |
|
791 | $ hg clone --stream http://localhost:$HGPORT phase-no-publish | |
792 | streaming all changes |
|
792 | streaming all changes | |
793 | 1089 files to transfer, 101 KB of data (no-zstd !) |
|
793 | 1089 files to transfer, 101 KB of data (no-zstd !) | |
794 | transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
794 | transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !) | |
795 | 1089 files to transfer, 98.5 KB of data (zstd !) |
|
795 | 1089 files to transfer, 98.5 KB of data (zstd !) | |
796 | transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) |
|
796 | transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !) | |
797 | searching for changes |
|
797 | searching for changes | |
798 | no changes found |
|
798 | no changes found | |
799 | updating to branch default |
|
799 | updating to branch default | |
800 | 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
800 | 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
801 | $ hg -R phase-no-publish phase -r 'all()' |
|
801 | $ hg -R phase-no-publish phase -r 'all()' | |
802 | 0: public |
|
802 | 0: public | |
803 | 1: public |
|
803 | 1: public | |
804 | 2: public |
|
804 | 2: public | |
805 | #endif |
|
805 | #endif | |
806 | #if stream-bundle2 |
|
806 | #if stream-bundle2 | |
807 | $ hg clone --stream http://localhost:$HGPORT phase-no-publish |
|
807 | $ hg clone --stream http://localhost:$HGPORT phase-no-publish | |
808 | streaming all changes |
|
808 | streaming all changes | |
809 | 1096 files to transfer, 102 KB of data (no-zstd !) |
|
809 | 1096 files to transfer, 102 KB of data (no-zstd !) | |
810 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
810 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) | |
811 | 1096 files to transfer, 98.8 KB of data (zstd !) |
|
811 | 1096 files to transfer, 98.8 KB of data (zstd !) | |
812 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) |
|
812 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) | |
813 | updating to branch default |
|
813 | updating to branch default | |
814 | 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
814 | 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
815 | $ hg -R phase-no-publish phase -r 'all()' |
|
815 | $ hg -R phase-no-publish phase -r 'all()' | |
816 | 0: draft |
|
816 | 0: draft | |
817 | 1: draft |
|
817 | 1: draft | |
818 | 2: draft |
|
818 | 2: draft | |
819 | #endif |
|
819 | #endif | |
820 | $ hg verify -R phase-no-publish |
|
820 | $ hg verify -R phase-no-publish | |
821 | checking changesets |
|
821 | checking changesets | |
822 | checking manifests |
|
822 | checking manifests | |
823 | crosschecking files in changesets and manifests |
|
823 | crosschecking files in changesets and manifests | |
824 | checking files |
|
824 | checking files | |
825 | checked 3 changesets with 1087 changes to 1087 files |
|
825 | checked 3 changesets with 1087 changes to 1087 files | |
826 |
|
826 | |||
827 | $ killdaemons.py |
|
827 | $ killdaemons.py | |
828 |
|
828 | |||
829 | #if stream-legacy |
|
829 | #if stream-legacy | |
830 |
|
830 | |||
831 | 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 | |
832 | no obsolescence markers exchange in stream v1. |
|
832 | no obsolescence markers exchange in stream v1. | |
833 |
|
833 | |||
834 | #endif |
|
834 | #endif | |
835 | #if stream-bundle2 |
|
835 | #if stream-bundle2 | |
836 |
|
836 | |||
837 | Stream repository with obsolescence |
|
837 | Stream repository with obsolescence | |
838 | ----------------------------------- |
|
838 | ----------------------------------- | |
839 |
|
839 | |||
840 | Clone non-publishing with obsolescence |
|
840 | Clone non-publishing with obsolescence | |
841 |
|
841 | |||
842 | $ cat >> $HGRCPATH << EOF |
|
842 | $ cat >> $HGRCPATH << EOF | |
843 | > [experimental] |
|
843 | > [experimental] | |
844 | > evolution=all |
|
844 | > evolution=all | |
845 | > EOF |
|
845 | > EOF | |
846 |
|
846 | |||
847 | $ cd server |
|
847 | $ cd server | |
848 | $ echo foo > foo |
|
848 | $ echo foo > foo | |
849 | $ hg -q commit -m 'about to be pruned' |
|
849 | $ hg -q commit -m 'about to be pruned' | |
850 | $ 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 | |
851 | 1 new obsolescence markers |
|
851 | 1 new obsolescence markers | |
852 | obsoleted 1 changesets |
|
852 | obsoleted 1 changesets | |
853 | $ hg up null -q |
|
853 | $ hg up null -q | |
854 | $ hg log -T '{rev}: {phase}\n' |
|
854 | $ hg log -T '{rev}: {phase}\n' | |
855 | 2: draft |
|
855 | 2: draft | |
856 | 1: draft |
|
856 | 1: draft | |
857 | 0: draft |
|
857 | 0: draft | |
858 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
858 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
859 | $ cat hg.pid > $DAEMON_PIDS |
|
859 | $ cat hg.pid > $DAEMON_PIDS | |
860 | $ cd .. |
|
860 | $ cd .. | |
861 |
|
861 | |||
862 | $ hg clone -U --stream http://localhost:$HGPORT with-obsolescence |
|
862 | $ hg clone -U --stream http://localhost:$HGPORT with-obsolescence | |
863 | streaming all changes |
|
863 | streaming all changes | |
864 | 1097 files to transfer, 102 KB of data (no-zstd !) |
|
864 | 1097 files to transfer, 102 KB of data (no-zstd !) | |
865 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
865 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) | |
866 | 1097 files to transfer, 99.2 KB of data (zstd !) |
|
866 | 1097 files to transfer, 99.2 KB of data (zstd !) | |
867 | transferred 99.2 KB in * seconds (* */sec) (glob) (zstd !) |
|
867 | transferred 99.2 KB in * seconds (* */sec) (glob) (zstd !) | |
868 | $ hg -R with-obsolescence log -T '{rev}: {phase}\n' |
|
868 | $ hg -R with-obsolescence log -T '{rev}: {phase}\n' | |
869 | 2: draft |
|
869 | 2: draft | |
870 | 1: draft |
|
870 | 1: draft | |
871 | 0: draft |
|
871 | 0: draft | |
872 | $ hg debugobsolete -R with-obsolescence |
|
872 | $ hg debugobsolete -R with-obsolescence | |
873 | e53e122156df12330d3a0b72351e3a84bfd14195 0 {42e820400e843bc479ad36068ff772a69c8affe9} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
873 | e53e122156df12330d3a0b72351e3a84bfd14195 0 {42e820400e843bc479ad36068ff772a69c8affe9} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
874 | $ hg verify -R with-obsolescence |
|
874 | $ hg verify -R with-obsolescence | |
875 | checking changesets |
|
875 | checking changesets | |
876 | checking manifests |
|
876 | checking manifests | |
877 | crosschecking files in changesets and manifests |
|
877 | crosschecking files in changesets and manifests | |
878 | checking files |
|
878 | checking files | |
879 | checked 4 changesets with 1088 changes to 1087 files |
|
879 | checked 4 changesets with 1088 changes to 1087 files | |
880 |
|
880 | |||
881 | $ 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 | |
882 | streaming all changes |
|
882 | streaming all changes | |
883 | 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 | |
884 | abort: pull failed on remote |
|
884 | abort: pull failed on remote | |
885 | [100] |
|
885 | [100] | |
886 |
|
886 | |||
887 | $ killdaemons.py |
|
887 | $ killdaemons.py | |
888 |
|
888 | |||
889 | #endif |
|
889 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now