Show More
@@ -1,686 +1,638 | |||||
1 | #require serve no-reposimplestore no-chg |
|
1 | #require serve no-reposimplestore no-chg | |
2 |
|
2 | |||
3 | #testcases stream-legacy stream-bundle2-v2 stream-bundle2-v3 |
|
3 | #testcases stream-legacy stream-bundle2-v2 stream-bundle2-v3 | |
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 | > [format] |
|
9 | > [format] | |
10 | > # persistent nodemap is too broken with legacy format, |
|
10 | > # persistent nodemap is too broken with legacy format, | |
11 | > # however client with nodemap support will have better stream support. |
|
11 | > # however client with nodemap support will have better stream support. | |
12 | > use-persistent-nodemap=no |
|
12 | > use-persistent-nodemap=no | |
13 | > EOF |
|
13 | > EOF | |
14 | #endif |
|
14 | #endif | |
15 | #if stream-bundle2-v3 |
|
15 | #if stream-bundle2-v3 | |
16 | $ cat << EOF >> $HGRCPATH |
|
16 | $ cat << EOF >> $HGRCPATH | |
17 | > [experimental] |
|
17 | > [experimental] | |
18 | > stream-v3 = yes |
|
18 | > stream-v3 = yes | |
19 | > EOF |
|
19 | > EOF | |
20 | #endif |
|
20 | #endif | |
21 |
|
21 | |||
22 | Initialize repository |
|
22 | Initialize repository | |
23 |
|
23 | |||
24 | $ hg init server |
|
24 | $ hg init server | |
25 | $ cd server |
|
25 | $ cd server | |
26 | $ sh $TESTDIR/testlib/stream_clone_setup.sh |
|
26 | $ sh $TESTDIR/testlib/stream_clone_setup.sh | |
27 | adding 00changelog-ab349180a0405010.nd |
|
27 | adding 00changelog-ab349180a0405010.nd | |
28 | adding 00changelog.d |
|
28 | adding 00changelog.d | |
29 | adding 00changelog.i |
|
29 | adding 00changelog.i | |
30 | adding 00changelog.n |
|
30 | adding 00changelog.n | |
31 | adding 00manifest.d |
|
31 | adding 00manifest.d | |
32 | adding 00manifest.i |
|
32 | adding 00manifest.i | |
33 | adding container/isam-build-centos7/bazel-coverage-generator-sandboxfs-compatibility-0758e3e4f6057904d44399bd666faba9e7f40686.patch |
|
33 | adding container/isam-build-centos7/bazel-coverage-generator-sandboxfs-compatibility-0758e3e4f6057904d44399bd666faba9e7f40686.patch | |
34 | adding data/foo.d |
|
34 | adding data/foo.d | |
35 | adding data/foo.i |
|
35 | adding data/foo.i | |
36 | adding data/foo.n |
|
36 | adding data/foo.n | |
37 | adding data/undo.babar |
|
37 | adding data/undo.babar | |
38 | adding data/undo.d |
|
38 | adding data/undo.d | |
39 | adding data/undo.foo.d |
|
39 | adding data/undo.foo.d | |
40 | adding data/undo.foo.i |
|
40 | adding data/undo.foo.i | |
41 | adding data/undo.foo.n |
|
41 | adding data/undo.foo.n | |
42 | adding data/undo.i |
|
42 | adding data/undo.i | |
43 | adding data/undo.n |
|
43 | adding data/undo.n | |
44 | adding data/undo.py |
|
44 | adding data/undo.py | |
45 | adding foo.d |
|
45 | adding foo.d | |
46 | adding foo.i |
|
46 | adding foo.i | |
47 | adding foo.n |
|
47 | adding foo.n | |
48 | adding meta/foo.d |
|
48 | adding meta/foo.d | |
49 | adding meta/foo.i |
|
49 | adding meta/foo.i | |
50 | adding meta/foo.n |
|
50 | adding meta/foo.n | |
51 | adding meta/undo.babar |
|
51 | adding meta/undo.babar | |
52 | adding meta/undo.d |
|
52 | adding meta/undo.d | |
53 | adding meta/undo.foo.d |
|
53 | adding meta/undo.foo.d | |
54 | adding meta/undo.foo.i |
|
54 | adding meta/undo.foo.i | |
55 | adding meta/undo.foo.n |
|
55 | adding meta/undo.foo.n | |
56 | adding meta/undo.i |
|
56 | adding meta/undo.i | |
57 | adding meta/undo.n |
|
57 | adding meta/undo.n | |
58 | adding meta/undo.py |
|
58 | adding meta/undo.py | |
59 | adding savanah/foo.d |
|
59 | adding savanah/foo.d | |
60 | adding savanah/foo.i |
|
60 | adding savanah/foo.i | |
61 | adding savanah/foo.n |
|
61 | adding savanah/foo.n | |
62 | adding savanah/undo.babar |
|
62 | adding savanah/undo.babar | |
63 | adding savanah/undo.d |
|
63 | adding savanah/undo.d | |
64 | adding savanah/undo.foo.d |
|
64 | adding savanah/undo.foo.d | |
65 | adding savanah/undo.foo.i |
|
65 | adding savanah/undo.foo.i | |
66 | adding savanah/undo.foo.n |
|
66 | adding savanah/undo.foo.n | |
67 | adding savanah/undo.i |
|
67 | adding savanah/undo.i | |
68 | adding savanah/undo.n |
|
68 | adding savanah/undo.n | |
69 | adding savanah/undo.py |
|
69 | adding savanah/undo.py | |
70 | adding store/C\xc3\xa9lesteVille_is_a_Capital_City (esc) |
|
70 | adding store/C\xc3\xa9lesteVille_is_a_Capital_City (esc) | |
71 | adding store/foo.d |
|
71 | adding store/foo.d | |
72 | adding store/foo.i |
|
72 | adding store/foo.i | |
73 | adding store/foo.n |
|
73 | adding store/foo.n | |
74 | adding store/undo.babar |
|
74 | adding store/undo.babar | |
75 | adding store/undo.d |
|
75 | adding store/undo.d | |
76 | adding store/undo.foo.d |
|
76 | adding store/undo.foo.d | |
77 | adding store/undo.foo.i |
|
77 | adding store/undo.foo.i | |
78 | adding store/undo.foo.n |
|
78 | adding store/undo.foo.n | |
79 | adding store/undo.i |
|
79 | adding store/undo.i | |
80 | adding store/undo.n |
|
80 | adding store/undo.n | |
81 | adding store/undo.py |
|
81 | adding store/undo.py | |
82 | adding undo.babar |
|
82 | adding undo.babar | |
83 | adding undo.d |
|
83 | adding undo.d | |
84 | adding undo.foo.d |
|
84 | adding undo.foo.d | |
85 | adding undo.foo.i |
|
85 | adding undo.foo.i | |
86 | adding undo.foo.n |
|
86 | adding undo.foo.n | |
87 | adding undo.i |
|
87 | adding undo.i | |
88 | adding undo.n |
|
88 | adding undo.n | |
89 | adding undo.py |
|
89 | adding undo.py | |
90 |
|
90 | |||
91 | $ hg --config server.uncompressed=false serve -p $HGPORT -d --pid-file=hg.pid |
|
91 | $ hg --config server.uncompressed=false serve -p $HGPORT -d --pid-file=hg.pid | |
92 | $ cat hg.pid > $DAEMON_PIDS |
|
92 | $ cat hg.pid > $DAEMON_PIDS | |
93 | $ cd .. |
|
93 | $ cd .. | |
94 |
|
94 | |||
95 | Check local clone |
|
95 | Check local clone | |
96 | ================== |
|
96 | ================== | |
97 |
|
97 | |||
98 | The logic is close enough of uncompressed. |
|
98 | The logic is close enough of uncompressed. | |
99 | This is present here to reuse the testing around file with "special" names. |
|
99 | This is present here to reuse the testing around file with "special" names. | |
100 |
|
100 | |||
101 | $ hg clone server local-clone |
|
101 | $ hg clone server local-clone | |
102 | updating to branch default |
|
102 | updating to branch default | |
103 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
103 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
104 |
|
104 | |||
105 | Check that the clone went well |
|
105 | Check that the clone went well | |
106 |
|
106 | |||
107 | $ hg verify -R local-clone -q |
|
107 | $ hg verify -R local-clone -q | |
108 |
|
108 | |||
109 | Check uncompressed |
|
109 | Check uncompressed | |
110 | ================== |
|
110 | ================== | |
111 |
|
111 | |||
112 | Cannot stream clone when server.uncompressed is set to false |
|
112 | Cannot stream clone when server.uncompressed is set to false | |
113 | ------------------------------------------------------------ |
|
113 | ------------------------------------------------------------ | |
114 |
|
114 | |||
115 | When `server.uncompressed` is disabled, the client should fallback to a bundle |
|
115 | When `server.uncompressed` is disabled, the client should fallback to a bundle | |
116 | based clone with a warning. |
|
116 | based clone with a warning. | |
117 |
|
117 | |||
118 |
|
118 | |||
119 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=stream_out' |
|
119 | $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=stream_out' | |
120 | 200 Script output follows |
|
120 | 200 Script output follows | |
121 |
|
121 | |||
122 | 1 |
|
122 | 1 | |
123 |
|
123 | |||
124 | $ hg debugcapabilities http://localhost:$HGPORT |
|
124 | $ hg debugcapabilities http://localhost:$HGPORT | |
125 | Main capabilities: |
|
125 | Main capabilities: | |
126 | batch |
|
126 | batch | |
127 | branchmap |
|
127 | branchmap | |
128 | $USUAL_BUNDLE2_CAPS_SERVER$ |
|
128 | $USUAL_BUNDLE2_CAPS_SERVER$ | |
129 | changegroupsubset |
|
129 | changegroupsubset | |
130 | compression=$BUNDLE2_COMPRESSIONS$ |
|
130 | compression=$BUNDLE2_COMPRESSIONS$ | |
131 | getbundle |
|
131 | getbundle | |
132 | httpheader=1024 |
|
132 | httpheader=1024 | |
133 | httpmediatype=0.1rx,0.1tx,0.2tx |
|
133 | httpmediatype=0.1rx,0.1tx,0.2tx | |
134 | known |
|
134 | known | |
135 | lookup |
|
135 | lookup | |
136 | pushkey |
|
136 | pushkey | |
137 | unbundle=HG10GZ,HG10BZ,HG10UN |
|
137 | unbundle=HG10GZ,HG10BZ,HG10UN | |
138 | unbundlehash |
|
138 | unbundlehash | |
139 | Bundle2 capabilities: |
|
139 | Bundle2 capabilities: | |
140 | HG20 |
|
140 | HG20 | |
141 | bookmarks |
|
141 | bookmarks | |
142 | changegroup |
|
142 | changegroup | |
143 | 01 |
|
143 | 01 | |
144 | 02 |
|
144 | 02 | |
145 | 03 |
|
145 | 03 | |
146 | checkheads |
|
146 | checkheads | |
147 | related |
|
147 | related | |
148 | digests |
|
148 | digests | |
149 | md5 |
|
149 | md5 | |
150 | sha1 |
|
150 | sha1 | |
151 | sha512 |
|
151 | sha512 | |
152 | error |
|
152 | error | |
153 | abort |
|
153 | abort | |
154 | unsupportedcontent |
|
154 | unsupportedcontent | |
155 | pushraced |
|
155 | pushraced | |
156 | pushkey |
|
156 | pushkey | |
157 | hgtagsfnodes |
|
157 | hgtagsfnodes | |
158 | listkeys |
|
158 | listkeys | |
159 | phases |
|
159 | phases | |
160 | heads |
|
160 | heads | |
161 | pushkey |
|
161 | pushkey | |
162 | remote-changegroup |
|
162 | remote-changegroup | |
163 | http |
|
163 | http | |
164 | https |
|
164 | https | |
165 |
|
165 | |||
166 | $ hg clone --stream -U http://localhost:$HGPORT server-disabled |
|
166 | $ hg clone --stream -U http://localhost:$HGPORT server-disabled | |
167 | warning: stream clone requested but server has them disabled |
|
167 | warning: stream clone requested but server has them disabled | |
168 | requesting all changes |
|
168 | requesting all changes | |
169 | adding changesets |
|
169 | adding changesets | |
170 | adding manifests |
|
170 | adding manifests | |
171 | adding file changes |
|
171 | adding file changes | |
172 | added 3 changesets with 1088 changes to 1088 files |
|
172 | added 3 changesets with 1088 changes to 1088 files | |
173 | new changesets 96ee1d7354c4:5223b5e3265f |
|
173 | new changesets 96ee1d7354c4:5223b5e3265f | |
174 |
|
174 | |||
175 | $ killdaemons.py |
|
175 | $ killdaemons.py | |
176 | $ cd server |
|
176 | $ cd server | |
177 | $ hg serve -p $HGPORT -d --pid-file=hg.pid --error errors.txt |
|
177 | $ hg serve -p $HGPORT -d --pid-file=hg.pid --error errors.txt | |
178 | $ cat hg.pid > $DAEMON_PIDS |
|
178 | $ cat hg.pid > $DAEMON_PIDS | |
179 | $ cd .. |
|
179 | $ cd .. | |
180 |
|
180 | |||
181 | Basic clone |
|
181 | Basic clone | |
182 | ----------- |
|
182 | ----------- | |
183 |
|
183 | |||
184 | Check that --stream trigger a stream clone and result in a valid repositoty |
|
184 | Check that --stream trigger a stream clone and result in a valid repositoty | |
185 |
|
185 | |||
186 | We check the associated output for exact bytes on file number as changes in |
|
186 | We check the associated output for exact bytes on file number as changes in | |
187 | these value implies changes in the data transfered and can detect unintended |
|
187 | these value implies changes in the data transfered and can detect unintended | |
188 | changes in the process. |
|
188 | changes in the process. | |
189 |
|
189 | |||
190 | #if stream-legacy |
|
190 | #if stream-legacy | |
191 | $ hg clone --stream -U http://localhost:$HGPORT clone1 |
|
191 | $ hg clone --stream -U http://localhost:$HGPORT clone1 | |
192 | streaming all changes |
|
192 | streaming all changes | |
193 | 1091 files to transfer, 102 KB of data (no-zstd !) |
|
193 | 1091 files to transfer, 102 KB of data (no-zstd !) | |
194 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
194 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) | |
195 | 1091 files to transfer, 98.8 KB of data (zstd !) |
|
195 | 1091 files to transfer, 98.8 KB of data (zstd !) | |
196 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) |
|
196 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) | |
197 | searching for changes |
|
197 | searching for changes | |
198 | no changes found |
|
198 | no changes found | |
199 | #endif |
|
199 | #endif | |
200 | #if stream-bundle2-v2 |
|
200 | #if stream-bundle2-v2 | |
201 | $ hg clone --stream -U http://localhost:$HGPORT clone1 |
|
201 | $ hg clone --stream -U http://localhost:$HGPORT clone1 | |
202 | streaming all changes |
|
202 | streaming all changes | |
203 | 1094 files to transfer, 102 KB of data (no-zstd !) |
|
203 | 1094 files to transfer, 102 KB of data (no-zstd !) | |
204 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
204 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) | |
205 | 1094 files to transfer, 98.9 KB of data (zstd no-rust !) |
|
205 | 1094 files to transfer, 98.9 KB of data (zstd no-rust !) | |
206 | transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
206 | transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !) | |
207 | 1096 files to transfer, 99.0 KB of data (zstd rust !) |
|
207 | 1096 files to transfer, 99.0 KB of data (zstd rust !) | |
208 | transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
208 | transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !) | |
209 | #endif |
|
209 | #endif | |
210 |
|
210 | |||
211 | #if stream-bundle2-v3 |
|
211 | #if stream-bundle2-v3 | |
212 | $ hg clone --stream -U http://localhost:$HGPORT clone1 |
|
212 | $ hg clone --stream -U http://localhost:$HGPORT clone1 | |
213 | streaming all changes |
|
213 | streaming all changes | |
214 | 1093 entries to transfer |
|
214 | 1093 entries to transfer | |
215 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
215 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) | |
216 | transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
216 | transferred 98.9 KB in * seconds (* */sec) (glob) (zstd no-rust !) | |
217 | transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
217 | transferred 99.0 KB in * seconds (* */sec) (glob) (zstd rust !) | |
218 | #endif |
|
218 | #endif | |
219 |
|
219 | |||
220 | #if no-stream-legacy |
|
220 | #if no-stream-legacy | |
221 | $ ls -1 clone1/.hg/cache |
|
221 | $ ls -1 clone1/.hg/cache | |
222 | branch2-base |
|
222 | branch2-base | |
223 | branch2-immutable |
|
223 | branch2-immutable | |
224 | branch2-served |
|
224 | branch2-served | |
225 | branch2-served.hidden |
|
225 | branch2-served.hidden | |
226 | branch2-visible |
|
226 | branch2-visible | |
227 | branch2-visible-hidden |
|
227 | branch2-visible-hidden | |
228 | rbc-names-v1 |
|
228 | rbc-names-v1 | |
229 | rbc-revs-v1 |
|
229 | rbc-revs-v1 | |
230 | tags2 |
|
230 | tags2 | |
231 | tags2-served |
|
231 | tags2-served | |
232 | #endif |
|
232 | #endif | |
233 |
|
233 | |||
234 | $ hg -R clone1 verify --quiet |
|
234 | $ hg -R clone1 verify --quiet | |
235 | $ cat server/errors.txt |
|
235 | $ cat server/errors.txt | |
236 |
|
236 | |||
237 | getbundle requests with stream=1 are uncompressed |
|
237 | getbundle requests with stream=1 are uncompressed | |
238 | ------------------------------------------------- |
|
238 | ------------------------------------------------- | |
239 |
|
239 | |||
240 | We check that `getbundle` will return a stream bundle when requested. |
|
240 | We check that `getbundle` will return a stream bundle when requested. | |
241 |
|
241 | |||
242 | XXX manually building the --requestheader is fragile and will drift away from actual usage |
|
242 | XXX manually building the --requestheader is fragile and will drift away from actual usage | |
243 |
|
243 | |||
244 | $ 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%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Astream%253Dv2&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1" |
|
244 | $ 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%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Astream%253Dv2&cg=0&common=0000000000000000000000000000000000000000&heads=c17445101a72edac06facd130d14808dfbd5c7c2&stream=1" | |
245 | 200 Script output follows |
|
245 | 200 Script output follows | |
246 | content-type: application/mercurial-0.2 |
|
246 | content-type: application/mercurial-0.2 | |
247 |
|
247 | |||
248 |
|
248 | |||
249 | $ f --size --hex --bytes 48 body |
|
249 | $ f --size --hex --bytes 48 body | |
250 | body: size=* (glob) |
|
250 | body: size=* (glob) | |
251 | 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......| |
|
251 | 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......| | |
252 | 0010: ?? 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |?.STREAM2.......| (glob) |
|
252 | 0010: ?? 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |?.STREAM2.......| (glob) | |
253 | 0020: 06 09 04 0c ?? 62 79 74 65 63 6f 75 6e 74 31 30 |....?bytecount10| (glob) |
|
253 | 0020: 06 09 04 0c ?? 62 79 74 65 63 6f 75 6e 74 31 30 |....?bytecount10| (glob) | |
254 |
|
254 | |||
255 | --uncompressed is an alias to --stream |
|
255 | --uncompressed is an alias to --stream | |
256 | --------------------------------------- |
|
256 | --------------------------------------- | |
257 |
|
257 | |||
258 | The alias flag should trigger a stream clone too. |
|
258 | The alias flag should trigger a stream clone too. | |
259 |
|
259 | |||
260 | $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed |
|
260 | $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed | |
261 | streaming all changes |
|
261 | streaming all changes | |
262 | * files to transfer* (glob) (no-stream-bundle2-v3 !) |
|
262 | * files to transfer* (glob) (no-stream-bundle2-v3 !) | |
263 | * entries to transfer (glob) (stream-bundle2-v3 !) |
|
263 | * entries to transfer (glob) (stream-bundle2-v3 !) | |
264 | transferred * KB in * seconds (* */sec) (glob) |
|
264 | transferred * KB in * seconds (* */sec) (glob) | |
265 | searching for changes (stream-legacy !) |
|
265 | searching for changes (stream-legacy !) | |
266 | no changes found (stream-legacy !) |
|
266 | no changes found (stream-legacy !) | |
267 |
|
267 | |||
268 | Clone with background file closing enabled |
|
268 | Clone with background file closing enabled | |
269 | ------------------------------------------- |
|
269 | ------------------------------------------- | |
270 |
|
270 | |||
271 | The backgound file closing logic should trigger when configured to do so, and |
|
271 | The backgound file closing logic should trigger when configured to do so, and | |
272 | the result should be a valid repository. |
|
272 | the result should be a valid repository. | |
273 |
|
273 | |||
274 | $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep "background file closing" |
|
274 | $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep "background file closing" | |
275 | starting 4 threads for background file closing |
|
275 | starting 4 threads for background file closing | |
276 | starting 4 threads for background file closing (no-stream-legacy !) |
|
276 | starting 4 threads for background file closing (no-stream-legacy !) | |
277 | $ hg verify -R clone-background --quiet |
|
277 | $ hg verify -R clone-background --quiet | |
278 |
|
278 | |||
279 | Cannot stream clone when there are secret changesets |
|
279 | Cannot stream clone when there are secret changesets | |
280 | ---------------------------------------------------- |
|
280 | ---------------------------------------------------- | |
281 |
|
281 | |||
282 | If secret changeset are present the should not be cloned (by default) and the |
|
282 | If secret changeset are present the should not be cloned (by default) and the | |
283 | clone falls back to a bundle clone. |
|
283 | clone falls back to a bundle clone. | |
284 |
|
284 | |||
285 | $ hg -R server phase --force --secret -r tip |
|
285 | $ hg -R server phase --force --secret -r tip | |
286 | $ hg clone --stream -U http://localhost:$HGPORT secret-denied |
|
286 | $ hg clone --stream -U http://localhost:$HGPORT secret-denied | |
287 | warning: stream clone requested but server has them disabled |
|
287 | warning: stream clone requested but server has them disabled | |
288 | requesting all changes |
|
288 | requesting all changes | |
289 | adding changesets |
|
289 | adding changesets | |
290 | adding manifests |
|
290 | adding manifests | |
291 | adding file changes |
|
291 | adding file changes | |
292 | added 2 changesets with 1025 changes to 1025 files |
|
292 | added 2 changesets with 1025 changes to 1025 files | |
293 | new changesets 96ee1d7354c4:c17445101a72 |
|
293 | new changesets 96ee1d7354c4:c17445101a72 | |
294 |
|
294 | |||
295 | $ killdaemons.py |
|
295 | $ killdaemons.py | |
296 |
|
296 | |||
297 | Streaming of secrets can be overridden by server config |
|
297 | Streaming of secrets can be overridden by server config | |
298 | ------------------------------------------------------- |
|
298 | ------------------------------------------------------- | |
299 |
|
299 | |||
300 | Secret changeset can still be streamed if the server is configured to do so. |
|
300 | Secret changeset can still be streamed if the server is configured to do so. | |
301 |
|
301 | |||
302 | $ cd server |
|
302 | $ cd server | |
303 | $ hg serve --config server.uncompressedallowsecret=true -p $HGPORT -d --pid-file=hg.pid |
|
303 | $ hg serve --config server.uncompressedallowsecret=true -p $HGPORT -d --pid-file=hg.pid | |
304 | $ cat hg.pid > $DAEMON_PIDS |
|
304 | $ cat hg.pid > $DAEMON_PIDS | |
305 | $ cd .. |
|
305 | $ cd .. | |
306 |
|
306 | |||
307 | $ hg clone --stream -U http://localhost:$HGPORT secret-allowed |
|
307 | $ hg clone --stream -U http://localhost:$HGPORT secret-allowed | |
308 | streaming all changes |
|
308 | streaming all changes | |
309 | * files to transfer* (glob) (no-stream-bundle2-v3 !) |
|
309 | * files to transfer* (glob) (no-stream-bundle2-v3 !) | |
310 | * entries to transfer (glob) (stream-bundle2-v3 !) |
|
310 | * entries to transfer (glob) (stream-bundle2-v3 !) | |
311 | transferred * KB in * seconds (* */sec) (glob) |
|
311 | transferred * KB in * seconds (* */sec) (glob) | |
312 | searching for changes (stream-legacy !) |
|
312 | searching for changes (stream-legacy !) | |
313 | no changes found (stream-legacy !) |
|
313 | no changes found (stream-legacy !) | |
314 |
|
314 | |||
315 | $ killdaemons.py |
|
315 | $ killdaemons.py | |
316 |
|
316 | |||
317 | Verify interaction between preferuncompressed and secret presence |
|
317 | Verify interaction between preferuncompressed and secret presence | |
318 | ----------------------------------------------------------------- |
|
318 | ----------------------------------------------------------------- | |
319 |
|
319 | |||
320 | Secret presence will still make the clone falls back to a normal bundle even if |
|
320 | Secret presence will still make the clone falls back to a normal bundle even if | |
321 | the server prefers stream clone. |
|
321 | the server prefers stream clone. | |
322 |
|
322 | |||
323 | $ cd server |
|
323 | $ cd server | |
324 | $ hg serve --config server.preferuncompressed=true -p $HGPORT -d --pid-file=hg.pid |
|
324 | $ hg serve --config server.preferuncompressed=true -p $HGPORT -d --pid-file=hg.pid | |
325 | $ cat hg.pid > $DAEMON_PIDS |
|
325 | $ cat hg.pid > $DAEMON_PIDS | |
326 | $ cd .. |
|
326 | $ cd .. | |
327 |
|
327 | |||
328 | $ hg clone -U http://localhost:$HGPORT preferuncompressed-secret |
|
328 | $ hg clone -U http://localhost:$HGPORT preferuncompressed-secret | |
329 | requesting all changes |
|
329 | requesting all changes | |
330 | adding changesets |
|
330 | adding changesets | |
331 | adding manifests |
|
331 | adding manifests | |
332 | adding file changes |
|
332 | adding file changes | |
333 | added 2 changesets with 1025 changes to 1025 files |
|
333 | added 2 changesets with 1025 changes to 1025 files | |
334 | new changesets 96ee1d7354c4:c17445101a72 |
|
334 | new changesets 96ee1d7354c4:c17445101a72 | |
335 |
|
335 | |||
336 | $ killdaemons.py |
|
336 | $ killdaemons.py | |
337 |
|
337 | |||
338 | Clone not allowed when full bundles disabled and can't serve secrets |
|
338 | Clone not allowed when full bundles disabled and can't serve secrets | |
339 | -------------------------------------------------------------------- |
|
339 | -------------------------------------------------------------------- | |
340 |
|
340 | |||
341 | The clone should fail as no valid option is found. |
|
341 | The clone should fail as no valid option is found. | |
342 |
|
342 | |||
343 | $ cd server |
|
343 | $ cd server | |
344 | $ hg serve --config server.disablefullbundle=true -p $HGPORT -d --pid-file=hg.pid |
|
344 | $ hg serve --config server.disablefullbundle=true -p $HGPORT -d --pid-file=hg.pid | |
345 | $ cat hg.pid > $DAEMON_PIDS |
|
345 | $ cat hg.pid > $DAEMON_PIDS | |
346 | $ cd .. |
|
346 | $ cd .. | |
347 |
|
347 | |||
348 | $ hg clone --stream http://localhost:$HGPORT secret-full-disabled |
|
348 | $ hg clone --stream http://localhost:$HGPORT secret-full-disabled | |
349 | warning: stream clone requested but server has them disabled |
|
349 | warning: stream clone requested but server has them disabled | |
350 | requesting all changes |
|
350 | requesting all changes | |
351 | remote: abort: server has pull-based clones disabled |
|
351 | remote: abort: server has pull-based clones disabled | |
352 | abort: pull failed on remote |
|
352 | abort: pull failed on remote | |
353 | (remove --pull if specified or upgrade Mercurial) |
|
353 | (remove --pull if specified or upgrade Mercurial) | |
354 | [100] |
|
354 | [100] | |
355 |
|
355 | |||
356 | Local stream clone with secrets involved |
|
356 | Local stream clone with secrets involved | |
357 | ---------------------------------------- |
|
357 | ---------------------------------------- | |
358 |
|
358 | |||
359 | (This is just a test over behavior: if you have access to the repo's files, |
|
359 | (This is just a test over behavior: if you have access to the repo's files, | |
360 | there is no security so it isn't important to prevent a clone here.) |
|
360 | there is no security so it isn't important to prevent a clone here.) | |
361 |
|
361 | |||
362 | $ hg clone -U --stream server local-secret |
|
362 | $ hg clone -U --stream server local-secret | |
363 | warning: stream clone requested but server has them disabled |
|
363 | warning: stream clone requested but server has them disabled | |
364 | requesting all changes |
|
364 | requesting all changes | |
365 | adding changesets |
|
365 | adding changesets | |
366 | adding manifests |
|
366 | adding manifests | |
367 | adding file changes |
|
367 | adding file changes | |
368 | added 2 changesets with 1025 changes to 1025 files |
|
368 | added 2 changesets with 1025 changes to 1025 files | |
369 | new changesets 96ee1d7354c4:c17445101a72 |
|
369 | new changesets 96ee1d7354c4:c17445101a72 | |
370 |
|
370 | |||
371 | (revert introduction of secret changeset) |
|
371 | (revert introduction of secret changeset) | |
372 |
|
372 | |||
373 | $ hg -R server phase --draft 'secret()' |
|
373 | $ hg -R server phase --draft 'secret()' | |
374 |
|
374 | |||
375 | Stream clone while repo is changing: |
|
375 | Stream clone while repo is changing: | |
376 | ------------------------------------ |
|
376 | ------------------------------------ | |
377 |
|
377 | |||
378 | We should send a repository in a valid state, ignoring the ongoing transaction. |
|
378 | We should send a repository in a valid state, ignoring the ongoing transaction. | |
379 |
|
379 | |||
380 | $ mkdir changing |
|
380 | $ mkdir changing | |
381 | $ cd changing |
|
381 | $ cd changing | |
382 |
|
382 | |||
383 | prepare repo with small and big file to cover both code paths in emitrevlogdata |
|
383 | prepare repo with small and big file to cover both code paths in emitrevlogdata | |
384 | (inlined revlog and non-inlined revlogs). |
|
384 | (inlined revlog and non-inlined revlogs). | |
385 |
|
385 | |||
386 | $ hg init repo |
|
386 | $ hg init repo | |
387 | $ touch repo/f1 |
|
387 | $ touch repo/f1 | |
388 | $ $TESTDIR/seq.py 50000 > repo/f2 |
|
388 | $ $TESTDIR/seq.py 50000 > repo/f2 | |
389 | $ hg -R repo ci -Aqm "0" |
|
389 | $ hg -R repo ci -Aqm "0" | |
390 | $ HG_TEST_STREAM_WALKED_FILE_1="$TESTTMP/sync_file_walked_1" |
|
390 | $ HG_TEST_STREAM_WALKED_FILE_1="$TESTTMP/sync_file_walked_1" | |
391 | $ export HG_TEST_STREAM_WALKED_FILE_1 |
|
391 | $ export HG_TEST_STREAM_WALKED_FILE_1 | |
392 | $ HG_TEST_STREAM_WALKED_FILE_2="$TESTTMP/sync_file_walked_2" |
|
392 | $ HG_TEST_STREAM_WALKED_FILE_2="$TESTTMP/sync_file_walked_2" | |
393 | $ export HG_TEST_STREAM_WALKED_FILE_2 |
|
393 | $ export HG_TEST_STREAM_WALKED_FILE_2 | |
394 | $ HG_TEST_STREAM_WALKED_FILE_3="$TESTTMP/sync_file_walked_3" |
|
394 | $ HG_TEST_STREAM_WALKED_FILE_3="$TESTTMP/sync_file_walked_3" | |
395 | $ export HG_TEST_STREAM_WALKED_FILE_3 |
|
395 | $ export HG_TEST_STREAM_WALKED_FILE_3 | |
396 | # $ cat << EOF >> $HGRCPATH |
|
396 | # $ cat << EOF >> $HGRCPATH | |
397 | # > [hooks] |
|
397 | # > [hooks] | |
398 | # > pre-clone=rm -f "$TESTTMP/sync_file_walked_*" |
|
398 | # > pre-clone=rm -f "$TESTTMP/sync_file_walked_*" | |
399 | # > EOF |
|
399 | # > EOF | |
400 | $ 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" |
|
400 | $ 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" | |
401 | $ cat hg.pid >> $DAEMON_PIDS |
|
401 | $ cat hg.pid >> $DAEMON_PIDS | |
402 |
|
402 | |||
403 | clone while modifying the repo between stating file with write lock and |
|
403 | clone while modifying the repo between stating file with write lock and | |
404 | actually serving file content |
|
404 | actually serving file content | |
405 |
|
405 | |||
406 | $ (hg clone -q --stream -U http://localhost:$HGPORT1 clone; touch "$HG_TEST_STREAM_WALKED_FILE_3") & |
|
406 | $ (hg clone -q --stream -U http://localhost:$HGPORT1 clone; touch "$HG_TEST_STREAM_WALKED_FILE_3") & | |
407 | $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1 |
|
407 | $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1 | |
408 | $ echo >> repo/f1 |
|
408 | $ echo >> repo/f1 | |
409 | $ echo >> repo/f2 |
|
409 | $ echo >> repo/f2 | |
410 | $ hg -R repo ci -m "1" --config ui.timeout.warn=-1 |
|
410 | $ hg -R repo ci -m "1" --config ui.timeout.warn=-1 | |
411 | $ touch $HG_TEST_STREAM_WALKED_FILE_2 |
|
411 | $ touch $HG_TEST_STREAM_WALKED_FILE_2 | |
412 | $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3 |
|
412 | $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3 | |
413 | $ hg -R clone id |
|
413 | $ hg -R clone id | |
414 | 000000000000 |
|
414 | 000000000000 | |
415 | $ hg -R clone verify --quiet |
|
415 | $ hg -R clone verify --quiet | |
416 | $ cat errors.log |
|
416 | $ cat errors.log | |
417 | $ cd .. |
|
417 | $ cd .. | |
418 |
|
418 | |||
419 | Stream repository with bookmarks |
|
419 | Stream repository with bookmarks | |
420 | -------------------------------- |
|
420 | -------------------------------- | |
421 |
|
421 | |||
422 | The bookmark file should be send over in the stream bundle. |
|
422 | The bookmark file should be send over in the stream bundle. | |
423 |
|
423 | |||
424 | add a bookmark |
|
424 | add a bookmark | |
425 |
|
425 | |||
426 | $ hg -R server bookmark -r tip some-bookmark |
|
426 | $ hg -R server bookmark -r tip some-bookmark | |
427 |
|
427 | |||
428 | clone it |
|
428 | clone it | |
429 |
|
429 | |||
430 | $ hg clone --stream http://localhost:$HGPORT with-bookmarks |
|
430 | $ hg clone --stream http://localhost:$HGPORT with-bookmarks | |
431 | streaming all changes |
|
431 | streaming all changes | |
432 | 1091 files to transfer, * KB of data (glob) (stream-legacy !) |
|
432 | 1091 files to transfer, * KB of data (glob) (stream-legacy !) | |
433 | 1097 files to transfer, * KB of data (glob) (stream-bundle2-v2 no-rust !) |
|
433 | 1097 files to transfer, * KB of data (glob) (stream-bundle2-v2 no-rust !) | |
434 | 1099 files to transfer, * KB of data (glob) (stream-bundle2-v2 rust !) |
|
434 | 1099 files to transfer, * KB of data (glob) (stream-bundle2-v2 rust !) | |
435 | 1096 entries to transfer (stream-bundle2-v3 !) |
|
435 | 1096 entries to transfer (stream-bundle2-v3 !) | |
436 | transferred * KB in * seconds (* */sec) (glob) |
|
436 | transferred * KB in * seconds (* */sec) (glob) | |
437 | searching for changes (stream-legacy !) |
|
437 | searching for changes (stream-legacy !) | |
438 | no changes found (stream-legacy !) |
|
438 | no changes found (stream-legacy !) | |
439 | updating to branch default |
|
439 | updating to branch default | |
440 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
440 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
441 | $ hg verify -R with-bookmarks -q |
|
441 | $ hg verify -R with-bookmarks -q | |
442 | $ hg -R with-bookmarks bookmarks |
|
442 | $ hg -R with-bookmarks bookmarks | |
443 | some-bookmark 2:5223b5e3265f |
|
443 | some-bookmark 2:5223b5e3265f | |
444 |
|
444 | |||
445 | Stream repository with phases |
|
445 | Stream repository with phases | |
446 | ----------------------------- |
|
446 | ----------------------------- | |
447 |
|
447 | |||
|
448 | The file storing phases information (e.g. phaseroots) should be sent as part of | |||
|
449 | the stream bundle. | |||
|
450 | ||||
448 | Clone as publishing |
|
451 | Clone as publishing | |
449 |
|
452 | |||
450 | $ hg -R server phase -r 'all()' |
|
453 | $ hg -R server phase -r 'all()' | |
451 | 0: draft |
|
454 | 0: draft | |
452 | 1: draft |
|
455 | 1: draft | |
453 | 2: draft |
|
456 | 2: draft | |
454 |
|
457 | |||
455 | #if stream-legacy |
|
|||
456 | $ hg clone --stream http://localhost:$HGPORT phase-publish |
|
|||
457 | streaming all changes |
|
|||
458 | 1091 files to transfer, 102 KB of data (no-zstd !) |
|
|||
459 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
|||
460 | 1091 files to transfer, 98.8 KB of data (zstd !) |
|
|||
461 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) |
|
|||
462 | searching for changes |
|
|||
463 | no changes found |
|
|||
464 | updating to branch default |
|
|||
465 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
|||
466 | #endif |
|
|||
467 | #if stream-bundle2-v2 |
|
|||
468 | $ hg clone --stream http://localhost:$HGPORT phase-publish |
|
458 | $ hg clone --stream http://localhost:$HGPORT phase-publish | |
469 | streaming all changes |
|
459 | streaming all changes | |
470 |
109 |
|
460 | 1091 files to transfer, * KB of data (glob) (stream-legacy !) | |
471 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
461 | 1097 files to transfer, * KB of data (glob) (stream-bundle2-v2 no-rust !) | |
472 |
109 |
|
462 | 1099 files to transfer, * KB of data (glob) (stream-bundle2-v2 rust !) | |
473 | transferred 99.1 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
463 | 1096 entries to transfer (stream-bundle2-v3 !) | |
474 | 1099 files to transfer, 99.2 KB of data (zstd rust !) |
|
464 | transferred * KB in * seconds (* */sec) (glob) | |
475 | transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
465 | searching for changes (stream-legacy !) | |
|
466 | no changes found (stream-legacy !) | |||
476 | updating to branch default |
|
467 | updating to branch default | |
477 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
468 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
478 | #endif |
|
|||
479 | #if stream-bundle2-v3 |
|
|||
480 | $ hg clone --stream http://localhost:$HGPORT phase-publish |
|
|||
481 | streaming all changes |
|
|||
482 | 1096 entries to transfer |
|
|||
483 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
|||
484 | transferred 99.1 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
|||
485 | transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
|||
486 | updating to branch default |
|
|||
487 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
|||
488 | #endif |
|
|||
489 | $ hg verify -R phase-publish -q |
|
469 | $ hg verify -R phase-publish -q | |
490 | $ hg -R phase-publish phase -r 'all()' |
|
470 | $ hg -R phase-publish phase -r 'all()' | |
491 | 0: public |
|
471 | 0: public | |
492 | 1: public |
|
472 | 1: public | |
493 | 2: public |
|
473 | 2: public | |
494 |
|
474 | |||
495 | Clone as non publishing |
|
475 | Clone as non publishing | |
496 |
|
476 | |||
497 | $ cat << EOF >> server/.hg/hgrc |
|
477 | $ cat << EOF >> server/.hg/hgrc | |
498 | > [phases] |
|
478 | > [phases] | |
499 | > publish = False |
|
479 | > publish = False | |
500 | > EOF |
|
480 | > EOF | |
501 | $ killdaemons.py |
|
481 | $ killdaemons.py | |
502 | $ hg -R server serve -p $HGPORT -d --pid-file=hg.pid |
|
482 | $ hg -R server serve -p $HGPORT -d --pid-file=hg.pid | |
503 | $ cat hg.pid > $DAEMON_PIDS |
|
483 | $ cat hg.pid > $DAEMON_PIDS | |
504 |
|
484 | |||
505 | #if stream-legacy |
|
|||
506 |
|
||||
507 | With v1 of the stream protocol, changeset are always cloned as public. It make |
|
|||
508 | stream v1 unsuitable for non-publishing repository. |
|
|||
509 |
|
||||
510 | $ hg clone --stream http://localhost:$HGPORT phase-no-publish |
|
|||
511 | streaming all changes |
|
|||
512 | 1091 files to transfer, 102 KB of data (no-zstd !) |
|
|||
513 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
|||
514 | 1091 files to transfer, 98.8 KB of data (zstd !) |
|
|||
515 | transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !) |
|
|||
516 | searching for changes |
|
|||
517 | no changes found |
|
|||
518 | updating to branch default |
|
|||
519 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
|||
520 | $ hg -R phase-no-publish phase -r 'all()' |
|
|||
521 | 0: public |
|
|||
522 | 1: public |
|
|||
523 | 2: public |
|
|||
524 | #endif |
|
|||
525 | #if stream-bundle2-v2 |
|
|||
526 | $ hg clone --stream http://localhost:$HGPORT phase-no-publish |
|
485 | $ hg clone --stream http://localhost:$HGPORT phase-no-publish | |
527 | streaming all changes |
|
486 | streaming all changes | |
528 |
109 |
|
487 | 1091 files to transfer, * KB of data (glob) (stream-legacy !) | |
529 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
488 | 1098 files to transfer, * KB of data (glob) (stream-bundle2-v2 no-rust !) | |
530 |
1 |
|
489 | 1100 files to transfer, * KB of data (glob) (stream-bundle2-v2 rust !) | |
531 | transferred 99.1 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
490 | 1097 entries to transfer (stream-bundle2-v3 !) | |
532 | 1100 files to transfer, 99.2 KB of data (zstd rust !) |
|
491 | transferred * KB in * seconds (* */sec) (glob) | |
533 | transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
492 | searching for changes (stream-legacy !) | |
|
493 | no changes found (stream-legacy !) | |||
534 | updating to branch default |
|
494 | updating to branch default | |
535 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
495 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
496 | ||||
|
497 | Note: With v1 of the stream protocol, changeset are always cloned as public. It | |||
|
498 | make stream v1 unsuitable for non-publishing repository. | |||
|
499 | ||||
536 | $ hg -R phase-no-publish phase -r 'all()' |
|
500 | $ hg -R phase-no-publish phase -r 'all()' | |
537 | 0: draft |
|
501 | 0: public (stream-legacy !) | |
538 | 1: draft |
|
502 | 1: public (stream-legacy !) | |
539 | 2: draft |
|
503 | 2: public (stream-legacy !) | |
540 | #endif |
|
504 | 0: draft (no-stream-legacy !) | |
541 | #if stream-bundle2-v3 |
|
505 | 1: draft (no-stream-legacy !) | |
542 | $ hg clone --stream http://localhost:$HGPORT phase-no-publish |
|
506 | 2: draft (no-stream-legacy !) | |
543 | streaming all changes |
|
|||
544 | 1097 entries to transfer |
|
|||
545 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
|||
546 | transferred 99.1 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
|||
547 | transferred 99.2 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
|||
548 | updating to branch default |
|
|||
549 | 1088 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
|||
550 | $ hg -R phase-no-publish phase -r 'all()' |
|
|||
551 | 0: draft |
|
|||
552 | 1: draft |
|
|||
553 | 2: draft |
|
|||
554 | #endif |
|
|||
555 | $ hg verify -R phase-no-publish -q |
|
507 | $ hg verify -R phase-no-publish -q | |
556 |
|
508 | |||
557 | $ killdaemons.py |
|
509 | $ killdaemons.py | |
558 |
|
510 | |||
559 | #if stream-legacy |
|
511 | #if stream-legacy | |
560 |
|
512 | |||
561 | With v1 of the stream protocol, changeset are always cloned as public. There's |
|
513 | With v1 of the stream protocol, changeset are always cloned as public. There's | |
562 | no obsolescence markers exchange in stream v1. |
|
514 | no obsolescence markers exchange in stream v1. | |
563 |
|
515 | |||
564 | #endif |
|
516 | #endif | |
565 | #if stream-bundle2-v2 |
|
517 | #if stream-bundle2-v2 | |
566 |
|
518 | |||
567 | Stream repository with obsolescence |
|
519 | Stream repository with obsolescence | |
568 | ----------------------------------- |
|
520 | ----------------------------------- | |
569 |
|
521 | |||
570 | Clone non-publishing with obsolescence |
|
522 | Clone non-publishing with obsolescence | |
571 |
|
523 | |||
572 | $ cat >> $HGRCPATH << EOF |
|
524 | $ cat >> $HGRCPATH << EOF | |
573 | > [experimental] |
|
525 | > [experimental] | |
574 | > evolution=all |
|
526 | > evolution=all | |
575 | > EOF |
|
527 | > EOF | |
576 |
|
528 | |||
577 | $ cd server |
|
529 | $ cd server | |
578 | $ echo foo > foo |
|
530 | $ echo foo > foo | |
579 | $ hg -q commit -m 'about to be pruned' |
|
531 | $ hg -q commit -m 'about to be pruned' | |
580 | $ hg debugobsolete `hg log -r . -T '{node}'` -d '0 0' -u test --record-parents |
|
532 | $ hg debugobsolete `hg log -r . -T '{node}'` -d '0 0' -u test --record-parents | |
581 | 1 new obsolescence markers |
|
533 | 1 new obsolescence markers | |
582 | obsoleted 1 changesets |
|
534 | obsoleted 1 changesets | |
583 | $ hg up null -q |
|
535 | $ hg up null -q | |
584 | $ hg log -T '{rev}: {phase}\n' |
|
536 | $ hg log -T '{rev}: {phase}\n' | |
585 | 2: draft |
|
537 | 2: draft | |
586 | 1: draft |
|
538 | 1: draft | |
587 | 0: draft |
|
539 | 0: draft | |
588 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
540 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
589 | $ cat hg.pid > $DAEMON_PIDS |
|
541 | $ cat hg.pid > $DAEMON_PIDS | |
590 | $ cd .. |
|
542 | $ cd .. | |
591 |
|
543 | |||
592 | $ hg clone -U --stream http://localhost:$HGPORT with-obsolescence |
|
544 | $ hg clone -U --stream http://localhost:$HGPORT with-obsolescence | |
593 | streaming all changes |
|
545 | streaming all changes | |
594 | 1099 files to transfer, 102 KB of data (no-zstd !) |
|
546 | 1099 files to transfer, 102 KB of data (no-zstd !) | |
595 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
547 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) | |
596 | 1099 files to transfer, 99.5 KB of data (zstd no-rust !) |
|
548 | 1099 files to transfer, 99.5 KB of data (zstd no-rust !) | |
597 | transferred 99.5 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
549 | transferred 99.5 KB in * seconds (* */sec) (glob) (zstd no-rust !) | |
598 | 1101 files to transfer, 99.6 KB of data (zstd rust !) |
|
550 | 1101 files to transfer, 99.6 KB of data (zstd rust !) | |
599 | transferred 99.6 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
551 | transferred 99.6 KB in * seconds (* */sec) (glob) (zstd rust !) | |
600 | $ hg -R with-obsolescence log -T '{rev}: {phase}\n' |
|
552 | $ hg -R with-obsolescence log -T '{rev}: {phase}\n' | |
601 | 2: draft |
|
553 | 2: draft | |
602 | 1: draft |
|
554 | 1: draft | |
603 | 0: draft |
|
555 | 0: draft | |
604 | $ hg debugobsolete -R with-obsolescence |
|
556 | $ hg debugobsolete -R with-obsolescence | |
605 | 8c206a663911c1f97f2f9d7382e417ae55872cfa 0 {5223b5e3265f0df40bb743da62249413d74ac70f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
557 | 8c206a663911c1f97f2f9d7382e417ae55872cfa 0 {5223b5e3265f0df40bb743da62249413d74ac70f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
606 | $ hg verify -R with-obsolescence -q |
|
558 | $ hg verify -R with-obsolescence -q | |
607 |
|
559 | |||
608 | $ hg clone -U --stream --config experimental.evolution=0 http://localhost:$HGPORT with-obsolescence-no-evolution |
|
560 | $ hg clone -U --stream --config experimental.evolution=0 http://localhost:$HGPORT with-obsolescence-no-evolution | |
609 | streaming all changes |
|
561 | streaming all changes | |
610 | remote: abort: server has obsolescence markers, but client cannot receive them via stream clone |
|
562 | remote: abort: server has obsolescence markers, but client cannot receive them via stream clone | |
611 | abort: pull failed on remote |
|
563 | abort: pull failed on remote | |
612 | [100] |
|
564 | [100] | |
613 |
|
565 | |||
614 | $ killdaemons.py |
|
566 | $ killdaemons.py | |
615 |
|
567 | |||
616 | #endif |
|
568 | #endif | |
617 | #if stream-bundle2-v3 |
|
569 | #if stream-bundle2-v3 | |
618 |
|
570 | |||
619 | Stream repository with obsolescence |
|
571 | Stream repository with obsolescence | |
620 | ----------------------------------- |
|
572 | ----------------------------------- | |
621 |
|
573 | |||
622 | Clone non-publishing with obsolescence |
|
574 | Clone non-publishing with obsolescence | |
623 |
|
575 | |||
624 | $ cat >> $HGRCPATH << EOF |
|
576 | $ cat >> $HGRCPATH << EOF | |
625 | > [experimental] |
|
577 | > [experimental] | |
626 | > evolution=all |
|
578 | > evolution=all | |
627 | > EOF |
|
579 | > EOF | |
628 |
|
580 | |||
629 | $ cd server |
|
581 | $ cd server | |
630 | $ echo foo > foo |
|
582 | $ echo foo > foo | |
631 | $ hg -q commit -m 'about to be pruned' |
|
583 | $ hg -q commit -m 'about to be pruned' | |
632 | $ hg debugobsolete `hg log -r . -T '{node}'` -d '0 0' -u test --record-parents |
|
584 | $ hg debugobsolete `hg log -r . -T '{node}'` -d '0 0' -u test --record-parents | |
633 | 1 new obsolescence markers |
|
585 | 1 new obsolescence markers | |
634 | obsoleted 1 changesets |
|
586 | obsoleted 1 changesets | |
635 | $ hg up null -q |
|
587 | $ hg up null -q | |
636 | $ hg log -T '{rev}: {phase}\n' |
|
588 | $ hg log -T '{rev}: {phase}\n' | |
637 | 2: draft |
|
589 | 2: draft | |
638 | 1: draft |
|
590 | 1: draft | |
639 | 0: draft |
|
591 | 0: draft | |
640 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
592 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
641 | $ cat hg.pid > $DAEMON_PIDS |
|
593 | $ cat hg.pid > $DAEMON_PIDS | |
642 | $ cd .. |
|
594 | $ cd .. | |
643 |
|
595 | |||
644 | $ hg clone -U --stream http://localhost:$HGPORT with-obsolescence |
|
596 | $ hg clone -U --stream http://localhost:$HGPORT with-obsolescence | |
645 | streaming all changes |
|
597 | streaming all changes | |
646 | 1098 entries to transfer |
|
598 | 1098 entries to transfer | |
647 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) |
|
599 | transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !) | |
648 | transferred 99.5 KB in * seconds (* */sec) (glob) (zstd no-rust !) |
|
600 | transferred 99.5 KB in * seconds (* */sec) (glob) (zstd no-rust !) | |
649 | transferred 99.6 KB in * seconds (* */sec) (glob) (zstd rust !) |
|
601 | transferred 99.6 KB in * seconds (* */sec) (glob) (zstd rust !) | |
650 | $ hg -R with-obsolescence log -T '{rev}: {phase}\n' |
|
602 | $ hg -R with-obsolescence log -T '{rev}: {phase}\n' | |
651 | 2: draft |
|
603 | 2: draft | |
652 | 1: draft |
|
604 | 1: draft | |
653 | 0: draft |
|
605 | 0: draft | |
654 | $ hg debugobsolete -R with-obsolescence |
|
606 | $ hg debugobsolete -R with-obsolescence | |
655 | 8c206a663911c1f97f2f9d7382e417ae55872cfa 0 {5223b5e3265f0df40bb743da62249413d74ac70f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} |
|
607 | 8c206a663911c1f97f2f9d7382e417ae55872cfa 0 {5223b5e3265f0df40bb743da62249413d74ac70f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} | |
656 | $ hg verify -R with-obsolescence -q |
|
608 | $ hg verify -R with-obsolescence -q | |
657 |
|
609 | |||
658 | $ hg clone -U --stream --config experimental.evolution=0 http://localhost:$HGPORT with-obsolescence-no-evolution |
|
610 | $ hg clone -U --stream --config experimental.evolution=0 http://localhost:$HGPORT with-obsolescence-no-evolution | |
659 | streaming all changes |
|
611 | streaming all changes | |
660 | remote: abort: server has obsolescence markers, but client cannot receive them via stream clone |
|
612 | remote: abort: server has obsolescence markers, but client cannot receive them via stream clone | |
661 | abort: pull failed on remote |
|
613 | abort: pull failed on remote | |
662 | [100] |
|
614 | [100] | |
663 |
|
615 | |||
664 | $ killdaemons.py |
|
616 | $ killdaemons.py | |
665 |
|
617 | |||
666 | #endif |
|
618 | #endif | |
667 |
|
619 | |||
668 | Cloning a repo with no requirements doesn't give some obscure error |
|
620 | Cloning a repo with no requirements doesn't give some obscure error | |
669 | ------------------------------------------------------------------- |
|
621 | ------------------------------------------------------------------- | |
670 |
|
622 | |||
671 | $ mkdir -p empty-repo/.hg |
|
623 | $ mkdir -p empty-repo/.hg | |
672 | $ hg clone -q --stream ssh://user@dummy/empty-repo empty-repo2 |
|
624 | $ hg clone -q --stream ssh://user@dummy/empty-repo empty-repo2 | |
673 | $ hg --cwd empty-repo2 verify -q |
|
625 | $ hg --cwd empty-repo2 verify -q | |
674 |
|
626 | |||
675 | Cloning a repo with an empty manifestlog doesn't give some weird error |
|
627 | Cloning a repo with an empty manifestlog doesn't give some weird error | |
676 | ---------------------------------------------------------------------- |
|
628 | ---------------------------------------------------------------------- | |
677 |
|
629 | |||
678 | $ rm -r empty-repo; hg init empty-repo |
|
630 | $ rm -r empty-repo; hg init empty-repo | |
679 | $ (cd empty-repo; touch x; hg commit -Am empty; hg debugstrip -r 0) > /dev/null |
|
631 | $ (cd empty-repo; touch x; hg commit -Am empty; hg debugstrip -r 0) > /dev/null | |
680 | $ hg clone -q --stream ssh://user@dummy/empty-repo empty-repo3 |
|
632 | $ hg clone -q --stream ssh://user@dummy/empty-repo empty-repo3 | |
681 | $ hg --cwd empty-repo3 verify -q 2>&1 | grep -v warning |
|
633 | $ hg --cwd empty-repo3 verify -q 2>&1 | grep -v warning | |
682 | [1] |
|
634 | [1] | |
683 |
|
635 | |||
684 | The warnings filtered out here are talking about zero-length 'orphan' data files. |
|
636 | The warnings filtered out here are talking about zero-length 'orphan' data files. | |
685 | Those are harmless, so that's fine. |
|
637 | Those are harmless, so that's fine. | |
686 |
|
638 |
General Comments 0
You need to be logged in to leave comments.
Login now