##// END OF EJS Templates
clone: automatically glob stream clone output in test...
marmoute -
r48682:8ae828fd stable
parent child Browse files
Show More
@@ -1,198 +1,206 b''
1 1 # common patterns in test at can safely be replaced
2 2 from __future__ import absolute_import
3 3
4 4 import os
5 5
6 6 substitutions = [
7 7 # list of possible compressions
8 8 (br'(zstd,)?zlib,none,bzip2', br'$USUAL_COMPRESSIONS$'),
9 9 (br'=(zstd,)?zlib', br'=$BUNDLE2_COMPRESSIONS$'),
10 10 # capabilities sent through http
11 11 (
12 12 br'bundlecaps=HG20%2Cbundle2%3DHG20%250A'
13 13 br'bookmarks%250A'
14 14 br'changegroup%253D01%252C02%250A'
15 15 br'checkheads%253Drelated%250A'
16 16 br'digests%253Dmd5%252Csha1%252Csha512%250A'
17 17 br'error%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250A'
18 18 br'hgtagsfnodes%250A'
19 19 br'listkeys%250A'
20 20 br'phases%253Dheads%250A'
21 21 br'pushkey%250A'
22 22 br'remote-changegroup%253Dhttp%252Chttps%250A'
23 23 br'stream%253Dv2',
24 24 # (the replacement patterns)
25 25 br'$USUAL_BUNDLE_CAPS$',
26 26 ),
27 27 (
28 28 br'bundlecaps=HG20%2Cbundle2%3DHG20%250A'
29 29 br'bookmarks%250A'
30 30 br'changegroup%253D01%252C02%250A'
31 31 br'checkheads%3Drelated%0A'
32 32 br'digests%253Dmd5%252Csha1%252Csha512%250A'
33 33 br'error%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250A'
34 34 br'hgtagsfnodes%250A'
35 35 br'listkeys%250A'
36 36 br'phases%253Dheads%250A'
37 37 br'pushkey%250A'
38 38 br'remote-changegroup%253Dhttp%252Chttps',
39 39 # (the replacement patterns)
40 40 br'$USUAL_BUNDLE_CAPS_SERVER$',
41 41 ),
42 42 # bundle2 capabilities sent through ssh
43 43 (
44 44 br'bundle2=HG20%0A'
45 45 br'bookmarks%0A'
46 46 br'changegroup%3D01%2C02%0A'
47 47 br'checkheads%3Drelated%0A'
48 48 br'digests%3Dmd5%2Csha1%2Csha512%0A'
49 49 br'error%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0A'
50 50 br'hgtagsfnodes%0A'
51 51 br'listkeys%0A'
52 52 br'phases%3Dheads%0A'
53 53 br'pushkey%0A'
54 54 br'remote-changegroup%3Dhttp%2Chttps%0A'
55 55 br'stream%3Dv2',
56 56 # (replacement patterns)
57 57 br'$USUAL_BUNDLE2_CAPS$',
58 58 ),
59 59 # bundle2 capabilities advertised by the server
60 60 (
61 61 br'bundle2=HG20%0A'
62 62 br'bookmarks%0A'
63 63 br'changegroup%3D01%2C02%0A'
64 64 br'checkheads%3Drelated%0A'
65 65 br'digests%3Dmd5%2Csha1%2Csha512%0A'
66 66 br'error%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0A'
67 67 br'hgtagsfnodes%0A'
68 68 br'listkeys%0A'
69 69 br'phases%3Dheads%0A'
70 70 br'pushkey%0A'
71 71 br'remote-changegroup%3Dhttp%2Chttps',
72 72 # (replacement patterns)
73 73 br'$USUAL_BUNDLE2_CAPS_SERVER$',
74 74 ),
75 75 (
76 76 br'bundle2=HG20%0A'
77 77 br'bookmarks%0A'
78 78 br'changegroup%3D01%2C02%0A'
79 79 br'digests%3Dmd5%2Csha1%2Csha512%0A'
80 80 br'error%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0A'
81 81 br'hgtagsfnodes%0A'
82 82 br'listkeys%0A'
83 83 br'pushkey%0A'
84 84 br'remote-changegroup%3Dhttp%2Chttps%0A'
85 85 br'stream%3Dv2',
86 86 # (replacement patterns)
87 87 br'$USUAL_BUNDLE2_CAPS_NO_PHASES$',
88 88 ),
89 89 # HTTP access log dates
90 90 (
91 91 br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] "(GET|PUT|POST)',
92 92 lambda m: br' - - [$LOGDATE$] "' + m.group(1),
93 93 ),
94 94 # HTTP error log dates
95 95 (
96 96 br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] (HG error:|Exception)',
97 97 lambda m: br' - - [$ERRDATE$] ' + m.group(1),
98 98 ),
99 99 # HTTP header dates- RFC 1123
100 100 (
101 101 br'([Dd]ate): [A-Za-z]{3}, \d\d [A-Za-z]{3} \d{4} \d\d:\d\d:\d\d GMT',
102 102 lambda m: br'%s: $HTTP_DATE$' % m.group(1),
103 103 ),
104 104 # LFS expiration value
105 105 (
106 106 br'"expires_at": "\d{4}-\d\d-\d\dT\d\d:\d\d:\d\dZ"',
107 107 br'"expires_at": "$ISO_8601_DATE_TIME$"',
108 108 ),
109 109 # Windows has an extra '/' in the following lines that get globbed away:
110 110 # pushing to file:/*/$TESTTMP/r2 (glob)
111 111 # comparing with file:/*/$TESTTMP/r2 (glob)
112 112 # sub/maybelarge.dat: largefile 34..9c not available from
113 113 # file:/*/$TESTTMP/largefiles-repo (glob)
114 114 (
115 115 br'(.*file:/)/?(/\$TESTTMP.*)',
116 116 lambda m: m.group(1) + b'*' + m.group(2) + b' (glob)',
117 117 ),
118 # `hg clone --stream` output
119 (
120 br'transferred (\S+?) KB in \S+? seconds \(.+?/sec\)(?: \(glob\))?(.*)',
121 lambda m: (
122 br'transferred %s KB in * seconds (* */sec) (glob)%s'
123 % (m.group(1), m.group(2))
124 ),
125 ),
118 126 ]
119 127
120 128 # Various platform error strings, keyed on a common replacement string
121 129 _errors = {
122 130 br'$ENOENT$': (
123 131 # IOError in Python does not have the same error message
124 132 # than in Rust, and automatic conversion is not possible
125 133 # because of module member privacy.
126 134 br'No such file or directory \(os error 2\)',
127 135 # strerror()
128 136 br'No such file or directory',
129 137 # FormatMessage(ERROR_FILE_NOT_FOUND)
130 138 br'The system cannot find the file specified',
131 139 ),
132 140 br'$ENOTDIR$': (
133 141 # strerror()
134 142 br'Not a directory',
135 143 # FormatMessage(ERROR_PATH_NOT_FOUND)
136 144 br'The system cannot find the path specified',
137 145 ),
138 146 br'$ECONNRESET$': (
139 147 # strerror()
140 148 br'Connection reset by peer',
141 149 # FormatMessage(WSAECONNRESET)
142 150 br'An existing connection was forcibly closed by the remote host',
143 151 ),
144 152 br'$EADDRINUSE$': (
145 153 # strerror()
146 154 br'Address already in use',
147 155 # FormatMessage(WSAEADDRINUSE)
148 156 br'Only one usage of each socket address'
149 157 br' \(protocol/network address/port\) is normally permitted',
150 158 ),
151 159 br'$EADDRNOTAVAIL$': (
152 160 # strerror()
153 161 br'Cannot assign requested address',
154 162 # FormatMessage(WSAEADDRNOTAVAIL)
155 163 ),
156 164 }
157 165
158 166 for replace, msgs in _errors.items():
159 167 substitutions.extend((m, replace) for m in msgs)
160 168
161 169 # Output lines on Windows that can be autocorrected for '\' vs '/' path
162 170 # differences.
163 171 _winpathfixes = [
164 172 # cloning subrepo s\ss from $TESTTMP/t/s/ss
165 173 # cloning subrepo foo\bar from http://localhost:$HGPORT/foo/bar
166 174 br'(?m)^cloning subrepo \S+\\.*',
167 175 # pulling from $TESTTMP\issue1852a
168 176 br'(?m)^pulling from \$TESTTMP\\.*',
169 177 # pushing to $TESTTMP\a
170 178 br'(?m)^pushing to \$TESTTMP\\.*',
171 179 # pushing subrepo s\ss to $TESTTMP/t/s/ss
172 180 br'(?m)^pushing subrepo \S+\\\S+ to.*',
173 181 # moving d1\d11\a1 to d3/d11/a1
174 182 br'(?m)^moving \S+\\.*',
175 183 # d1\a: not recording move - dummy does not exist
176 184 br'\S+\\\S+: not recording move .+',
177 185 # reverting s\a
178 186 br'(?m)^reverting (?!subrepo ).*\\.*',
179 187 # saved backup bundle to
180 188 # $TESTTMP\test\.hg\strip-backup/443431ffac4f-2fc5398a-backup.hg
181 189 br'(?m)^saved backup bundle to \$TESTTMP.*\.hg',
182 190 # no changes made to subrepo s\ss since last push to ../tcc/s/ss
183 191 br'(?m)^no changes made to subrepo \S+\\\S+ since.*',
184 192 # changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing
185 193 # $TESTTMP\largefiles-repo-hg\.hg\largefiles\76..38
186 194 br'(?m)^changeset .* references (corrupted|missing) \$TESTTMP\\.*',
187 195 # stuff/maybelarge.dat: largefile 76..38 not available from
188 196 # file:/*/$TESTTMP\largefiles-repo (glob)
189 197 br'.*: largefile \S+ not available from file:/\*/.+',
190 198 ]
191 199
192 200 if os.name == 'nt':
193 201 substitutions.extend(
194 202 [
195 203 (s, lambda match: match.group().replace(b'\\', b'/'))
196 204 for s in _winpathfixes
197 205 ]
198 206 )
@@ -1,951 +1,951 b''
1 1 Setting up test
2 2
3 3 $ hg init test
4 4 $ cd test
5 5 $ echo 0 > afile
6 6 $ hg add afile
7 7 $ hg commit -m "0.0"
8 8 $ echo 1 >> afile
9 9 $ hg commit -m "0.1"
10 10 $ echo 2 >> afile
11 11 $ hg commit -m "0.2"
12 12 $ echo 3 >> afile
13 13 $ hg commit -m "0.3"
14 14 $ hg update -C 0
15 15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 16 $ echo 1 >> afile
17 17 $ hg commit -m "1.1"
18 18 created new head
19 19 $ echo 2 >> afile
20 20 $ hg commit -m "1.2"
21 21 $ echo "a line" > fred
22 22 $ echo 3 >> afile
23 23 $ hg add fred
24 24 $ hg commit -m "1.3"
25 25 $ hg mv afile adifferentfile
26 26 $ hg commit -m "1.3m"
27 27 $ hg update -C 3
28 28 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
29 29 $ hg mv afile anotherfile
30 30 $ hg commit -m "0.3m"
31 31 $ hg verify
32 32 checking changesets
33 33 checking manifests
34 34 crosschecking files in changesets and manifests
35 35 checking files
36 36 checked 9 changesets with 7 changes to 4 files
37 37 $ cd ..
38 38 $ hg init empty
39 39
40 40 Bundle and phase
41 41
42 42 $ hg -R test phase --force --secret 0
43 43 $ hg -R test bundle phase.hg empty
44 44 searching for changes
45 45 no changes found (ignored 9 secret changesets)
46 46 [1]
47 47 $ hg -R test phase --draft -r 'head()'
48 48
49 49 Bundle --all
50 50
51 51 $ hg -R test bundle --all all.hg
52 52 9 changesets found
53 53
54 54 Bundle test to full.hg
55 55
56 56 $ hg -R test bundle full.hg empty
57 57 searching for changes
58 58 9 changesets found
59 59
60 60 Unbundle full.hg in test
61 61
62 62 $ hg -R test unbundle full.hg
63 63 adding changesets
64 64 adding manifests
65 65 adding file changes
66 66 added 0 changesets with 0 changes to 4 files
67 67 (run 'hg update' to get a working copy)
68 68
69 69 Verify empty
70 70
71 71 $ hg -R empty heads
72 72 [1]
73 73 $ hg -R empty verify
74 74 checking changesets
75 75 checking manifests
76 76 crosschecking files in changesets and manifests
77 77 checking files
78 78 checked 0 changesets with 0 changes to 0 files
79 79
80 80 #if repobundlerepo
81 81
82 82 Pull full.hg into test (using --cwd)
83 83
84 84 $ hg --cwd test pull ../full.hg
85 85 pulling from ../full.hg
86 86 searching for changes
87 87 no changes found
88 88
89 89 Verify that there are no leaked temporary files after pull (issue2797)
90 90
91 91 $ ls test/.hg | grep .hg10un
92 92 [1]
93 93
94 94 Pull full.hg into empty (using --cwd)
95 95
96 96 $ hg --cwd empty pull ../full.hg
97 97 pulling from ../full.hg
98 98 requesting all changes
99 99 adding changesets
100 100 adding manifests
101 101 adding file changes
102 102 added 9 changesets with 7 changes to 4 files (+1 heads)
103 103 new changesets f9ee2f85a263:aa35859c02ea (9 drafts)
104 104 (run 'hg heads' to see heads, 'hg merge' to merge)
105 105
106 106 Rollback empty
107 107
108 108 $ hg -R empty rollback
109 109 repository tip rolled back to revision -1 (undo pull)
110 110
111 111 Pull full.hg into empty again (using --cwd)
112 112
113 113 $ hg --cwd empty pull ../full.hg
114 114 pulling from ../full.hg
115 115 requesting all changes
116 116 adding changesets
117 117 adding manifests
118 118 adding file changes
119 119 added 9 changesets with 7 changes to 4 files (+1 heads)
120 120 new changesets f9ee2f85a263:aa35859c02ea (9 drafts)
121 121 (run 'hg heads' to see heads, 'hg merge' to merge)
122 122
123 123 Pull full.hg into test (using -R)
124 124
125 125 $ hg -R test pull full.hg
126 126 pulling from full.hg
127 127 searching for changes
128 128 no changes found
129 129
130 130 Pull full.hg into empty (using -R)
131 131
132 132 $ hg -R empty pull full.hg
133 133 pulling from full.hg
134 134 searching for changes
135 135 no changes found
136 136
137 137 Rollback empty
138 138
139 139 $ hg -R empty rollback
140 140 repository tip rolled back to revision -1 (undo pull)
141 141
142 142 Pull full.hg into empty again (using -R)
143 143
144 144 $ hg -R empty pull full.hg
145 145 pulling from full.hg
146 146 requesting all changes
147 147 adding changesets
148 148 adding manifests
149 149 adding file changes
150 150 added 9 changesets with 7 changes to 4 files (+1 heads)
151 151 new changesets f9ee2f85a263:aa35859c02ea (9 drafts)
152 152 (run 'hg heads' to see heads, 'hg merge' to merge)
153 153
154 154 Log -R full.hg in fresh empty
155 155
156 156 $ rm -r empty
157 157 $ hg init empty
158 158 $ cd empty
159 159 $ hg -R bundle://../full.hg log
160 160 changeset: 8:aa35859c02ea
161 161 tag: tip
162 162 parent: 3:eebf5a27f8ca
163 163 user: test
164 164 date: Thu Jan 01 00:00:00 1970 +0000
165 165 summary: 0.3m
166 166
167 167 changeset: 7:a6a34bfa0076
168 168 user: test
169 169 date: Thu Jan 01 00:00:00 1970 +0000
170 170 summary: 1.3m
171 171
172 172 changeset: 6:7373c1169842
173 173 user: test
174 174 date: Thu Jan 01 00:00:00 1970 +0000
175 175 summary: 1.3
176 176
177 177 changeset: 5:1bb50a9436a7
178 178 user: test
179 179 date: Thu Jan 01 00:00:00 1970 +0000
180 180 summary: 1.2
181 181
182 182 changeset: 4:095197eb4973
183 183 parent: 0:f9ee2f85a263
184 184 user: test
185 185 date: Thu Jan 01 00:00:00 1970 +0000
186 186 summary: 1.1
187 187
188 188 changeset: 3:eebf5a27f8ca
189 189 user: test
190 190 date: Thu Jan 01 00:00:00 1970 +0000
191 191 summary: 0.3
192 192
193 193 changeset: 2:e38ba6f5b7e0
194 194 user: test
195 195 date: Thu Jan 01 00:00:00 1970 +0000
196 196 summary: 0.2
197 197
198 198 changeset: 1:34c2bf6b0626
199 199 user: test
200 200 date: Thu Jan 01 00:00:00 1970 +0000
201 201 summary: 0.1
202 202
203 203 changeset: 0:f9ee2f85a263
204 204 user: test
205 205 date: Thu Jan 01 00:00:00 1970 +0000
206 206 summary: 0.0
207 207
208 208 Make sure bundlerepo doesn't leak tempfiles (issue2491)
209 209
210 210 $ ls .hg
211 211 00changelog.i
212 212 cache
213 213 requires
214 214 store
215 215 wcache
216 216
217 217 Pull ../full.hg into empty (with hook)
218 218
219 219 $ cat >> .hg/hgrc <<EOF
220 220 > [hooks]
221 221 > changegroup = sh -c "printenv.py --line changegroup"
222 222 > EOF
223 223
224 224 doesn't work (yet ?)
225 225 NOTE: msys is mangling the URL below
226 226
227 227 hg -R bundle://../full.hg verify
228 228
229 229 $ hg pull bundle://../full.hg
230 230 pulling from bundle:../full.hg
231 231 requesting all changes
232 232 adding changesets
233 233 adding manifests
234 234 adding file changes
235 235 added 9 changesets with 7 changes to 4 files (+1 heads)
236 236 new changesets f9ee2f85a263:aa35859c02ea (9 drafts)
237 237 changegroup hook: HG_HOOKNAME=changegroup
238 238 HG_HOOKTYPE=changegroup
239 239 HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735
240 240 HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf
241 241 HG_SOURCE=pull
242 242 HG_TXNID=TXN:$ID$
243 243 HG_TXNNAME=pull
244 244 bundle:../full.hg (no-msys !)
245 245 bundle;../full.hg (msys !)
246 246 HG_URL=bundle:../full.hg (no-msys !)
247 247 HG_URL=bundle;../full.hg (msys !)
248 248
249 249 (run 'hg heads' to see heads, 'hg merge' to merge)
250 250
251 251 Rollback empty
252 252
253 253 $ hg rollback
254 254 repository tip rolled back to revision -1 (undo pull)
255 255 $ cd ..
256 256
257 257 Log -R bundle:empty+full.hg
258 258
259 259 $ hg -R bundle:empty+full.hg log --template="{rev} "; echo ""
260 260 8 7 6 5 4 3 2 1 0
261 261
262 262 Pull full.hg into empty again (using -R; with hook)
263 263
264 264 $ hg -R empty pull full.hg
265 265 pulling from full.hg
266 266 requesting all changes
267 267 adding changesets
268 268 adding manifests
269 269 adding file changes
270 270 added 9 changesets with 7 changes to 4 files (+1 heads)
271 271 new changesets f9ee2f85a263:aa35859c02ea (9 drafts)
272 272 changegroup hook: HG_HOOKNAME=changegroup
273 273 HG_HOOKTYPE=changegroup
274 274 HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735
275 275 HG_NODE_LAST=aa35859c02ea8bd48da5da68cd2740ac71afcbaf
276 276 HG_SOURCE=pull
277 277 HG_TXNID=TXN:$ID$
278 278 HG_TXNNAME=pull
279 279 bundle:empty+full.hg
280 280 HG_URL=bundle:empty+full.hg
281 281
282 282 (run 'hg heads' to see heads, 'hg merge' to merge)
283 283
284 284 #endif
285 285
286 286 Cannot produce streaming clone bundles with "hg bundle"
287 287
288 288 $ hg -R test bundle -t packed1 packed.hg
289 289 abort: packed bundles cannot be produced by "hg bundle"
290 290 (use 'hg debugcreatestreamclonebundle')
291 291 [10]
292 292
293 293 packed1 is produced properly
294 294
295 295 #if reporevlogstore
296 296
297 297 $ hg -R test debugcreatestreamclonebundle packed.hg
298 298 writing 2664 bytes for 6 files (no-zstd !)
299 299 writing 2665 bytes for 6 files (zstd !)
300 300 bundle requirements: generaldelta, revlogv1, sparserevlog (no-rust !)
301 301 bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog (rust !)
302 302
303 303 $ f -B 64 --size --sha1 --hexdump packed.hg
304 304 packed.hg: size=2840, sha1=12bf3eee3eb8a04c503ce2d29b48f0135c7edff5 (no-zstd !)
305 305 packed.hg: size=2841, sha1=8b645a65f49b0ae43042a9f3da56d4bfdf1c7f99 (zstd no-rust !)
306 306 packed.hg: size=2860, sha1=81d7a2e535892cda51e82c200f818de2cca828d3 (rust !)
307 307 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..........|
308 308 0010: 00 00 00 00 0a 68 00 23 67 65 6e 65 72 61 6c 64 |.....h.#generald| (no-zstd !)
309 309 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 2c 73 70 |elta,revlogv1,sp| (no-zstd !)
310 310 0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/| (no-zstd !)
311 311 0010: 00 00 00 00 0a 69 00 23 67 65 6e 65 72 61 6c 64 |.....i.#generald| (zstd no-rust !)
312 312 0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 2c 73 70 |elta,revlogv1,sp| (zstd no-rust !)
313 313 0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/| (zstd no-rust !)
314 314 0010: 00 00 00 00 0a 69 00 36 67 65 6e 65 72 61 6c 64 |.....i.6generald| (rust !)
315 315 0020: 65 6c 74 61 2c 70 65 72 73 69 73 74 65 6e 74 2d |elta,persistent-| (rust !)
316 316 0030: 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f 67 76 31 |nodemap,revlogv1| (rust !)
317 317
318 318 $ hg debugbundle --spec packed.hg
319 319 none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog (no-rust !)
320 320 none-packed1;requirements%3Dgeneraldelta%2Cpersistent-nodemap%2Crevlogv1%2Csparserevlog (rust !)
321 321
322 322 generaldelta requirement is not listed in stream clone bundles unless used
323 323
324 324 $ hg --config format.usegeneraldelta=false init testnongd
325 325 $ cd testnongd
326 326 $ touch foo
327 327 $ hg -q commit -A -m initial
328 328 $ cd ..
329 329 $ hg -R testnongd debugcreatestreamclonebundle packednongd.hg
330 330 writing 301 bytes for 3 files
331 331 bundle requirements: revlogv1 (no-rust !)
332 332 bundle requirements: persistent-nodemap, revlogv1 (rust !)
333 333
334 334 $ f -B 64 --size --sha1 --hexdump packednongd.hg
335 335 packednongd.hg: size=383, sha1=1d9c230238edd5d38907100b729ba72b1831fe6f (no-rust !)
336 336 packednongd.hg: size=402, sha1=d3cc1417f0e8142cf9340aaaa520b660ad3ec3ea (rust !)
337 337 0000: 48 47 53 31 55 4e 00 00 00 00 00 00 00 03 00 00 |HGS1UN..........|
338 338 0010: 00 00 00 00 01 2d 00 09 72 65 76 6c 6f 67 76 31 |.....-..revlogv1| (no-rust !)
339 339 0020: 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 34 0a 00 |.data/foo.i.64..| (no-rust !)
340 340 0030: 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| (no-rust !)
341 341 0010: 00 00 00 00 01 2d 00 1c 70 65 72 73 69 73 74 65 |.....-..persiste| (rust !)
342 342 0020: 6e 74 2d 6e 6f 64 65 6d 61 70 2c 72 65 76 6c 6f |nt-nodemap,revlo| (rust !)
343 343 0030: 67 76 31 00 64 61 74 61 2f 66 6f 6f 2e 69 00 36 |gv1.data/foo.i.6| (rust !)
344 344
345 345 $ hg debugbundle --spec packednongd.hg
346 346 none-packed1;requirements%3Drevlogv1 (no-rust !)
347 347 none-packed1;requirements%3Dpersistent-nodemap%2Crevlogv1 (rust !)
348 348
349 349 Warning emitted when packed bundles contain secret changesets
350 350
351 351 $ hg init testsecret
352 352 $ cd testsecret
353 353 $ touch foo
354 354 $ hg -q commit -A -m initial
355 355 $ hg phase --force --secret -r .
356 356 $ cd ..
357 357
358 358 $ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg
359 359 (warning: stream clone bundle will contain secret revisions)
360 360 writing 301 bytes for 3 files
361 361 bundle requirements: generaldelta, revlogv1, sparserevlog (no-rust !)
362 362 bundle requirements: generaldelta, persistent-nodemap, revlogv1, sparserevlog (rust !)
363 363
364 364 Unpacking packed1 bundles with "hg unbundle" isn't allowed
365 365
366 366 $ hg init packed
367 367 $ hg -R packed unbundle packed.hg
368 368 abort: packed bundles cannot be applied with "hg unbundle"
369 369 (use "hg debugapplystreamclonebundle")
370 370 [10]
371 371
372 372 packed1 can be consumed from debug command
373 373
374 374 (this also confirms that streamclone-ed changes are visible via
375 375 @filecache properties to in-process procedures before closing
376 376 transaction)
377 377
378 378 $ cat > $TESTTMP/showtip.py <<EOF
379 379 > from __future__ import absolute_import
380 380 >
381 381 > def showtip(ui, repo, hooktype, **kwargs):
382 382 > ui.warn(b'%s: %s\n' % (hooktype, repo[b'tip'].hex()[:12]))
383 383 >
384 384 > def reposetup(ui, repo):
385 385 > # this confirms (and ensures) that (empty) 00changelog.i
386 386 > # before streamclone is already cached as repo.changelog
387 387 > ui.setconfig(b'hooks', b'pretxnopen.showtip', showtip)
388 388 >
389 389 > # this confirms that streamclone-ed changes are visible to
390 390 > # in-process procedures before closing transaction
391 391 > ui.setconfig(b'hooks', b'pretxnclose.showtip', showtip)
392 392 >
393 393 > # this confirms that streamclone-ed changes are still visible
394 394 > # after closing transaction
395 395 > ui.setconfig(b'hooks', b'txnclose.showtip', showtip)
396 396 > EOF
397 397 $ cat >> $HGRCPATH <<EOF
398 398 > [extensions]
399 399 > showtip = $TESTTMP/showtip.py
400 400 > EOF
401 401
402 402 $ hg -R packed debugapplystreamclonebundle packed.hg
403 403 6 files to transfer, 2.60 KB of data
404 404 pretxnopen: 000000000000
405 405 pretxnclose: aa35859c02ea
406 transferred 2.60 KB in *.* seconds (* */sec) (glob)
406 transferred 2.60 KB in * seconds (* */sec) (glob)
407 407 txnclose: aa35859c02ea
408 408
409 409 (for safety, confirm visibility of streamclone-ed changes by another
410 410 process, too)
411 411
412 412 $ hg -R packed tip -T "{node|short}\n"
413 413 aa35859c02ea
414 414
415 415 $ cat >> $HGRCPATH <<EOF
416 416 > [extensions]
417 417 > showtip = !
418 418 > EOF
419 419
420 420 Does not work on non-empty repo
421 421
422 422 $ hg -R packed debugapplystreamclonebundle packed.hg
423 423 abort: cannot apply stream clone bundle on non-empty repo
424 424 [255]
425 425
426 426 #endif
427 427
428 428 Create partial clones
429 429
430 430 $ rm -r empty
431 431 $ hg init empty
432 432 $ hg clone -r 3 test partial
433 433 adding changesets
434 434 adding manifests
435 435 adding file changes
436 436 added 4 changesets with 4 changes to 1 files
437 437 new changesets f9ee2f85a263:eebf5a27f8ca
438 438 updating to branch default
439 439 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
440 440 $ hg clone partial partial2
441 441 updating to branch default
442 442 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
443 443 $ cd partial
444 444
445 445 #if repobundlerepo
446 446
447 447 Log -R full.hg in partial
448 448
449 449 $ hg -R bundle://../full.hg log -T phases
450 450 changeset: 8:aa35859c02ea
451 451 tag: tip
452 452 phase: draft
453 453 parent: 3:eebf5a27f8ca
454 454 user: test
455 455 date: Thu Jan 01 00:00:00 1970 +0000
456 456 summary: 0.3m
457 457
458 458 changeset: 7:a6a34bfa0076
459 459 phase: draft
460 460 user: test
461 461 date: Thu Jan 01 00:00:00 1970 +0000
462 462 summary: 1.3m
463 463
464 464 changeset: 6:7373c1169842
465 465 phase: draft
466 466 user: test
467 467 date: Thu Jan 01 00:00:00 1970 +0000
468 468 summary: 1.3
469 469
470 470 changeset: 5:1bb50a9436a7
471 471 phase: draft
472 472 user: test
473 473 date: Thu Jan 01 00:00:00 1970 +0000
474 474 summary: 1.2
475 475
476 476 changeset: 4:095197eb4973
477 477 phase: draft
478 478 parent: 0:f9ee2f85a263
479 479 user: test
480 480 date: Thu Jan 01 00:00:00 1970 +0000
481 481 summary: 1.1
482 482
483 483 changeset: 3:eebf5a27f8ca
484 484 phase: public
485 485 user: test
486 486 date: Thu Jan 01 00:00:00 1970 +0000
487 487 summary: 0.3
488 488
489 489 changeset: 2:e38ba6f5b7e0
490 490 phase: public
491 491 user: test
492 492 date: Thu Jan 01 00:00:00 1970 +0000
493 493 summary: 0.2
494 494
495 495 changeset: 1:34c2bf6b0626
496 496 phase: public
497 497 user: test
498 498 date: Thu Jan 01 00:00:00 1970 +0000
499 499 summary: 0.1
500 500
501 501 changeset: 0:f9ee2f85a263
502 502 phase: public
503 503 user: test
504 504 date: Thu Jan 01 00:00:00 1970 +0000
505 505 summary: 0.0
506 506
507 507
508 508 Incoming full.hg in partial
509 509
510 510 $ hg incoming bundle://../full.hg
511 511 comparing with bundle:../full.hg
512 512 searching for changes
513 513 changeset: 4:095197eb4973
514 514 parent: 0:f9ee2f85a263
515 515 user: test
516 516 date: Thu Jan 01 00:00:00 1970 +0000
517 517 summary: 1.1
518 518
519 519 changeset: 5:1bb50a9436a7
520 520 user: test
521 521 date: Thu Jan 01 00:00:00 1970 +0000
522 522 summary: 1.2
523 523
524 524 changeset: 6:7373c1169842
525 525 user: test
526 526 date: Thu Jan 01 00:00:00 1970 +0000
527 527 summary: 1.3
528 528
529 529 changeset: 7:a6a34bfa0076
530 530 user: test
531 531 date: Thu Jan 01 00:00:00 1970 +0000
532 532 summary: 1.3m
533 533
534 534 changeset: 8:aa35859c02ea
535 535 tag: tip
536 536 parent: 3:eebf5a27f8ca
537 537 user: test
538 538 date: Thu Jan 01 00:00:00 1970 +0000
539 539 summary: 0.3m
540 540
541 541
542 542 Outgoing -R full.hg vs partial2 in partial
543 543
544 544 $ hg -R bundle://../full.hg outgoing ../partial2
545 545 comparing with ../partial2
546 546 searching for changes
547 547 changeset: 4:095197eb4973
548 548 parent: 0:f9ee2f85a263
549 549 user: test
550 550 date: Thu Jan 01 00:00:00 1970 +0000
551 551 summary: 1.1
552 552
553 553 changeset: 5:1bb50a9436a7
554 554 user: test
555 555 date: Thu Jan 01 00:00:00 1970 +0000
556 556 summary: 1.2
557 557
558 558 changeset: 6:7373c1169842
559 559 user: test
560 560 date: Thu Jan 01 00:00:00 1970 +0000
561 561 summary: 1.3
562 562
563 563 changeset: 7:a6a34bfa0076
564 564 user: test
565 565 date: Thu Jan 01 00:00:00 1970 +0000
566 566 summary: 1.3m
567 567
568 568 changeset: 8:aa35859c02ea
569 569 tag: tip
570 570 parent: 3:eebf5a27f8ca
571 571 user: test
572 572 date: Thu Jan 01 00:00:00 1970 +0000
573 573 summary: 0.3m
574 574
575 575
576 576 Outgoing -R does-not-exist.hg vs partial2 in partial
577 577
578 578 $ hg -R bundle://../does-not-exist.hg outgoing ../partial2
579 579 abort: *../does-not-exist.hg* (glob)
580 580 [255]
581 581
582 582 #endif
583 583
584 584 $ cd ..
585 585
586 586 hide outer repo
587 587 $ hg init
588 588
589 589 Direct clone from bundle (all-history)
590 590
591 591 #if repobundlerepo
592 592
593 593 $ hg clone full.hg full-clone
594 594 requesting all changes
595 595 adding changesets
596 596 adding manifests
597 597 adding file changes
598 598 added 9 changesets with 7 changes to 4 files (+1 heads)
599 599 new changesets f9ee2f85a263:aa35859c02ea (9 drafts)
600 600 updating to branch default
601 601 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
602 602 $ hg -R full-clone heads
603 603 changeset: 8:aa35859c02ea
604 604 tag: tip
605 605 parent: 3:eebf5a27f8ca
606 606 user: test
607 607 date: Thu Jan 01 00:00:00 1970 +0000
608 608 summary: 0.3m
609 609
610 610 changeset: 7:a6a34bfa0076
611 611 user: test
612 612 date: Thu Jan 01 00:00:00 1970 +0000
613 613 summary: 1.3m
614 614
615 615 $ rm -r full-clone
616 616
617 617 When cloning from a non-copiable repository into '', do not
618 618 recurse infinitely (issue2528)
619 619
620 620 $ hg clone full.hg ''
621 621 abort: empty destination path is not valid
622 622 [10]
623 623
624 624 test for https://bz.mercurial-scm.org/216
625 625
626 626 Unbundle incremental bundles into fresh empty in one go
627 627
628 628 $ rm -r empty
629 629 $ hg init empty
630 630 $ hg -R test bundle --base null -r 0 ../0.hg
631 631 1 changesets found
632 632 $ hg -R test bundle --base 0 -r 1 ../1.hg
633 633 1 changesets found
634 634 $ hg -R empty unbundle -u ../0.hg ../1.hg
635 635 adding changesets
636 636 adding manifests
637 637 adding file changes
638 638 added 1 changesets with 1 changes to 1 files
639 639 new changesets f9ee2f85a263 (1 drafts)
640 640 adding changesets
641 641 adding manifests
642 642 adding file changes
643 643 added 1 changesets with 1 changes to 1 files
644 644 new changesets 34c2bf6b0626 (1 drafts)
645 645 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
646 646
647 647 View full contents of the bundle
648 648 $ hg -R test bundle --base null -r 3 ../partial.hg
649 649 4 changesets found
650 650 $ cd test
651 651 $ hg -R ../../partial.hg log -r "bundle()"
652 652 changeset: 0:f9ee2f85a263
653 653 user: test
654 654 date: Thu Jan 01 00:00:00 1970 +0000
655 655 summary: 0.0
656 656
657 657 changeset: 1:34c2bf6b0626
658 658 user: test
659 659 date: Thu Jan 01 00:00:00 1970 +0000
660 660 summary: 0.1
661 661
662 662 changeset: 2:e38ba6f5b7e0
663 663 user: test
664 664 date: Thu Jan 01 00:00:00 1970 +0000
665 665 summary: 0.2
666 666
667 667 changeset: 3:eebf5a27f8ca
668 668 user: test
669 669 date: Thu Jan 01 00:00:00 1970 +0000
670 670 summary: 0.3
671 671
672 672 $ cd ..
673 673
674 674 #endif
675 675
676 676 test for 540d1059c802
677 677
678 678 $ hg init orig
679 679 $ cd orig
680 680 $ echo foo > foo
681 681 $ hg add foo
682 682 $ hg ci -m 'add foo'
683 683
684 684 $ hg clone . ../copy
685 685 updating to branch default
686 686 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
687 687 $ hg tag foo
688 688
689 689 $ cd ../copy
690 690 $ echo >> foo
691 691 $ hg ci -m 'change foo'
692 692 $ hg bundle ../bundle.hg ../orig
693 693 searching for changes
694 694 1 changesets found
695 695
696 696 $ cd ..
697 697
698 698 #if repobundlerepo
699 699 $ cd orig
700 700 $ hg incoming ../bundle.hg
701 701 comparing with ../bundle.hg
702 702 searching for changes
703 703 changeset: 2:ed1b79f46b9a
704 704 tag: tip
705 705 parent: 0:bbd179dfa0a7
706 706 user: test
707 707 date: Thu Jan 01 00:00:00 1970 +0000
708 708 summary: change foo
709 709
710 710 $ cd ..
711 711
712 712 test bundle with # in the filename (issue2154):
713 713
714 714 $ cp bundle.hg 'test#bundle.hg'
715 715 $ cd orig
716 716 $ hg incoming '../test#bundle.hg'
717 717 comparing with ../test
718 718 abort: unknown revision 'bundle.hg'
719 719 [255]
720 720
721 721 note that percent encoding is not handled:
722 722
723 723 $ hg incoming ../test%23bundle.hg
724 724 abort: repository ../test%23bundle.hg not found
725 725 [255]
726 726 $ cd ..
727 727
728 728 #endif
729 729
730 730 test to bundle revisions on the newly created branch (issue3828):
731 731
732 732 $ hg -q clone -U test test-clone
733 733 $ cd test
734 734
735 735 $ hg -q branch foo
736 736 $ hg commit -m "create foo branch"
737 737 $ hg -q outgoing ../test-clone
738 738 9:b4f5acb1ee27
739 739 $ hg -q bundle --branch foo foo.hg ../test-clone
740 740 #if repobundlerepo
741 741 $ hg -R foo.hg -q log -r "bundle()"
742 742 9:b4f5acb1ee27
743 743 #endif
744 744
745 745 $ cd ..
746 746
747 747 test for https://bz.mercurial-scm.org/1144
748 748
749 749 test that verify bundle does not traceback
750 750
751 751 partial history bundle, fails w/ unknown parent
752 752
753 753 $ hg -R bundle.hg verify
754 754 abort: 00changelog@bbd179dfa0a71671c253b3ae0aa1513b60d199fa: unknown parent
755 755 [50]
756 756
757 757 full history bundle, refuses to verify non-local repo
758 758
759 759 #if repobundlerepo
760 760 $ hg -R all.hg verify
761 761 abort: cannot verify bundle or remote repos
762 762 [255]
763 763 #endif
764 764
765 765 but, regular verify must continue to work
766 766
767 767 $ hg -R orig verify
768 768 checking changesets
769 769 checking manifests
770 770 crosschecking files in changesets and manifests
771 771 checking files
772 772 checked 2 changesets with 2 changes to 2 files
773 773
774 774 #if repobundlerepo
775 775 diff against bundle
776 776
777 777 $ hg init b
778 778 $ cd b
779 779 $ hg -R ../all.hg diff -r tip
780 780 diff -r aa35859c02ea anotherfile
781 781 --- a/anotherfile Thu Jan 01 00:00:00 1970 +0000
782 782 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
783 783 @@ -1,4 +0,0 @@
784 784 -0
785 785 -1
786 786 -2
787 787 -3
788 788 $ cd ..
789 789 #endif
790 790
791 791 bundle single branch
792 792
793 793 $ hg init branchy
794 794 $ cd branchy
795 795 $ echo a >a
796 796 $ echo x >x
797 797 $ hg ci -Ama
798 798 adding a
799 799 adding x
800 800 $ echo c >c
801 801 $ echo xx >x
802 802 $ hg ci -Amc
803 803 adding c
804 804 $ echo c1 >c1
805 805 $ hg ci -Amc1
806 806 adding c1
807 807 $ hg up 0
808 808 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
809 809 $ echo b >b
810 810 $ hg ci -Amb
811 811 adding b
812 812 created new head
813 813 $ echo b1 >b1
814 814 $ echo xx >x
815 815 $ hg ci -Amb1
816 816 adding b1
817 817 $ hg clone -q -r2 . part
818 818
819 819 == bundling via incoming
820 820
821 821 $ hg in -R part --bundle incoming.hg --template "{node}\n" .
822 822 comparing with .
823 823 searching for changes
824 824 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a
825 825 057f4db07f61970e1c11e83be79e9d08adc4dc31
826 826
827 827 == bundling
828 828
829 829 $ hg bundle bundle.hg part --debug --config progress.debug=true
830 830 query 1; heads
831 831 searching for changes
832 832 all remote heads known locally
833 833 2 changesets found
834 834 list of changesets:
835 835 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a
836 836 057f4db07f61970e1c11e83be79e9d08adc4dc31
837 837 bundle2-output-bundle: "HG20", (1 params) 2 parts total
838 838 bundle2-output-part: "changegroup" (params: 1 mandatory 1 advisory) streamed payload
839 839 changesets: 1/2 chunks (50.00%)
840 840 changesets: 2/2 chunks (100.00%)
841 841 manifests: 1/2 chunks (50.00%)
842 842 manifests: 2/2 chunks (100.00%)
843 843 files: b 1/3 files (33.33%)
844 844 files: b1 2/3 files (66.67%)
845 845 files: x 3/3 files (100.00%)
846 846 bundle2-output-part: "cache:rev-branch-cache" (advisory) streamed payload
847 847
848 848 #if repobundlerepo
849 849 == Test for issue3441
850 850
851 851 $ hg clone -q -r0 . part2
852 852 $ hg -q -R part2 pull bundle.hg
853 853 $ hg -R part2 verify
854 854 checking changesets
855 855 checking manifests
856 856 crosschecking files in changesets and manifests
857 857 checking files
858 858 checked 3 changesets with 5 changes to 4 files
859 859 #endif
860 860
861 861 == Test bundling no commits
862 862
863 863 $ hg bundle -r 'public()' no-output.hg
864 864 abort: no commits to bundle
865 865 [10]
866 866
867 867 $ cd ..
868 868
869 869 When user merges to the revision existing only in the bundle,
870 870 it should show warning that second parent of the working
871 871 directory does not exist
872 872
873 873 $ hg init update2bundled
874 874 $ cd update2bundled
875 875 $ cat <<EOF >> .hg/hgrc
876 876 > [extensions]
877 877 > strip =
878 878 > EOF
879 879 $ echo "aaa" >> a
880 880 $ hg commit -A -m 0
881 881 adding a
882 882 $ echo "bbb" >> b
883 883 $ hg commit -A -m 1
884 884 adding b
885 885 $ echo "ccc" >> c
886 886 $ hg commit -A -m 2
887 887 adding c
888 888 $ hg update -r 1
889 889 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
890 890 $ echo "ddd" >> d
891 891 $ hg commit -A -m 3
892 892 adding d
893 893 created new head
894 894 $ hg update -r 2
895 895 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
896 896 $ hg log -G
897 897 o changeset: 3:8bd3e1f196af
898 898 | tag: tip
899 899 | parent: 1:a01eca7af26d
900 900 | user: test
901 901 | date: Thu Jan 01 00:00:00 1970 +0000
902 902 | summary: 3
903 903 |
904 904 | @ changeset: 2:4652c276ac4f
905 905 |/ user: test
906 906 | date: Thu Jan 01 00:00:00 1970 +0000
907 907 | summary: 2
908 908 |
909 909 o changeset: 1:a01eca7af26d
910 910 | user: test
911 911 | date: Thu Jan 01 00:00:00 1970 +0000
912 912 | summary: 1
913 913 |
914 914 o changeset: 0:4fe08cd4693e
915 915 user: test
916 916 date: Thu Jan 01 00:00:00 1970 +0000
917 917 summary: 0
918 918
919 919
920 920 #if repobundlerepo
921 921 $ hg bundle --base 1 -r 3 ../update2bundled.hg
922 922 1 changesets found
923 923 $ hg strip -r 3
924 924 saved backup bundle to $TESTTMP/update2bundled/.hg/strip-backup/8bd3e1f196af-017e56d8-backup.hg
925 925 $ hg merge -R ../update2bundled.hg -r 3
926 926 setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle
927 927 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
928 928 (branch merge, don't forget to commit)
929 929
930 930 When user updates to the revision existing only in the bundle,
931 931 it should show warning
932 932
933 933 $ hg update -R ../update2bundled.hg --clean -r 3
934 934 setting parent to node 8bd3e1f196af289b2b121be08031e76d7ae92098 that only exists in the bundle
935 935 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
936 936
937 937 When user updates to the revision existing in the local repository
938 938 the warning shouldn't be emitted
939 939
940 940 $ hg update -R ../update2bundled.hg -r 0
941 941 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
942 942 #endif
943 943
944 944 Test the option that create slim bundle
945 945
946 946 $ hg bundle -a --config devel.bundle.delta=p1 ./slim.hg
947 947 3 changesets found
948 948
949 949 Test the option that create and no-delta's bundle
950 950 $ hg bundle -a --config devel.bundle.delta=full ./full.hg
951 951 3 changesets found
@@ -1,889 +1,889 b''
1 1 #require serve no-reposimplestore no-chg
2 2
3 3 #testcases stream-legacy stream-bundle2
4 4
5 5 #if stream-legacy
6 6 $ cat << EOF >> $HGRCPATH
7 7 > [server]
8 8 > bundle2.stream = no
9 9 > EOF
10 10 #endif
11 11
12 12 Initialize repository
13 13 the status call is to check for issue5130
14 14
15 15 $ hg init server
16 16 $ cd server
17 17 $ touch foo
18 18 $ hg -q commit -A -m initial
19 19 >>> for i in range(1024):
20 20 ... with open(str(i), 'wb') as fh:
21 21 ... fh.write(b"%d" % i) and None
22 22 $ hg -q commit -A -m 'add a lot of files'
23 23 $ hg st
24 24
25 25 add files with "tricky" name:
26 26
27 27 $ echo foo > 00changelog.i
28 28 $ echo foo > 00changelog.d
29 29 $ echo foo > 00changelog.n
30 30 $ echo foo > 00changelog-ab349180a0405010.nd
31 31 $ echo foo > 00manifest.i
32 32 $ echo foo > 00manifest.d
33 33 $ echo foo > foo.i
34 34 $ echo foo > foo.d
35 35 $ echo foo > foo.n
36 36 $ echo foo > undo.py
37 37 $ echo foo > undo.i
38 38 $ echo foo > undo.d
39 39 $ echo foo > undo.n
40 40 $ echo foo > undo.foo.i
41 41 $ echo foo > undo.foo.d
42 42 $ echo foo > undo.foo.n
43 43 $ echo foo > undo.babar
44 44 $ mkdir savanah
45 45 $ echo foo > savanah/foo.i
46 46 $ echo foo > savanah/foo.d
47 47 $ echo foo > savanah/foo.n
48 48 $ echo foo > savanah/undo.py
49 49 $ echo foo > savanah/undo.i
50 50 $ echo foo > savanah/undo.d
51 51 $ echo foo > savanah/undo.n
52 52 $ echo foo > savanah/undo.foo.i
53 53 $ echo foo > savanah/undo.foo.d
54 54 $ echo foo > savanah/undo.foo.n
55 55 $ echo foo > savanah/undo.babar
56 56 $ mkdir data
57 57 $ echo foo > data/foo.i
58 58 $ echo foo > data/foo.d
59 59 $ echo foo > data/foo.n
60 60 $ echo foo > data/undo.py
61 61 $ echo foo > data/undo.i
62 62 $ echo foo > data/undo.d
63 63 $ echo foo > data/undo.n
64 64 $ echo foo > data/undo.foo.i
65 65 $ echo foo > data/undo.foo.d
66 66 $ echo foo > data/undo.foo.n
67 67 $ echo foo > data/undo.babar
68 68 $ mkdir meta
69 69 $ echo foo > meta/foo.i
70 70 $ echo foo > meta/foo.d
71 71 $ echo foo > meta/foo.n
72 72 $ echo foo > meta/undo.py
73 73 $ echo foo > meta/undo.i
74 74 $ echo foo > meta/undo.d
75 75 $ echo foo > meta/undo.n
76 76 $ echo foo > meta/undo.foo.i
77 77 $ echo foo > meta/undo.foo.d
78 78 $ echo foo > meta/undo.foo.n
79 79 $ echo foo > meta/undo.babar
80 80 $ mkdir store
81 81 $ echo foo > store/foo.i
82 82 $ echo foo > store/foo.d
83 83 $ echo foo > store/foo.n
84 84 $ echo foo > store/undo.py
85 85 $ echo foo > store/undo.i
86 86 $ echo foo > store/undo.d
87 87 $ echo foo > store/undo.n
88 88 $ echo foo > store/undo.foo.i
89 89 $ echo foo > store/undo.foo.d
90 90 $ echo foo > store/undo.foo.n
91 91 $ echo foo > store/undo.babar
92 92
93 93 Name with special characters
94 94
95 95 $ echo foo > store/CΓ©lesteVille_is_a_Capital_City
96 96
97 97 Add all that
98 98
99 99 $ hg add .
100 100 adding 00changelog-ab349180a0405010.nd
101 101 adding 00changelog.d
102 102 adding 00changelog.i
103 103 adding 00changelog.n
104 104 adding 00manifest.d
105 105 adding 00manifest.i
106 106 adding data/foo.d
107 107 adding data/foo.i
108 108 adding data/foo.n
109 109 adding data/undo.babar
110 110 adding data/undo.d
111 111 adding data/undo.foo.d
112 112 adding data/undo.foo.i
113 113 adding data/undo.foo.n
114 114 adding data/undo.i
115 115 adding data/undo.n
116 116 adding data/undo.py
117 117 adding foo.d
118 118 adding foo.i
119 119 adding foo.n
120 120 adding meta/foo.d
121 121 adding meta/foo.i
122 122 adding meta/foo.n
123 123 adding meta/undo.babar
124 124 adding meta/undo.d
125 125 adding meta/undo.foo.d
126 126 adding meta/undo.foo.i
127 127 adding meta/undo.foo.n
128 128 adding meta/undo.i
129 129 adding meta/undo.n
130 130 adding meta/undo.py
131 131 adding savanah/foo.d
132 132 adding savanah/foo.i
133 133 adding savanah/foo.n
134 134 adding savanah/undo.babar
135 135 adding savanah/undo.d
136 136 adding savanah/undo.foo.d
137 137 adding savanah/undo.foo.i
138 138 adding savanah/undo.foo.n
139 139 adding savanah/undo.i
140 140 adding savanah/undo.n
141 141 adding savanah/undo.py
142 142 adding store/C\xc3\xa9lesteVille_is_a_Capital_City (esc)
143 143 adding store/foo.d
144 144 adding store/foo.i
145 145 adding store/foo.n
146 146 adding store/undo.babar
147 147 adding store/undo.d
148 148 adding store/undo.foo.d
149 149 adding store/undo.foo.i
150 150 adding store/undo.foo.n
151 151 adding store/undo.i
152 152 adding store/undo.n
153 153 adding store/undo.py
154 154 adding undo.babar
155 155 adding undo.d
156 156 adding undo.foo.d
157 157 adding undo.foo.i
158 158 adding undo.foo.n
159 159 adding undo.i
160 160 adding undo.n
161 161 adding undo.py
162 162 $ hg ci -m 'add files with "tricky" name'
163 163 $ hg --config server.uncompressed=false serve -p $HGPORT -d --pid-file=hg.pid
164 164 $ cat hg.pid > $DAEMON_PIDS
165 165 $ cd ..
166 166
167 167 Check local clone
168 168 ==================
169 169
170 170 The logic is close enough of uncompressed.
171 171 This is present here to reuse the testing around file with "special" names.
172 172
173 173 $ hg clone server local-clone
174 174 updating to branch default
175 175 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved
176 176
177 177 Check uncompressed
178 178 ==================
179 179
180 180 Cannot stream clone when server.uncompressed is set
181 181
182 182 $ get-with-headers.py $LOCALIP:$HGPORT '?cmd=stream_out'
183 183 200 Script output follows
184 184
185 185 1
186 186
187 187 #if stream-legacy
188 188 $ hg debugcapabilities http://localhost:$HGPORT
189 189 Main capabilities:
190 190 batch
191 191 branchmap
192 192 $USUAL_BUNDLE2_CAPS_SERVER$
193 193 changegroupsubset
194 194 compression=$BUNDLE2_COMPRESSIONS$
195 195 getbundle
196 196 httpheader=1024
197 197 httpmediatype=0.1rx,0.1tx,0.2tx
198 198 known
199 199 lookup
200 200 pushkey
201 201 unbundle=HG10GZ,HG10BZ,HG10UN
202 202 unbundlehash
203 203 Bundle2 capabilities:
204 204 HG20
205 205 bookmarks
206 206 changegroup
207 207 01
208 208 02
209 209 checkheads
210 210 related
211 211 digests
212 212 md5
213 213 sha1
214 214 sha512
215 215 error
216 216 abort
217 217 unsupportedcontent
218 218 pushraced
219 219 pushkey
220 220 hgtagsfnodes
221 221 listkeys
222 222 phases
223 223 heads
224 224 pushkey
225 225 remote-changegroup
226 226 http
227 227 https
228 228
229 229 $ hg clone --stream -U http://localhost:$HGPORT server-disabled
230 230 warning: stream clone requested but server has them disabled
231 231 requesting all changes
232 232 adding changesets
233 233 adding manifests
234 234 adding file changes
235 235 added 3 changesets with 1087 changes to 1087 files
236 236 new changesets 96ee1d7354c4:42e820400e84
237 237
238 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 239 200 Script output follows
240 240 content-type: application/mercurial-0.2
241 241
242 242
243 243 $ f --size body --hexdump --bytes 100
244 244 body: size=232
245 245 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
246 246 0010: cf 0b 45 52 52 4f 52 3a 41 42 4f 52 54 00 00 00 |..ERROR:ABORT...|
247 247 0020: 00 01 01 07 3c 04 72 6d 65 73 73 61 67 65 73 74 |....<.rmessagest|
248 248 0030: 72 65 61 6d 20 64 61 74 61 20 72 65 71 75 65 73 |ream data reques|
249 249 0040: 74 65 64 20 62 75 74 20 73 65 72 76 65 72 20 64 |ted but server d|
250 250 0050: 6f 65 73 20 6e 6f 74 20 61 6c 6c 6f 77 20 74 68 |oes not allow th|
251 251 0060: 69 73 20 66 |is f|
252 252
253 253 #endif
254 254 #if stream-bundle2
255 255 $ hg debugcapabilities http://localhost:$HGPORT
256 256 Main capabilities:
257 257 batch
258 258 branchmap
259 259 $USUAL_BUNDLE2_CAPS_SERVER$
260 260 changegroupsubset
261 261 compression=$BUNDLE2_COMPRESSIONS$
262 262 getbundle
263 263 httpheader=1024
264 264 httpmediatype=0.1rx,0.1tx,0.2tx
265 265 known
266 266 lookup
267 267 pushkey
268 268 unbundle=HG10GZ,HG10BZ,HG10UN
269 269 unbundlehash
270 270 Bundle2 capabilities:
271 271 HG20
272 272 bookmarks
273 273 changegroup
274 274 01
275 275 02
276 276 checkheads
277 277 related
278 278 digests
279 279 md5
280 280 sha1
281 281 sha512
282 282 error
283 283 abort
284 284 unsupportedcontent
285 285 pushraced
286 286 pushkey
287 287 hgtagsfnodes
288 288 listkeys
289 289 phases
290 290 heads
291 291 pushkey
292 292 remote-changegroup
293 293 http
294 294 https
295 295
296 296 $ hg clone --stream -U http://localhost:$HGPORT server-disabled
297 297 warning: stream clone requested but server has them disabled
298 298 requesting all changes
299 299 adding changesets
300 300 adding manifests
301 301 adding file changes
302 302 added 3 changesets with 1087 changes to 1087 files
303 303 new changesets 96ee1d7354c4:42e820400e84
304 304
305 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 306 200 Script output follows
307 307 content-type: application/mercurial-0.2
308 308
309 309
310 310 $ f --size body --hexdump --bytes 100
311 311 body: size=232
312 312 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
313 313 0010: cf 0b 45 52 52 4f 52 3a 41 42 4f 52 54 00 00 00 |..ERROR:ABORT...|
314 314 0020: 00 01 01 07 3c 04 72 6d 65 73 73 61 67 65 73 74 |....<.rmessagest|
315 315 0030: 72 65 61 6d 20 64 61 74 61 20 72 65 71 75 65 73 |ream data reques|
316 316 0040: 74 65 64 20 62 75 74 20 73 65 72 76 65 72 20 64 |ted but server d|
317 317 0050: 6f 65 73 20 6e 6f 74 20 61 6c 6c 6f 77 20 74 68 |oes not allow th|
318 318 0060: 69 73 20 66 |is f|
319 319
320 320 #endif
321 321
322 322 $ killdaemons.py
323 323 $ cd server
324 324 $ hg serve -p $HGPORT -d --pid-file=hg.pid --error errors.txt
325 325 $ cat hg.pid > $DAEMON_PIDS
326 326 $ cd ..
327 327
328 328 Basic clone
329 329
330 330 #if stream-legacy
331 331 $ hg clone --stream -U http://localhost:$HGPORT clone1
332 332 streaming all changes
333 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 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 337 searching for changes
338 338 no changes found
339 339 $ cat server/errors.txt
340 340 #endif
341 341 #if stream-bundle2
342 342 $ hg clone --stream -U http://localhost:$HGPORT clone1
343 343 streaming all changes
344 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 346 1092 files to transfer, 98.6 KB of data (zstd !)
347 347 transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !)
348 348
349 349 $ ls -1 clone1/.hg/cache
350 350 branch2-base
351 351 branch2-immutable
352 352 branch2-served
353 353 branch2-served.hidden
354 354 branch2-visible
355 355 branch2-visible-hidden
356 356 rbc-names-v1
357 357 rbc-revs-v1
358 358 tags2
359 359 tags2-served
360 360 $ cat server/errors.txt
361 361 #endif
362 362
363 363 getbundle requests with stream=1 are uncompressed
364 364
365 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 366 200 Script output follows
367 367 content-type: application/mercurial-0.2
368 368
369 369
370 370 #if no-zstd no-rust
371 371 $ f --size --hex --bytes 256 body
372 372 body: size=118737
373 373 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
374 374 0010: 80 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
375 375 0020: 06 09 04 0c 44 62 79 74 65 63 6f 75 6e 74 31 30 |....Dbytecount10|
376 376 0030: 33 38 33 34 66 69 6c 65 63 6f 75 6e 74 31 30 39 |3834filecount109|
377 377 0040: 32 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |2requirementsdot|
378 378 0050: 65 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 |encode%2Cfncache|
379 379 0060: 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 |%2Cgeneraldelta%|
380 380 0070: 32 43 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 |2Crevlogv1%2Cspa|
381 381 0080: 72 73 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 |rserevlog%2Cstor|
382 382 0090: 65 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 |e....s.Bdata/0.i|
383 383 00a0: 00 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 |................|
384 384 00b0: 00 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff |................|
385 385 00c0: 80 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c |.)c.I.#....Vg.g,|
386 386 00d0: 69 d1 ec 39 00 00 00 00 00 00 00 00 00 00 00 00 |i..9............|
387 387 00e0: 75 30 73 26 45 64 61 74 61 2f 30 30 63 68 61 6e |u0s&Edata/00chan|
388 388 00f0: 67 65 6c 6f 67 2d 61 62 33 34 39 31 38 30 61 30 |gelog-ab349180a0|
389 389 #endif
390 390 #if zstd no-rust
391 391 $ f --size --hex --bytes 256 body
392 392 body: size=115921
393 393 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
394 394 0010: 9a 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
395 395 0020: 06 09 04 0c 5e 62 79 74 65 63 6f 75 6e 74 31 30 |....^bytecount10|
396 396 0030: 30 39 39 32 66 69 6c 65 63 6f 75 6e 74 31 30 39 |0992filecount109|
397 397 0040: 32 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |2requirementsdot|
398 398 0050: 65 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 |encode%2Cfncache|
399 399 0060: 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 |%2Cgeneraldelta%|
400 400 0070: 32 43 72 65 76 6c 6f 67 2d 63 6f 6d 70 72 65 73 |2Crevlog-compres|
401 401 0080: 73 69 6f 6e 2d 7a 73 74 64 25 32 43 72 65 76 6c |sion-zstd%2Crevl|
402 402 0090: 6f 67 76 31 25 32 43 73 70 61 72 73 65 72 65 76 |ogv1%2Csparserev|
403 403 00a0: 6c 6f 67 25 32 43 73 74 6f 72 65 00 00 80 00 73 |log%2Cstore....s|
404 404 00b0: 08 42 64 61 74 61 2f 30 2e 69 00 03 00 01 00 00 |.Bdata/0.i......|
405 405 00c0: 00 00 00 00 00 02 00 00 00 01 00 00 00 00 00 00 |................|
406 406 00d0: 00 01 ff ff ff ff ff ff ff ff 80 29 63 a0 49 d3 |...........)c.I.|
407 407 00e0: 23 87 bf ce fe 56 67 92 67 2c 69 d1 ec 39 00 00 |#....Vg.g,i..9..|
408 408 00f0: 00 00 00 00 00 00 00 00 00 00 75 30 73 26 45 64 |..........u0s&Ed|
409 409 #endif
410 410 #if zstd rust no-dirstate-v2
411 411 $ f --size --hex --bytes 256 body
412 412 body: size=115942
413 413 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
414 414 0010: af 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
415 415 0020: 06 09 04 0c 73 62 79 74 65 63 6f 75 6e 74 31 30 |....sbytecount10|
416 416 0030: 30 39 39 32 66 69 6c 65 63 6f 75 6e 74 31 30 39 |0992filecount109|
417 417 0040: 32 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 |2requirementsdot|
418 418 0050: 65 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 |encode%2Cfncache|
419 419 0060: 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 |%2Cgeneraldelta%|
420 420 0070: 32 43 70 65 72 73 69 73 74 65 6e 74 2d 6e 6f 64 |2Cpersistent-nod|
421 421 0080: 65 6d 61 70 25 32 43 72 65 76 6c 6f 67 2d 63 6f |emap%2Crevlog-co|
422 422 0090: 6d 70 72 65 73 73 69 6f 6e 2d 7a 73 74 64 25 32 |mpression-zstd%2|
423 423 00a0: 43 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 72 |Crevlogv1%2Cspar|
424 424 00b0: 73 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 65 |serevlog%2Cstore|
425 425 00c0: 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 00 |....s.Bdata/0.i.|
426 426 00d0: 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 00 |................|
427 427 00e0: 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff 80 |................|
428 428 00f0: 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c 69 |)c.I.#....Vg.g,i|
429 429 #endif
430 430 #if zstd dirstate-v2
431 431 $ f --size --hex --bytes 256 body
432 432 body: size=109549
433 433 0000: 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20.......|
434 434 0010: c0 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2.......|
435 435 0020: 05 09 04 0c 85 62 79 74 65 63 6f 75 6e 74 39 35 |.....bytecount95|
436 436 0030: 38 39 37 66 69 6c 65 63 6f 75 6e 74 31 30 33 30 |897filecount1030|
437 437 0040: 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 65 |requirementsdote|
438 438 0050: 6e 63 6f 64 65 25 32 43 65 78 70 2d 64 69 72 73 |ncode%2Cexp-dirs|
439 439 0060: 74 61 74 65 2d 76 32 25 32 43 66 6e 63 61 63 68 |tate-v2%2Cfncach|
440 440 0070: 65 25 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 |e%2Cgeneraldelta|
441 441 0080: 25 32 43 70 65 72 73 69 73 74 65 6e 74 2d 6e 6f |%2Cpersistent-no|
442 442 0090: 64 65 6d 61 70 25 32 43 72 65 76 6c 6f 67 2d 63 |demap%2Crevlog-c|
443 443 00a0: 6f 6d 70 72 65 73 73 69 6f 6e 2d 7a 73 74 64 25 |ompression-zstd%|
444 444 00b0: 32 43 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 |2Crevlogv1%2Cspa|
445 445 00c0: 72 73 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 |rserevlog%2Cstor|
446 446 00d0: 65 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 |e....s.Bdata/0.i|
447 447 00e0: 00 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 |................|
448 448 00f0: 00 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff |................|
449 449 #endif
450 450
451 451 --uncompressed is an alias to --stream
452 452
453 453 #if stream-legacy
454 454 $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed
455 455 streaming all changes
456 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 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 460 searching for changes
461 461 no changes found
462 462 #endif
463 463 #if stream-bundle2
464 464 $ hg clone --uncompressed -U http://localhost:$HGPORT clone1-uncompressed
465 465 streaming all changes
466 466 1092 files to transfer, 101 KB of data (no-zstd !)
467 467 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
468 468 1092 files to transfer, 98.6 KB of data (zstd !)
469 469 transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !)
470 470 #endif
471 471
472 472 Clone with background file closing enabled
473 473
474 474 #if stream-legacy
475 475 $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding
476 476 using http://localhost:$HGPORT/
477 477 sending capabilities command
478 478 sending branchmap command
479 479 streaming all changes
480 480 sending stream_out command
481 481 1089 files to transfer, 101 KB of data (no-zstd !)
482 482 1089 files to transfer, 98.5 KB of data (zstd !)
483 483 starting 4 threads for background file closing
484 484 updating the branch cache
485 transferred 101 KB in * seconds (*/sec) (glob) (no-zstd !)
486 transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !)
485 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
486 transferred 98.5 KB in * seconds (* */sec) (glob) (zstd !)
487 487 query 1; heads
488 488 sending batch command
489 489 searching for changes
490 490 all remote heads known locally
491 491 no changes found
492 492 sending getbundle command
493 493 bundle2-input-bundle: with-transaction
494 494 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
495 495 bundle2-input-part: "phase-heads" supported
496 496 bundle2-input-part: total payload size 24
497 497 bundle2-input-bundle: 2 parts total
498 498 checking for updated bookmarks
499 499 updating the branch cache
500 500 (sent 5 HTTP requests and * bytes; received * bytes in responses) (glob)
501 501 #endif
502 502 #if stream-bundle2
503 503 $ hg --debug --config worker.backgroundclose=true --config worker.backgroundcloseminfilecount=1 clone --stream -U http://localhost:$HGPORT clone-background | grep -v adding
504 504 using http://localhost:$HGPORT/
505 505 sending capabilities command
506 506 query 1; heads
507 507 sending batch command
508 508 streaming all changes
509 509 sending getbundle command
510 510 bundle2-input-bundle: with-transaction
511 511 bundle2-input-part: "stream2" (params: 3 mandatory) supported
512 512 applying stream bundle
513 513 1092 files to transfer, 101 KB of data (no-zstd !)
514 514 1092 files to transfer, 98.6 KB of data (zstd !)
515 515 starting 4 threads for background file closing
516 516 starting 4 threads for background file closing
517 517 updating the branch cache
518 518 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
519 519 bundle2-input-part: total payload size 118568 (no-zstd !)
520 520 transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !)
521 521 bundle2-input-part: total payload size 115726 (zstd !)
522 522 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
523 523 bundle2-input-bundle: 2 parts total
524 524 checking for updated bookmarks
525 525 updating the branch cache
526 526 (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob)
527 527 #endif
528 528
529 529 Cannot stream clone when there are secret changesets
530 530
531 531 $ hg -R server phase --force --secret -r tip
532 532 $ hg clone --stream -U http://localhost:$HGPORT secret-denied
533 533 warning: stream clone requested but server has them disabled
534 534 requesting all changes
535 535 adding changesets
536 536 adding manifests
537 537 adding file changes
538 538 added 2 changesets with 1025 changes to 1025 files
539 539 new changesets 96ee1d7354c4:c17445101a72
540 540
541 541 $ killdaemons.py
542 542
543 543 Streaming of secrets can be overridden by server config
544 544
545 545 $ cd server
546 546 $ hg serve --config server.uncompressedallowsecret=true -p $HGPORT -d --pid-file=hg.pid
547 547 $ cat hg.pid > $DAEMON_PIDS
548 548 $ cd ..
549 549
550 550 #if stream-legacy
551 551 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
552 552 streaming all changes
553 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 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 557 searching for changes
558 558 no changes found
559 559 #endif
560 560 #if stream-bundle2
561 561 $ hg clone --stream -U http://localhost:$HGPORT secret-allowed
562 562 streaming all changes
563 563 1092 files to transfer, 101 KB of data (no-zstd !)
564 564 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
565 565 1092 files to transfer, 98.6 KB of data (zstd !)
566 566 transferred 98.6 KB in * seconds (* */sec) (glob) (zstd !)
567 567 #endif
568 568
569 569 $ killdaemons.py
570 570
571 571 Verify interaction between preferuncompressed and secret presence
572 572
573 573 $ cd server
574 574 $ hg serve --config server.preferuncompressed=true -p $HGPORT -d --pid-file=hg.pid
575 575 $ cat hg.pid > $DAEMON_PIDS
576 576 $ cd ..
577 577
578 578 $ hg clone -U http://localhost:$HGPORT preferuncompressed-secret
579 579 requesting all changes
580 580 adding changesets
581 581 adding manifests
582 582 adding file changes
583 583 added 2 changesets with 1025 changes to 1025 files
584 584 new changesets 96ee1d7354c4:c17445101a72
585 585
586 586 $ killdaemons.py
587 587
588 588 Clone not allowed when full bundles disabled and can't serve secrets
589 589
590 590 $ cd server
591 591 $ hg serve --config server.disablefullbundle=true -p $HGPORT -d --pid-file=hg.pid
592 592 $ cat hg.pid > $DAEMON_PIDS
593 593 $ cd ..
594 594
595 595 $ hg clone --stream http://localhost:$HGPORT secret-full-disabled
596 596 warning: stream clone requested but server has them disabled
597 597 requesting all changes
598 598 remote: abort: server has pull-based clones disabled
599 599 abort: pull failed on remote
600 600 (remove --pull if specified or upgrade Mercurial)
601 601 [100]
602 602
603 603 Local stream clone with secrets involved
604 604 (This is just a test over behavior: if you have access to the repo's files,
605 605 there is no security so it isn't important to prevent a clone here.)
606 606
607 607 $ hg clone -U --stream server local-secret
608 608 warning: stream clone requested but server has them disabled
609 609 requesting all changes
610 610 adding changesets
611 611 adding manifests
612 612 adding file changes
613 613 added 2 changesets with 1025 changes to 1025 files
614 614 new changesets 96ee1d7354c4:c17445101a72
615 615
616 616 Stream clone while repo is changing:
617 617
618 618 $ mkdir changing
619 619 $ cd changing
620 620
621 621 extension for delaying the server process so we reliably can modify the repo
622 622 while cloning
623 623
624 624 $ cat > stream_steps.py <<EOF
625 625 > import os
626 626 > import sys
627 627 > from mercurial import (
628 628 > encoding,
629 629 > extensions,
630 630 > streamclone,
631 631 > testing,
632 632 > )
633 633 > WALKED_FILE_1 = encoding.environ[b'HG_TEST_STREAM_WALKED_FILE_1']
634 634 > WALKED_FILE_2 = encoding.environ[b'HG_TEST_STREAM_WALKED_FILE_2']
635 635 >
636 636 > def _test_sync_point_walk_1(orig, repo):
637 637 > testing.write_file(WALKED_FILE_1)
638 638 >
639 639 > def _test_sync_point_walk_2(orig, repo):
640 640 > assert repo._currentlock(repo._lockref) is None
641 641 > testing.wait_file(WALKED_FILE_2)
642 642 >
643 643 > extensions.wrapfunction(
644 644 > streamclone,
645 645 > '_test_sync_point_walk_1',
646 646 > _test_sync_point_walk_1
647 647 > )
648 648 > extensions.wrapfunction(
649 649 > streamclone,
650 650 > '_test_sync_point_walk_2',
651 651 > _test_sync_point_walk_2
652 652 > )
653 653 > EOF
654 654
655 655 prepare repo with small and big file to cover both code paths in emitrevlogdata
656 656
657 657 $ hg init repo
658 658 $ touch repo/f1
659 659 $ $TESTDIR/seq.py 50000 > repo/f2
660 660 $ hg -R repo ci -Aqm "0"
661 661 $ HG_TEST_STREAM_WALKED_FILE_1="$TESTTMP/sync_file_walked_1"
662 662 $ export HG_TEST_STREAM_WALKED_FILE_1
663 663 $ HG_TEST_STREAM_WALKED_FILE_2="$TESTTMP/sync_file_walked_2"
664 664 $ export HG_TEST_STREAM_WALKED_FILE_2
665 665 $ HG_TEST_STREAM_WALKED_FILE_3="$TESTTMP/sync_file_walked_3"
666 666 $ export HG_TEST_STREAM_WALKED_FILE_3
667 667 # $ cat << EOF >> $HGRCPATH
668 668 # > [hooks]
669 669 # > pre-clone=rm -f "$TESTTMP/sync_file_walked_*"
670 670 # > EOF
671 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 672 $ cat hg.pid >> $DAEMON_PIDS
673 673
674 674 clone while modifying the repo between stating file with write lock and
675 675 actually serving file content
676 676
677 677 $ (hg clone -q --stream -U http://localhost:$HGPORT1 clone; touch "$HG_TEST_STREAM_WALKED_FILE_3") &
678 678 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_1
679 679 $ echo >> repo/f1
680 680 $ echo >> repo/f2
681 681 $ hg -R repo ci -m "1" --config ui.timeout.warn=-1
682 682 $ touch $HG_TEST_STREAM_WALKED_FILE_2
683 683 $ $RUNTESTDIR/testlib/wait-on-file 10 $HG_TEST_STREAM_WALKED_FILE_3
684 684 $ hg -R clone id
685 685 000000000000
686 686 $ cat errors.log
687 687 $ cd ..
688 688
689 689 Stream repository with bookmarks
690 690 --------------------------------
691 691
692 692 (revert introduction of secret changeset)
693 693
694 694 $ hg -R server phase --draft 'secret()'
695 695
696 696 add a bookmark
697 697
698 698 $ hg -R server bookmark -r tip some-bookmark
699 699
700 700 clone it
701 701
702 702 #if stream-legacy
703 703 $ hg clone --stream http://localhost:$HGPORT with-bookmarks
704 704 streaming all changes
705 705 1089 files to transfer, 101 KB of data (no-zstd !)
706 706 transferred 101 KB in * seconds (*) (glob) (no-zstd !)
707 707 1089 files to transfer, 98.5 KB of data (zstd !)
708 708 transferred 98.5 KB in * seconds (*/sec) (glob) (zstd !)
709 709 searching for changes
710 710 no changes found
711 711 updating to branch default
712 712 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved
713 713 #endif
714 714 #if stream-bundle2
715 715 $ hg clone --stream http://localhost:$HGPORT with-bookmarks
716 716 streaming all changes
717 717 1095 files to transfer, 102 KB of data (no-zstd !)
718 718 transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
719 719 1095 files to transfer, 98.8 KB of data (zstd !)
720 720 transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !)
721 721 updating to branch default
722 722 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved
723 723 #endif
724 724 $ hg verify -R with-bookmarks
725 725 checking changesets
726 726 checking manifests
727 727 crosschecking files in changesets and manifests
728 728 checking files
729 729 checked 3 changesets with 1087 changes to 1087 files
730 730 $ hg -R with-bookmarks bookmarks
731 731 some-bookmark 2:42e820400e84
732 732
733 733 Stream repository with phases
734 734 -----------------------------
735 735
736 736 Clone as publishing
737 737
738 738 $ hg -R server phase -r 'all()'
739 739 0: draft
740 740 1: draft
741 741 2: draft
742 742
743 743 #if stream-legacy
744 744 $ hg clone --stream http://localhost:$HGPORT phase-publish
745 745 streaming all changes
746 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 (* */sec) (glob) (no-zstd !)
748 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 750 searching for changes
751 751 no changes found
752 752 updating to branch default
753 753 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved
754 754 #endif
755 755 #if stream-bundle2
756 756 $ hg clone --stream http://localhost:$HGPORT phase-publish
757 757 streaming all changes
758 758 1095 files to transfer, 102 KB of data (no-zstd !)
759 759 transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
760 760 1095 files to transfer, 98.8 KB of data (zstd !)
761 761 transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !)
762 762 updating to branch default
763 763 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved
764 764 #endif
765 765 $ hg verify -R phase-publish
766 766 checking changesets
767 767 checking manifests
768 768 crosschecking files in changesets and manifests
769 769 checking files
770 770 checked 3 changesets with 1087 changes to 1087 files
771 771 $ hg -R phase-publish phase -r 'all()'
772 772 0: public
773 773 1: public
774 774 2: public
775 775
776 776 Clone as non publishing
777 777
778 778 $ cat << EOF >> server/.hg/hgrc
779 779 > [phases]
780 780 > publish = False
781 781 > EOF
782 782 $ killdaemons.py
783 783 $ hg -R server serve -p $HGPORT -d --pid-file=hg.pid
784 784 $ cat hg.pid > $DAEMON_PIDS
785 785
786 786 #if stream-legacy
787 787
788 788 With v1 of the stream protocol, changeset are always cloned as public. It make
789 789 stream v1 unsuitable for non-publishing repository.
790 790
791 791 $ hg clone --stream http://localhost:$HGPORT phase-no-publish
792 792 streaming all changes
793 793 1089 files to transfer, 101 KB of data (no-zstd !)
794 794 transferred 101 KB in * seconds (* */sec) (glob) (no-zstd !)
795 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 797 searching for changes
798 798 no changes found
799 799 updating to branch default
800 800 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved
801 801 $ hg -R phase-no-publish phase -r 'all()'
802 802 0: public
803 803 1: public
804 804 2: public
805 805 #endif
806 806 #if stream-bundle2
807 807 $ hg clone --stream http://localhost:$HGPORT phase-no-publish
808 808 streaming all changes
809 809 1096 files to transfer, 102 KB of data (no-zstd !)
810 810 transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
811 811 1096 files to transfer, 98.8 KB of data (zstd !)
812 812 transferred 98.8 KB in * seconds (* */sec) (glob) (zstd !)
813 813 updating to branch default
814 814 1087 files updated, 0 files merged, 0 files removed, 0 files unresolved
815 815 $ hg -R phase-no-publish phase -r 'all()'
816 816 0: draft
817 817 1: draft
818 818 2: draft
819 819 #endif
820 820 $ hg verify -R phase-no-publish
821 821 checking changesets
822 822 checking manifests
823 823 crosschecking files in changesets and manifests
824 824 checking files
825 825 checked 3 changesets with 1087 changes to 1087 files
826 826
827 827 $ killdaemons.py
828 828
829 829 #if stream-legacy
830 830
831 831 With v1 of the stream protocol, changeset are always cloned as public. There's
832 832 no obsolescence markers exchange in stream v1.
833 833
834 834 #endif
835 835 #if stream-bundle2
836 836
837 837 Stream repository with obsolescence
838 838 -----------------------------------
839 839
840 840 Clone non-publishing with obsolescence
841 841
842 842 $ cat >> $HGRCPATH << EOF
843 843 > [experimental]
844 844 > evolution=all
845 845 > EOF
846 846
847 847 $ cd server
848 848 $ echo foo > foo
849 849 $ hg -q commit -m 'about to be pruned'
850 850 $ hg debugobsolete `hg log -r . -T '{node}'` -d '0 0' -u test --record-parents
851 851 1 new obsolescence markers
852 852 obsoleted 1 changesets
853 853 $ hg up null -q
854 854 $ hg log -T '{rev}: {phase}\n'
855 855 2: draft
856 856 1: draft
857 857 0: draft
858 858 $ hg serve -p $HGPORT -d --pid-file=hg.pid
859 859 $ cat hg.pid > $DAEMON_PIDS
860 860 $ cd ..
861 861
862 862 $ hg clone -U --stream http://localhost:$HGPORT with-obsolescence
863 863 streaming all changes
864 864 1097 files to transfer, 102 KB of data (no-zstd !)
865 865 transferred 102 KB in * seconds (* */sec) (glob) (no-zstd !)
866 866 1097 files to transfer, 99.2 KB of data (zstd !)
867 867 transferred 99.2 KB in * seconds (* */sec) (glob) (zstd !)
868 868 $ hg -R with-obsolescence log -T '{rev}: {phase}\n'
869 869 2: draft
870 870 1: draft
871 871 0: draft
872 872 $ hg debugobsolete -R with-obsolescence
873 873 e53e122156df12330d3a0b72351e3a84bfd14195 0 {42e820400e843bc479ad36068ff772a69c8affe9} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
874 874 $ hg verify -R with-obsolescence
875 875 checking changesets
876 876 checking manifests
877 877 crosschecking files in changesets and manifests
878 878 checking files
879 879 checked 4 changesets with 1088 changes to 1087 files
880 880
881 881 $ hg clone -U --stream --config experimental.evolution=0 http://localhost:$HGPORT with-obsolescence-no-evolution
882 882 streaming all changes
883 883 remote: abort: server has obsolescence markers, but client cannot receive them via stream clone
884 884 abort: pull failed on remote
885 885 [100]
886 886
887 887 $ killdaemons.py
888 888
889 889 #endif
@@ -1,412 +1,413 b''
1 1 #require serve
2 2
3 3 This test is a duplicate of 'test-http.t', feel free to factor out
4 4 parts that are not bundle1/bundle2 specific.
5 5
6 6 $ cat << EOF >> $HGRCPATH
7 7 > [devel]
8 8 > # This test is dedicated to interaction through old bundle
9 9 > legacy.exchange = bundle1
10 10 > EOF
11 11
12 12 $ hg init test
13 13 $ cd test
14 14 $ echo foo>foo
15 15 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
16 16 $ echo foo>foo.d/foo
17 17 $ echo bar>foo.d/bAr.hg.d/BaR
18 18 $ echo bar>foo.d/baR.d.hg/bAR
19 19 $ hg commit -A -m 1
20 20 adding foo
21 21 adding foo.d/bAr.hg.d/BaR
22 22 adding foo.d/baR.d.hg/bAR
23 23 adding foo.d/foo
24 24 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
25 25 $ hg serve --config server.uncompressed=False -p $HGPORT1 -d --pid-file=../hg2.pid
26 26
27 27 Test server address cannot be reused
28 28
29 29 $ hg serve -p $HGPORT1 2>&1
30 30 abort: cannot start server at 'localhost:$HGPORT1': $EADDRINUSE$
31 31 [255]
32 32
33 33 $ cd ..
34 34 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
35 35
36 36 clone via stream
37 37
38 38 #if no-reposimplestore
39 39 $ hg clone --stream http://localhost:$HGPORT/ copy 2>&1
40 40 streaming all changes
41 41 6 files to transfer, 606 bytes of data (no-zstd !)
42 42 6 files to transfer, 608 bytes of data (zstd !)
43 43 transferred * bytes in * seconds (*/sec) (glob)
44 44 searching for changes
45 45 no changes found
46 46 updating to branch default
47 47 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
48 48 $ hg verify -R copy
49 49 checking changesets
50 50 checking manifests
51 51 crosschecking files in changesets and manifests
52 52 checking files
53 53 checked 1 changesets with 4 changes to 4 files
54 54 #endif
55 55
56 56 try to clone via stream, should use pull instead
57 57
58 58 $ hg clone --stream http://localhost:$HGPORT1/ copy2
59 59 warning: stream clone requested but server has them disabled
60 60 requesting all changes
61 61 adding changesets
62 62 adding manifests
63 63 adding file changes
64 64 added 1 changesets with 4 changes to 4 files
65 65 new changesets 8b6053c928fe
66 66 updating to branch default
67 67 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
68 68
69 69 try to clone via stream but missing requirements, so should use pull instead
70 70
71 71 $ cat > $TESTTMP/removesupportedformat.py << EOF
72 72 > from mercurial import localrepo
73 73 > def extsetup(ui):
74 74 > localrepo.localrepository.supportedformats.remove(b'generaldelta')
75 75 > EOF
76 76
77 77 $ hg clone --config extensions.rsf=$TESTTMP/removesupportedformat.py --stream http://localhost:$HGPORT/ copy3
78 78 warning: stream clone requested but client is missing requirements: generaldelta
79 79 (see https://www.mercurial-scm.org/wiki/MissingRequirement for more information)
80 80 requesting all changes
81 81 adding changesets
82 82 adding manifests
83 83 adding file changes
84 84 added 1 changesets with 4 changes to 4 files
85 85 new changesets 8b6053c928fe
86 86 updating to branch default
87 87 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
88 88
89 89 clone via pull
90 90
91 91 $ hg clone http://localhost:$HGPORT1/ copy-pull
92 92 requesting all changes
93 93 adding changesets
94 94 adding manifests
95 95 adding file changes
96 96 added 1 changesets with 4 changes to 4 files
97 97 new changesets 8b6053c928fe
98 98 updating to branch default
99 99 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
100 100 $ hg verify -R copy-pull
101 101 checking changesets
102 102 checking manifests
103 103 crosschecking files in changesets and manifests
104 104 checking files
105 105 checked 1 changesets with 4 changes to 4 files
106 106 $ cd test
107 107 $ echo bar > bar
108 108 $ hg commit -A -d '1 0' -m 2
109 109 adding bar
110 110 $ cd ..
111 111
112 112 clone over http with --update
113 113
114 114 $ hg clone http://localhost:$HGPORT1/ updated --update 0
115 115 requesting all changes
116 116 adding changesets
117 117 adding manifests
118 118 adding file changes
119 119 added 2 changesets with 5 changes to 5 files
120 120 new changesets 8b6053c928fe:5fed3813f7f5
121 121 updating to branch default
122 122 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
123 123 $ hg log -r . -R updated
124 124 changeset: 0:8b6053c928fe
125 125 user: test
126 126 date: Thu Jan 01 00:00:00 1970 +0000
127 127 summary: 1
128 128
129 129 $ rm -rf updated
130 130
131 131 incoming via HTTP
132 132
133 133 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
134 134 adding changesets
135 135 adding manifests
136 136 adding file changes
137 137 added 1 changesets with 4 changes to 4 files
138 138 new changesets 8b6053c928fe
139 139 updating to branch default
140 140 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
141 141 $ cd partial
142 142 $ touch LOCAL
143 143 $ hg ci -qAm LOCAL
144 144 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
145 145 comparing with http://localhost:$HGPORT1/
146 146 searching for changes
147 147 2
148 148 $ cd ..
149 149
150 150 pull
151 151
152 152 $ cd copy-pull
153 153 $ cat >> .hg/hgrc <<EOF
154 154 > [hooks]
155 155 > changegroup = sh -c "printenv.py --line changegroup"
156 156 > EOF
157 157 $ hg pull
158 158 pulling from http://localhost:$HGPORT1/
159 159 searching for changes
160 160 adding changesets
161 161 adding manifests
162 162 adding file changes
163 163 added 1 changesets with 1 changes to 1 files
164 164 new changesets 5fed3813f7f5
165 165 changegroup hook: HG_HOOKNAME=changegroup
166 166 HG_HOOKTYPE=changegroup
167 167 HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d
168 168 HG_NODE_LAST=5fed3813f7f5e1824344fdc9cf8f63bb662c292d
169 169 HG_SOURCE=pull
170 170 HG_TXNID=TXN:$ID$
171 171 HG_TXNNAME=pull
172 172 http://localhost:$HGPORT1/
173 173 HG_URL=http://localhost:$HGPORT1/
174 174
175 175 (run 'hg update' to get a working copy)
176 176 $ cd ..
177 177
178 178 clone from invalid URL
179 179
180 180 $ hg clone http://localhost:$HGPORT/bad
181 181 abort: HTTP Error 404: Not Found
182 182 [100]
183 183
184 184 test http authentication
185 185 + use the same server to test server side streaming preference
186 186
187 187 $ cd test
188 188
189 189 $ hg serve --config extensions.x=$TESTDIR/httpserverauth.py -p $HGPORT2 -d \
190 190 > --pid-file=pid --config server.preferuncompressed=True \
191 191 > --config web.push_ssl=False --config web.allow_push=* -A ../access.log
192 192 $ cat pid >> $DAEMON_PIDS
193 193
194 194 $ cat << EOF > get_pass.py
195 195 > from mercurial import util
196 196 > def newgetpass():
197 197 > return "pass"
198 198 > util.get_password = newgetpass
199 199 > EOF
200 200
201 201 $ hg id http://localhost:$HGPORT2/
202 202 abort: http authorization required for http://localhost:$HGPORT2/
203 203 [255]
204 204 $ hg id http://localhost:$HGPORT2/
205 205 abort: http authorization required for http://localhost:$HGPORT2/
206 206 [255]
207 207 $ hg id --config ui.interactive=true --config extensions.getpass=get_pass.py http://user@localhost:$HGPORT2/
208 208 http authorization required for http://localhost:$HGPORT2/
209 209 realm: mercurial
210 210 user: user
211 211 password: 5fed3813f7f5
212 212 $ hg id http://user:pass@localhost:$HGPORT2/
213 213 5fed3813f7f5
214 214 $ echo '[auth]' >> .hg/hgrc
215 215 $ echo 'l.schemes=http' >> .hg/hgrc
216 216 $ echo 'l.prefix=lo' >> .hg/hgrc
217 217 $ echo 'l.username=user' >> .hg/hgrc
218 218 $ echo 'l.password=pass' >> .hg/hgrc
219 219 $ hg id http://localhost:$HGPORT2/
220 220 5fed3813f7f5
221 221 $ hg id http://localhost:$HGPORT2/
222 222 5fed3813f7f5
223 223 $ hg id http://user@localhost:$HGPORT2/
224 224 5fed3813f7f5
225 225
226 226 #if no-reposimplestore
227 227 $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
228 228 streaming all changes
229 229 7 files to transfer, 916 bytes of data (no-zstd !)
230 230 7 files to transfer, 919 bytes of data (zstd !)
231 231 transferred * bytes in * seconds (*/sec) (glob)
232 232 searching for changes
233 233 no changes found
234 234 updating to branch default
235 235 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
236 236 #endif
237 237
238 238 --pull should override server's preferuncompressed
239 239
240 240 $ hg clone --pull http://user:pass@localhost:$HGPORT2/ dest-pull 2>&1
241 241 requesting all changes
242 242 adding changesets
243 243 adding manifests
244 244 adding file changes
245 245 added 2 changesets with 5 changes to 5 files
246 246 new changesets 8b6053c928fe:5fed3813f7f5
247 247 updating to branch default
248 248 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
249 249
250 250 $ hg id http://user2@localhost:$HGPORT2/
251 251 abort: http authorization required for http://localhost:$HGPORT2/
252 252 [255]
253 253 $ hg id http://user:pass2@localhost:$HGPORT2/
254 254 abort: HTTP Error 403: no
255 255 [100]
256 256
257 257 $ hg -R dest-pull tag -r tip top
258 258 $ hg -R dest-pull push http://user:pass@localhost:$HGPORT2/
259 259 pushing to http://user:***@localhost:$HGPORT2/
260 260 searching for changes
261 261 remote: adding changesets
262 262 remote: adding manifests
263 263 remote: adding file changes
264 264 remote: added 1 changesets with 1 changes to 1 files
265 265 $ hg rollback -q
266 266
267 267 $ sed 's/.*] "/"/' < ../access.log
268 268 "GET /?cmd=capabilities HTTP/1.1" 401 -
269 269 "GET /?cmd=capabilities HTTP/1.1" 401 -
270 270 "GET /?cmd=capabilities HTTP/1.1" 401 -
271 271 "GET /?cmd=capabilities HTTP/1.1" 200 -
272 272 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
273 273 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
274 274 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
275 275 "GET /?cmd=capabilities HTTP/1.1" 401 -
276 276 "GET /?cmd=capabilities HTTP/1.1" 200 -
277 277 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
278 278 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
279 279 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
280 280 "GET /?cmd=capabilities HTTP/1.1" 401 -
281 281 "GET /?cmd=capabilities HTTP/1.1" 200 -
282 282 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
283 283 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
284 284 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
285 285 "GET /?cmd=capabilities HTTP/1.1" 401 -
286 286 "GET /?cmd=capabilities HTTP/1.1" 200 -
287 287 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
288 288 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
289 289 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
290 290 "GET /?cmd=capabilities HTTP/1.1" 401 -
291 291 "GET /?cmd=capabilities HTTP/1.1" 200 -
292 292 "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
293 293 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=namespaces x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
294 294 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
295 295 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
296 296 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
297 297 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
298 298 "GET /?cmd=stream_out HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
299 299 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
300 300 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
301 301 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
302 302 "GET /?cmd=capabilities HTTP/1.1" 401 - (no-reposimplestore !)
303 303 "GET /?cmd=capabilities HTTP/1.1" 200 - (no-reposimplestore !)
304 304 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (no-reposimplestore !)
305 305 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
306 306 "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=5fed3813f7f5e1824344fdc9cf8f63bb662c292d x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
307 307 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
308 308 "GET /?cmd=capabilities HTTP/1.1" 401 -
309 309 "GET /?cmd=capabilities HTTP/1.1" 401 -
310 310 "GET /?cmd=capabilities HTTP/1.1" 403 -
311 311 "GET /?cmd=capabilities HTTP/1.1" 401 -
312 312 "GET /?cmd=capabilities HTTP/1.1" 200 -
313 313 "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D7f4e523d01f2cc3765ac8934da3d14db775ff872 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
314 314 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
315 315 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
316 316 "GET /?cmd=branchmap HTTP/1.1" 200 - x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
317 317 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
318 318 "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+5eb5abfefeea63c80dd7553bcc3783f37e0c5524* (glob)
319 319 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
320 320
321 321 $ cd ..
322 322
323 323 clone of serve with repo in root and unserved subrepo (issue2970)
324 324
325 325 $ hg --cwd test init sub
326 326 $ echo empty > test/sub/empty
327 327 $ hg --cwd test/sub add empty
328 328 $ hg --cwd test/sub commit -qm 'add empty'
329 329 $ hg --cwd test/sub tag -r 0 something
330 330 $ echo sub = sub > test/.hgsub
331 331 $ hg --cwd test add .hgsub
332 332 $ hg --cwd test commit -qm 'add subrepo'
333 333 $ hg clone http://localhost:$HGPORT noslash-clone
334 334 requesting all changes
335 335 adding changesets
336 336 adding manifests
337 337 adding file changes
338 338 added 3 changesets with 7 changes to 7 files
339 339 new changesets 8b6053c928fe:56f9bc90cce6
340 340 updating to branch default
341 341 cloning subrepo sub from http://localhost:$HGPORT/sub
342 342 abort: HTTP Error 404: Not Found
343 343 [100]
344 344 $ hg clone http://localhost:$HGPORT/ slash-clone
345 345 requesting all changes
346 346 adding changesets
347 347 adding manifests
348 348 adding file changes
349 349 added 3 changesets with 7 changes to 7 files
350 350 new changesets 8b6053c928fe:56f9bc90cce6
351 351 updating to branch default
352 352 cloning subrepo sub from http://localhost:$HGPORT/sub
353 353 abort: HTTP Error 404: Not Found
354 354 [100]
355 355
356 356 check error log
357 357
358 358 $ cat error.log
359 359
360 360 Check error reporting while pulling/cloning
361 361
362 362 $ $RUNTESTDIR/killdaemons.py
363 363 $ hg serve -R test -p $HGPORT -d --pid-file=hg3.pid -E error.log --config extensions.crash=${TESTDIR}/crashgetbundler.py
364 364 $ cat hg3.pid >> $DAEMON_PIDS
365 365 $ hg clone http://localhost:$HGPORT/ abort-clone
366 366 requesting all changes
367 367 abort: remote error:
368 368 this is an exercise
369 369 [100]
370 370 $ cat error.log
371 371
372 372 disable pull-based clones
373 373
374 374 $ hg serve -R test -p $HGPORT1 -d --pid-file=hg4.pid -E error.log --config server.disablefullbundle=True
375 375 $ cat hg4.pid >> $DAEMON_PIDS
376 376 $ hg clone http://localhost:$HGPORT1/ disable-pull-clone
377 377 requesting all changes
378 378 abort: remote error:
379 379 server has pull-based clones disabled
380 380 [100]
381 381
382 382 #if no-reposimplestore
383 383 ... but keep stream clones working
384 384
385 385 $ hg clone --stream --noupdate http://localhost:$HGPORT1/ test-stream-clone
386 386 streaming all changes
387 387 * files to transfer, * of data (glob)
388 transferred * in * seconds (* KB/sec) (glob)
388 transferred 1.36 KB in * seconds (* */sec) (glob) (no-zstd !)
389 transferred 1.38 KB in * seconds (* */sec) (glob) (zstd !)
389 390 searching for changes
390 391 no changes found
391 392 #endif
392 393
393 394 ... and also keep partial clones and pulls working
394 395 $ hg clone http://localhost:$HGPORT1 --rev 0 test-partial-clone
395 396 adding changesets
396 397 adding manifests
397 398 adding file changes
398 399 added 1 changesets with 4 changes to 4 files
399 400 new changesets 8b6053c928fe
400 401 updating to branch default
401 402 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
402 403 $ hg pull -R test-partial-clone
403 404 pulling from http://localhost:$HGPORT1/
404 405 searching for changes
405 406 adding changesets
406 407 adding manifests
407 408 adding file changes
408 409 added 2 changesets with 3 changes to 3 files
409 410 new changesets 5fed3813f7f5:56f9bc90cce6
410 411 (run 'hg update' to get a working copy)
411 412
412 413 $ cat error.log
@@ -1,184 +1,184 b''
1 1 #require no-reposimplestore
2 2
3 3 Test creating a consuming stream bundle v2
4 4
5 5 $ getmainid() {
6 6 > hg -R main log --template '{node}\n' --rev "$1"
7 7 > }
8 8
9 9 $ cp $HGRCPATH $TESTTMP/hgrc.orig
10 10
11 11 $ cat >> $HGRCPATH << EOF
12 12 > [experimental]
13 13 > evolution.createmarkers=True
14 14 > evolution.exchange=True
15 15 > bundle2-output-capture=True
16 16 > [ui]
17 17 > ssh="$PYTHON" "$TESTDIR/dummyssh"
18 18 > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
19 19 > [web]
20 20 > push_ssl = false
21 21 > allow_push = *
22 22 > [phases]
23 23 > publish=False
24 24 > [extensions]
25 25 > drawdag=$TESTDIR/drawdag.py
26 26 > clonebundles=
27 27 > EOF
28 28
29 29 The extension requires a repo (currently unused)
30 30
31 31 $ hg init main
32 32 $ cd main
33 33
34 34 $ hg debugdrawdag <<'EOF'
35 35 > E
36 36 > |
37 37 > D
38 38 > |
39 39 > C
40 40 > |
41 41 > B
42 42 > |
43 43 > A
44 44 > EOF
45 45
46 46 $ hg bundle -a --type="none-v2;stream=v2" bundle.hg
47 47 $ hg debugbundle bundle.hg
48 48 Stream params: {}
49 49 stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (no-zstd !)
50 50 stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (zstd no-rust !)
51 51 stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (rust no-dirstate-v2 !)
52 52 stream2 -- {bytecount: 1693, filecount: 11, requirements: dotencode%2Cexp-dirstate-v2%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore} (mandatory: True) (dirstate-v2 !)
53 53 $ hg debugbundle --spec bundle.hg
54 54 none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Csparserevlog%2Cstore (no-zstd !)
55 55 none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (zstd no-rust !)
56 56 none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (rust no-dirstate-v2 !)
57 57 none-v2;stream=v2;requirements%3Ddotencode%2Cexp-dirstate-v2%2Cfncache%2Cgeneraldelta%2Cpersistent-nodemap%2Crevlog-compression-zstd%2Crevlogv1%2Csparserevlog%2Cstore (dirstate-v2 !)
58 58
59 59 Test that we can apply the bundle as a stream clone bundle
60 60
61 61 $ cat > .hg/clonebundles.manifest << EOF
62 62 > http://localhost:$HGPORT1/bundle.hg BUNDLESPEC=`hg debugbundle --spec bundle.hg`
63 63 > EOF
64 64
65 65 $ hg serve -d -p $HGPORT --pid-file hg.pid --accesslog access.log
66 66 $ cat hg.pid >> $DAEMON_PIDS
67 67
68 68 $ "$PYTHON" $TESTDIR/dumbhttp.py -p $HGPORT1 --pid http.pid
69 69 $ cat http.pid >> $DAEMON_PIDS
70 70
71 71 $ cd ..
72 72 $ hg clone http://localhost:$HGPORT streamv2-clone-implicit --debug
73 73 using http://localhost:$HGPORT/
74 74 sending capabilities command
75 75 sending clonebundles command
76 76 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
77 77 bundle2-input-bundle: with-transaction
78 78 bundle2-input-part: "stream2" (params: 3 mandatory) supported
79 79 applying stream bundle
80 80 11 files to transfer, 1.65 KB of data
81 81 starting 4 threads for background file closing (?)
82 82 starting 4 threads for background file closing (?)
83 83 adding [s] data/A.i (66 bytes)
84 84 adding [s] data/B.i (66 bytes)
85 85 adding [s] data/C.i (66 bytes)
86 86 adding [s] data/D.i (66 bytes)
87 87 adding [s] data/E.i (66 bytes)
88 88 adding [s] 00manifest.i (584 bytes)
89 89 adding [s] 00changelog.i (595 bytes)
90 90 adding [s] phaseroots (43 bytes)
91 91 adding [c] branch2-served (94 bytes)
92 92 adding [c] rbc-names-v1 (7 bytes)
93 93 adding [c] rbc-revs-v1 (40 bytes)
94 transferred 1.65 KB in \d\.\d seconds \(.*/sec\) (re)
94 transferred 1.65 KB in * seconds (* */sec) (glob)
95 95 bundle2-input-part: total payload size 1840
96 96 bundle2-input-bundle: 1 parts total
97 97 updating the branch cache
98 98 finished applying clone bundle
99 99 query 1; heads
100 100 sending batch command
101 101 searching for changes
102 102 all remote heads known locally
103 103 no changes found
104 104 sending getbundle command
105 105 bundle2-input-bundle: with-transaction
106 106 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
107 107 bundle2-input-part: "phase-heads" supported
108 108 bundle2-input-part: total payload size 24
109 109 bundle2-input-bundle: 2 parts total
110 110 checking for updated bookmarks
111 111 updating to branch default
112 112 resolving manifests
113 113 branchmerge: False, force: False, partial: False
114 114 ancestor: 000000000000, local: 000000000000+, remote: 9bc730a19041
115 115 A: remote created -> g
116 116 getting A
117 117 B: remote created -> g
118 118 getting B
119 119 C: remote created -> g
120 120 getting C
121 121 D: remote created -> g
122 122 getting D
123 123 E: remote created -> g
124 124 getting E
125 125 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
126 126 updating the branch cache
127 127 (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)
128 128
129 129 $ hg clone --stream http://localhost:$HGPORT streamv2-clone-explicit --debug
130 130 using http://localhost:$HGPORT/
131 131 sending capabilities command
132 132 sending clonebundles command
133 133 applying clone bundle from http://localhost:$HGPORT1/bundle.hg
134 134 bundle2-input-bundle: with-transaction
135 135 bundle2-input-part: "stream2" (params: 3 mandatory) supported
136 136 applying stream bundle
137 137 11 files to transfer, 1.65 KB of data
138 138 starting 4 threads for background file closing (?)
139 139 starting 4 threads for background file closing (?)
140 140 adding [s] data/A.i (66 bytes)
141 141 adding [s] data/B.i (66 bytes)
142 142 adding [s] data/C.i (66 bytes)
143 143 adding [s] data/D.i (66 bytes)
144 144 adding [s] data/E.i (66 bytes)
145 145 adding [s] 00manifest.i (584 bytes)
146 146 adding [s] 00changelog.i (595 bytes)
147 147 adding [s] phaseroots (43 bytes)
148 148 adding [c] branch2-served (94 bytes)
149 149 adding [c] rbc-names-v1 (7 bytes)
150 150 adding [c] rbc-revs-v1 (40 bytes)
151 transferred 1.65 KB in *.* seconds (*/sec) (glob)
151 transferred 1.65 KB in * seconds (* */sec) (glob)
152 152 bundle2-input-part: total payload size 1840
153 153 bundle2-input-bundle: 1 parts total
154 154 updating the branch cache
155 155 finished applying clone bundle
156 156 query 1; heads
157 157 sending batch command
158 158 searching for changes
159 159 all remote heads known locally
160 160 no changes found
161 161 sending getbundle command
162 162 bundle2-input-bundle: with-transaction
163 163 bundle2-input-part: "listkeys" (params: 1 mandatory) supported
164 164 bundle2-input-part: "phase-heads" supported
165 165 bundle2-input-part: total payload size 24
166 166 bundle2-input-bundle: 2 parts total
167 167 checking for updated bookmarks
168 168 updating to branch default
169 169 resolving manifests
170 170 branchmerge: False, force: False, partial: False
171 171 ancestor: 000000000000, local: 000000000000+, remote: 9bc730a19041
172 172 A: remote created -> g
173 173 getting A
174 174 B: remote created -> g
175 175 getting B
176 176 C: remote created -> g
177 177 getting C
178 178 D: remote created -> g
179 179 getting D
180 180 E: remote created -> g
181 181 getting E
182 182 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
183 183 updating the branch cache
184 184 (sent 4 HTTP requests and * bytes; received * bytes in responses) (glob)
General Comments 0
You need to be logged in to leave comments. Login now