Show More
@@ -1,552 +1,556 b'' | |||
|
1 | 1 | |
|
2 | 2 | Function to test discovery between two repos in both directions, using both the local shortcut |
|
3 | 3 | (which is currently not activated by default) and the full remotable protocol: |
|
4 | 4 | |
|
5 | 5 | $ testdesc() { # revs_a, revs_b, dagdesc |
|
6 | 6 | > if [ -d foo ]; then rm -rf foo; fi |
|
7 | 7 | > hg init foo |
|
8 | 8 | > cd foo |
|
9 | 9 | > hg debugbuilddag "$3" |
|
10 | 10 | > hg clone . a $1 --quiet |
|
11 | 11 | > hg clone . b $2 --quiet |
|
12 | 12 | > echo |
|
13 | 13 | > echo "% -- a -> b tree" |
|
14 | 14 | > hg -R a debugdiscovery b --verbose --old |
|
15 | 15 | > echo |
|
16 | 16 | > echo "% -- a -> b set" |
|
17 | 17 | > hg -R a debugdiscovery b --verbose --debug --config progress.debug=true |
|
18 | 18 | > echo |
|
19 | 19 | > echo "% -- a -> b set (tip only)" |
|
20 | 20 | > hg -R a debugdiscovery b --verbose --debug --config progress.debug=true --rev tip |
|
21 | 21 | > echo |
|
22 | 22 | > echo "% -- b -> a tree" |
|
23 | 23 | > hg -R b debugdiscovery a --verbose --old |
|
24 | 24 | > echo |
|
25 | 25 | > echo "% -- b -> a set" |
|
26 | 26 | > hg -R b debugdiscovery a --verbose --debug --config progress.debug=true |
|
27 | 27 | > echo |
|
28 | 28 | > echo "% -- b -> a set (tip only)" |
|
29 | 29 | > hg -R b debugdiscovery a --verbose --debug --config progress.debug=true --rev tip |
|
30 | 30 | > cd .. |
|
31 | 31 | > } |
|
32 | 32 | |
|
33 | 33 | |
|
34 | 34 | Small superset: |
|
35 | 35 | |
|
36 | 36 | $ testdesc '-ra1 -ra2' '-rb1 -rb2 -rb3' ' |
|
37 | 37 | > +2:f +1:a1:b1 |
|
38 | 38 | > <f +4 :a2 |
|
39 | 39 | > +5 :b2 |
|
40 | 40 | > <f +3 :b3' |
|
41 | 41 | |
|
42 | 42 | % -- a -> b tree |
|
43 | 43 | comparing with b |
|
44 | 44 | searching for changes |
|
45 | 45 | unpruned common: 01241442b3c2 66f7d451a68b b5714e113bc0 |
|
46 | 46 | common heads: 01241442b3c2 b5714e113bc0 |
|
47 | 47 | local is subset |
|
48 | 48 | |
|
49 | 49 | % -- a -> b set |
|
50 | 50 | comparing with b |
|
51 | 51 | query 1; heads |
|
52 | 52 | searching for changes |
|
53 | 53 | all local heads known remotely |
|
54 | 54 | common heads: 01241442b3c2 b5714e113bc0 |
|
55 | 55 | local is subset |
|
56 | 56 | |
|
57 | 57 | % -- a -> b set (tip only) |
|
58 | 58 | comparing with b |
|
59 | 59 | query 1; heads |
|
60 | 60 | searching for changes |
|
61 | 61 | all local heads known remotely |
|
62 | 62 | common heads: b5714e113bc0 |
|
63 | 63 | |
|
64 | 64 | % -- b -> a tree |
|
65 | 65 | comparing with a |
|
66 | 66 | searching for changes |
|
67 | 67 | unpruned common: 01241442b3c2 b5714e113bc0 |
|
68 | 68 | common heads: 01241442b3c2 b5714e113bc0 |
|
69 | 69 | remote is subset |
|
70 | 70 | |
|
71 | 71 | % -- b -> a set |
|
72 | 72 | comparing with a |
|
73 | 73 | query 1; heads |
|
74 | 74 | searching for changes |
|
75 | 75 | all remote heads known locally |
|
76 | 76 | common heads: 01241442b3c2 b5714e113bc0 |
|
77 | 77 | remote is subset |
|
78 | 78 | |
|
79 | 79 | % -- b -> a set (tip only) |
|
80 | 80 | comparing with a |
|
81 | 81 | query 1; heads |
|
82 | 82 | searching for changes |
|
83 | 83 | all remote heads known locally |
|
84 | 84 | common heads: 01241442b3c2 b5714e113bc0 |
|
85 | 85 | remote is subset |
|
86 | 86 | |
|
87 | 87 | |
|
88 | 88 | Many new: |
|
89 | 89 | |
|
90 | 90 | $ testdesc '-ra1 -ra2' '-rb' ' |
|
91 | 91 | > +2:f +3:a1 +3:b |
|
92 | 92 | > <f +30 :a2' |
|
93 | 93 | |
|
94 | 94 | % -- a -> b tree |
|
95 | 95 | comparing with b |
|
96 | 96 | searching for changes |
|
97 | 97 | unpruned common: bebd167eb94d |
|
98 | 98 | common heads: bebd167eb94d |
|
99 | 99 | |
|
100 | 100 | % -- a -> b set |
|
101 | 101 | comparing with b |
|
102 | 102 | query 1; heads |
|
103 | 103 | searching for changes |
|
104 | 104 | taking initial sample |
|
105 | 105 | searching: 2 queries |
|
106 | 106 | query 2; still undecided: 29, sample size is: 29 |
|
107 | 107 | 2 total queries in *.????s (glob) |
|
108 | 108 | common heads: bebd167eb94d |
|
109 | 109 | |
|
110 | 110 | % -- a -> b set (tip only) |
|
111 | 111 | comparing with b |
|
112 | 112 | query 1; heads |
|
113 | 113 | searching for changes |
|
114 | 114 | taking quick initial sample |
|
115 | 115 | searching: 2 queries |
|
116 | 116 | query 2; still undecided: 31, sample size is: 31 |
|
117 | 117 | 2 total queries in *.????s (glob) |
|
118 | 118 | common heads: 66f7d451a68b |
|
119 | 119 | |
|
120 | 120 | % -- b -> a tree |
|
121 | 121 | comparing with a |
|
122 | 122 | searching for changes |
|
123 | 123 | unpruned common: 66f7d451a68b bebd167eb94d |
|
124 | 124 | common heads: bebd167eb94d |
|
125 | 125 | |
|
126 | 126 | % -- b -> a set |
|
127 | 127 | comparing with a |
|
128 | 128 | query 1; heads |
|
129 | 129 | searching for changes |
|
130 | 130 | taking initial sample |
|
131 | 131 | searching: 2 queries |
|
132 | 132 | query 2; still undecided: 2, sample size is: 2 |
|
133 | 133 | 2 total queries in *.????s (glob) |
|
134 | 134 | common heads: bebd167eb94d |
|
135 | 135 | |
|
136 | 136 | % -- b -> a set (tip only) |
|
137 | 137 | comparing with a |
|
138 | 138 | query 1; heads |
|
139 | 139 | searching for changes |
|
140 | 140 | taking initial sample |
|
141 | 141 | searching: 2 queries |
|
142 | 142 | query 2; still undecided: 2, sample size is: 2 |
|
143 | 143 | 2 total queries in *.????s (glob) |
|
144 | 144 | common heads: bebd167eb94d |
|
145 | 145 | |
|
146 | 146 | Both sides many new with stub: |
|
147 | 147 | |
|
148 | 148 | $ testdesc '-ra1 -ra2' '-rb' ' |
|
149 | 149 | > +2:f +2:a1 +30 :b |
|
150 | 150 | > <f +30 :a2' |
|
151 | 151 | |
|
152 | 152 | % -- a -> b tree |
|
153 | 153 | comparing with b |
|
154 | 154 | searching for changes |
|
155 | 155 | unpruned common: 2dc09a01254d |
|
156 | 156 | common heads: 2dc09a01254d |
|
157 | 157 | |
|
158 | 158 | % -- a -> b set |
|
159 | 159 | comparing with b |
|
160 | 160 | query 1; heads |
|
161 | 161 | searching for changes |
|
162 | 162 | taking initial sample |
|
163 | 163 | searching: 2 queries |
|
164 | 164 | query 2; still undecided: 29, sample size is: 29 |
|
165 | 165 | 2 total queries in *.????s (glob) |
|
166 | 166 | common heads: 2dc09a01254d |
|
167 | 167 | |
|
168 | 168 | % -- a -> b set (tip only) |
|
169 | 169 | comparing with b |
|
170 | 170 | query 1; heads |
|
171 | 171 | searching for changes |
|
172 | 172 | taking quick initial sample |
|
173 | 173 | searching: 2 queries |
|
174 | 174 | query 2; still undecided: 31, sample size is: 31 |
|
175 | 175 | 2 total queries in *.????s (glob) |
|
176 | 176 | common heads: 66f7d451a68b |
|
177 | 177 | |
|
178 | 178 | % -- b -> a tree |
|
179 | 179 | comparing with a |
|
180 | 180 | searching for changes |
|
181 | 181 | unpruned common: 2dc09a01254d 66f7d451a68b |
|
182 | 182 | common heads: 2dc09a01254d |
|
183 | 183 | |
|
184 | 184 | % -- b -> a set |
|
185 | 185 | comparing with a |
|
186 | 186 | query 1; heads |
|
187 | 187 | searching for changes |
|
188 | 188 | taking initial sample |
|
189 | 189 | searching: 2 queries |
|
190 | 190 | query 2; still undecided: 29, sample size is: 29 |
|
191 | 191 | 2 total queries in *.????s (glob) |
|
192 | 192 | common heads: 2dc09a01254d |
|
193 | 193 | |
|
194 | 194 | % -- b -> a set (tip only) |
|
195 | 195 | comparing with a |
|
196 | 196 | query 1; heads |
|
197 | 197 | searching for changes |
|
198 | 198 | taking initial sample |
|
199 | 199 | searching: 2 queries |
|
200 | 200 | query 2; still undecided: 29, sample size is: 29 |
|
201 | 201 | 2 total queries in *.????s (glob) |
|
202 | 202 | common heads: 2dc09a01254d |
|
203 | 203 | |
|
204 | 204 | |
|
205 | 205 | Both many new: |
|
206 | 206 | |
|
207 | 207 | $ testdesc '-ra' '-rb' ' |
|
208 | 208 | > +2:f +30 :b |
|
209 | 209 | > <f +30 :a' |
|
210 | 210 | |
|
211 | 211 | % -- a -> b tree |
|
212 | 212 | comparing with b |
|
213 | 213 | searching for changes |
|
214 | 214 | unpruned common: 66f7d451a68b |
|
215 | 215 | common heads: 66f7d451a68b |
|
216 | 216 | |
|
217 | 217 | % -- a -> b set |
|
218 | 218 | comparing with b |
|
219 | 219 | query 1; heads |
|
220 | 220 | searching for changes |
|
221 | 221 | taking quick initial sample |
|
222 | 222 | searching: 2 queries |
|
223 | 223 | query 2; still undecided: 31, sample size is: 31 |
|
224 | 224 | 2 total queries in *.????s (glob) |
|
225 | 225 | common heads: 66f7d451a68b |
|
226 | 226 | |
|
227 | 227 | % -- a -> b set (tip only) |
|
228 | 228 | comparing with b |
|
229 | 229 | query 1; heads |
|
230 | 230 | searching for changes |
|
231 | 231 | taking quick initial sample |
|
232 | 232 | searching: 2 queries |
|
233 | 233 | query 2; still undecided: 31, sample size is: 31 |
|
234 | 234 | 2 total queries in *.????s (glob) |
|
235 | 235 | common heads: 66f7d451a68b |
|
236 | 236 | |
|
237 | 237 | % -- b -> a tree |
|
238 | 238 | comparing with a |
|
239 | 239 | searching for changes |
|
240 | 240 | unpruned common: 66f7d451a68b |
|
241 | 241 | common heads: 66f7d451a68b |
|
242 | 242 | |
|
243 | 243 | % -- b -> a set |
|
244 | 244 | comparing with a |
|
245 | 245 | query 1; heads |
|
246 | 246 | searching for changes |
|
247 | 247 | taking quick initial sample |
|
248 | 248 | searching: 2 queries |
|
249 | 249 | query 2; still undecided: 31, sample size is: 31 |
|
250 | 250 | 2 total queries in *.????s (glob) |
|
251 | 251 | common heads: 66f7d451a68b |
|
252 | 252 | |
|
253 | 253 | % -- b -> a set (tip only) |
|
254 | 254 | comparing with a |
|
255 | 255 | query 1; heads |
|
256 | 256 | searching for changes |
|
257 | 257 | taking quick initial sample |
|
258 | 258 | searching: 2 queries |
|
259 | 259 | query 2; still undecided: 31, sample size is: 31 |
|
260 | 260 | 2 total queries in *.????s (glob) |
|
261 | 261 | common heads: 66f7d451a68b |
|
262 | 262 | |
|
263 | 263 | |
|
264 | 264 | Both many new skewed: |
|
265 | 265 | |
|
266 | 266 | $ testdesc '-ra' '-rb' ' |
|
267 | 267 | > +2:f +30 :b |
|
268 | 268 | > <f +50 :a' |
|
269 | 269 | |
|
270 | 270 | % -- a -> b tree |
|
271 | 271 | comparing with b |
|
272 | 272 | searching for changes |
|
273 | 273 | unpruned common: 66f7d451a68b |
|
274 | 274 | common heads: 66f7d451a68b |
|
275 | 275 | |
|
276 | 276 | % -- a -> b set |
|
277 | 277 | comparing with b |
|
278 | 278 | query 1; heads |
|
279 | 279 | searching for changes |
|
280 | 280 | taking quick initial sample |
|
281 | 281 | searching: 2 queries |
|
282 | 282 | query 2; still undecided: 51, sample size is: 51 |
|
283 | 283 | 2 total queries in *.????s (glob) |
|
284 | 284 | common heads: 66f7d451a68b |
|
285 | 285 | |
|
286 | 286 | % -- a -> b set (tip only) |
|
287 | 287 | comparing with b |
|
288 | 288 | query 1; heads |
|
289 | 289 | searching for changes |
|
290 | 290 | taking quick initial sample |
|
291 | 291 | searching: 2 queries |
|
292 | 292 | query 2; still undecided: 51, sample size is: 51 |
|
293 | 293 | 2 total queries in *.????s (glob) |
|
294 | 294 | common heads: 66f7d451a68b |
|
295 | 295 | |
|
296 | 296 | % -- b -> a tree |
|
297 | 297 | comparing with a |
|
298 | 298 | searching for changes |
|
299 | 299 | unpruned common: 66f7d451a68b |
|
300 | 300 | common heads: 66f7d451a68b |
|
301 | 301 | |
|
302 | 302 | % -- b -> a set |
|
303 | 303 | comparing with a |
|
304 | 304 | query 1; heads |
|
305 | 305 | searching for changes |
|
306 | 306 | taking quick initial sample |
|
307 | 307 | searching: 2 queries |
|
308 | 308 | query 2; still undecided: 31, sample size is: 31 |
|
309 | 309 | 2 total queries in *.????s (glob) |
|
310 | 310 | common heads: 66f7d451a68b |
|
311 | 311 | |
|
312 | 312 | % -- b -> a set (tip only) |
|
313 | 313 | comparing with a |
|
314 | 314 | query 1; heads |
|
315 | 315 | searching for changes |
|
316 | 316 | taking quick initial sample |
|
317 | 317 | searching: 2 queries |
|
318 | 318 | query 2; still undecided: 31, sample size is: 31 |
|
319 | 319 | 2 total queries in *.????s (glob) |
|
320 | 320 | common heads: 66f7d451a68b |
|
321 | 321 | |
|
322 | 322 | |
|
323 | 323 | Both many new on top of long history: |
|
324 | 324 | |
|
325 | 325 | $ testdesc '-ra' '-rb' ' |
|
326 | 326 | > +1000:f +30 :b |
|
327 | 327 | > <f +50 :a' |
|
328 | 328 | |
|
329 | 329 | % -- a -> b tree |
|
330 | 330 | comparing with b |
|
331 | 331 | searching for changes |
|
332 | 332 | unpruned common: 7ead0cba2838 |
|
333 | 333 | common heads: 7ead0cba2838 |
|
334 | 334 | |
|
335 | 335 | % -- a -> b set |
|
336 | 336 | comparing with b |
|
337 | 337 | query 1; heads |
|
338 | 338 | searching for changes |
|
339 | 339 | taking quick initial sample |
|
340 | 340 | searching: 2 queries |
|
341 | 341 | query 2; still undecided: 1049, sample size is: 11 |
|
342 | 342 | sampling from both directions |
|
343 | 343 | searching: 3 queries |
|
344 | 344 | query 3; still undecided: 31, sample size is: 31 |
|
345 | 345 | 3 total queries in *.????s (glob) |
|
346 | 346 | common heads: 7ead0cba2838 |
|
347 | 347 | |
|
348 | 348 | % -- a -> b set (tip only) |
|
349 | 349 | comparing with b |
|
350 | 350 | query 1; heads |
|
351 | 351 | searching for changes |
|
352 | 352 | taking quick initial sample |
|
353 | 353 | searching: 2 queries |
|
354 | 354 | query 2; still undecided: 1049, sample size is: 11 |
|
355 | 355 | sampling from both directions |
|
356 | 356 | searching: 3 queries |
|
357 | 357 | query 3; still undecided: 31, sample size is: 31 |
|
358 | 358 | 3 total queries in *.????s (glob) |
|
359 | 359 | common heads: 7ead0cba2838 |
|
360 | 360 | |
|
361 | 361 | % -- b -> a tree |
|
362 | 362 | comparing with a |
|
363 | 363 | searching for changes |
|
364 | 364 | unpruned common: 7ead0cba2838 |
|
365 | 365 | common heads: 7ead0cba2838 |
|
366 | 366 | |
|
367 | 367 | % -- b -> a set |
|
368 | 368 | comparing with a |
|
369 | 369 | query 1; heads |
|
370 | 370 | searching for changes |
|
371 | 371 | taking quick initial sample |
|
372 | 372 | searching: 2 queries |
|
373 | 373 | query 2; still undecided: 1029, sample size is: 11 |
|
374 | 374 | sampling from both directions |
|
375 | 375 | searching: 3 queries |
|
376 | 376 | query 3; still undecided: 15, sample size is: 15 |
|
377 | 377 | 3 total queries in *.????s (glob) |
|
378 | 378 | common heads: 7ead0cba2838 |
|
379 | 379 | |
|
380 | 380 | % -- b -> a set (tip only) |
|
381 | 381 | comparing with a |
|
382 | 382 | query 1; heads |
|
383 | 383 | searching for changes |
|
384 | 384 | taking quick initial sample |
|
385 | 385 | searching: 2 queries |
|
386 | 386 | query 2; still undecided: 1029, sample size is: 11 |
|
387 | 387 | sampling from both directions |
|
388 | 388 | searching: 3 queries |
|
389 | 389 | query 3; still undecided: 15, sample size is: 15 |
|
390 | 390 | 3 total queries in *.????s (glob) |
|
391 | 391 | common heads: 7ead0cba2838 |
|
392 | 392 | |
|
393 | 393 | |
|
394 | 394 | One with >200 heads, which used to use up all of the sample: |
|
395 | 395 | |
|
396 | 396 | $ hg init manyheads |
|
397 | 397 | $ cd manyheads |
|
398 | 398 | $ echo "+300:r @a" >dagdesc |
|
399 | 399 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
400 | 400 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
401 | 401 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
402 | 402 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
403 | 403 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
404 | 404 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
405 | 405 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
406 | 406 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
407 | 407 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
408 | 408 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
409 | 409 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
410 | 410 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
411 | 411 | $ echo "*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3 *r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3*r+3" >>dagdesc # 20 heads |
|
412 | 412 | $ echo "@b *r+3" >>dagdesc # one more head |
|
413 | 413 | $ hg debugbuilddag <dagdesc |
|
414 | 414 | reading DAG from stdin |
|
415 | 415 | |
|
416 | 416 | $ hg heads -t --template . | wc -c |
|
417 | 417 | \s*261 (re) |
|
418 | 418 | |
|
419 | 419 | $ hg clone -b a . a |
|
420 | 420 | adding changesets |
|
421 | 421 | adding manifests |
|
422 | 422 | adding file changes |
|
423 | 423 | added 1340 changesets with 0 changes to 0 files (+259 heads) |
|
424 | 424 | new changesets 1ea73414a91b:1c51e2c80832 |
|
425 | 425 | updating to branch a |
|
426 | 426 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
427 | 427 | $ hg clone -b b . b |
|
428 | 428 | adding changesets |
|
429 | 429 | adding manifests |
|
430 | 430 | adding file changes |
|
431 | 431 | added 304 changesets with 0 changes to 0 files |
|
432 | 432 | new changesets 1ea73414a91b:513314ca8b3a |
|
433 | 433 | updating to branch b |
|
434 | 434 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
435 | 435 | |
|
436 | 436 | $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true |
|
437 | 437 | comparing with b |
|
438 | 438 | query 1; heads |
|
439 | 439 | searching for changes |
|
440 | 440 | taking quick initial sample |
|
441 | 441 | searching: 2 queries |
|
442 | 442 | query 2; still undecided: 1240, sample size is: 100 |
|
443 | 443 | sampling from both directions |
|
444 | 444 | searching: 3 queries |
|
445 | 445 | query 3; still undecided: 1140, sample size is: 200 |
|
446 | 446 | sampling from both directions |
|
447 | 447 | searching: 4 queries |
|
448 | 448 | query 4; still undecided: \d+, sample size is: 200 (re) |
|
449 | 449 | sampling from both directions |
|
450 | 450 | searching: 5 queries |
|
451 | 451 | query 5; still undecided: \d+, sample size is: 200 (re) |
|
452 | 452 | sampling from both directions |
|
453 | 453 | searching: 6 queries |
|
454 | 454 | query 6; still undecided: \d+, sample size is: \d+ (re) |
|
455 | 455 | 6 total queries in *.????s (glob) |
|
456 | 456 | common heads: 3ee37d65064a |
|
457 | 457 | $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true --rev tip |
|
458 | 458 | comparing with b |
|
459 | 459 | query 1; heads |
|
460 | 460 | searching for changes |
|
461 | 461 | taking quick initial sample |
|
462 | 462 | searching: 2 queries |
|
463 | 463 | query 2; still undecided: 303, sample size is: 9 |
|
464 | 464 | sampling from both directions |
|
465 | 465 | searching: 3 queries |
|
466 | 466 | query 3; still undecided: 3, sample size is: 3 |
|
467 | 467 | 3 total queries in *.????s (glob) |
|
468 | 468 | common heads: 3ee37d65064a |
|
469 | 469 | |
|
470 | 470 | Test actual protocol when pulling one new head in addition to common heads |
|
471 | 471 | |
|
472 | 472 | $ hg clone -U b c |
|
473 | 473 | $ hg -R c id -ir tip |
|
474 | 474 | 513314ca8b3a |
|
475 | 475 | $ hg -R c up -qr default |
|
476 | 476 | $ touch c/f |
|
477 | 477 | $ hg -R c ci -Aqm "extra head" |
|
478 | 478 | $ hg -R c id -i |
|
479 | 479 | e64a39e7da8b |
|
480 | 480 | |
|
481 | 481 | $ hg serve -R c -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
|
482 | 482 | $ cat hg.pid >> $DAEMON_PIDS |
|
483 | 483 | |
|
484 | 484 | $ hg -R b incoming http://localhost:$HGPORT/ -T '{node|short}\n' |
|
485 | 485 | comparing with http://localhost:$HGPORT/ |
|
486 | 486 | searching for changes |
|
487 | 487 | e64a39e7da8b |
|
488 | 488 | |
|
489 | 489 | $ killdaemons.py |
|
490 | 490 | $ cut -d' ' -f6- access.log | grep -v cmd=known # cmd=known uses random sampling |
|
491 | 491 | "GET /?cmd=capabilities HTTP/1.1" 200 - |
|
492 | 492 | "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D513314ca8b3ae4dac8eec56966265b00fcf866db x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
493 | 493 | "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:$USUAL_BUNDLE_CAPS$&cg=1&common=513314ca8b3ae4dac8eec56966265b00fcf866db&heads=e64a39e7da8b0d54bc63e81169aff001c13b3477 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
494 | 494 | "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ |
|
495 | 495 | $ cat errors.log |
|
496 | 496 | |
|
497 | 497 | $ cd .. |
|
498 | 498 | |
|
499 | 499 | |
|
500 | 500 | Issue 4438 - test coverage for 3ef893520a85 issues. |
|
501 | 501 | |
|
502 | 502 | $ mkdir issue4438 |
|
503 | 503 | $ cd issue4438 |
|
504 | 504 | #if false |
|
505 | 505 | generate new bundles: |
|
506 | 506 | $ hg init r1 |
|
507 | 507 | $ for i in `$PYTHON $TESTDIR/seq.py 101`; do hg -R r1 up -qr null && hg -R r1 branch -q b$i && hg -R r1 ci -qmb$i; done |
|
508 | 508 | $ hg clone -q r1 r2 |
|
509 | 509 | $ for i in `$PYTHON $TESTDIR/seq.py 10`; do hg -R r1 up -qr null && hg -R r1 branch -q c$i && hg -R r1 ci -qmc$i; done |
|
510 | 510 | $ hg -R r2 branch -q r2change && hg -R r2 ci -qmr2change |
|
511 | 511 | $ hg -R r1 bundle -qa $TESTDIR/bundles/issue4438-r1.hg |
|
512 | 512 | $ hg -R r2 bundle -qa $TESTDIR/bundles/issue4438-r2.hg |
|
513 | 513 | #else |
|
514 | 514 | use existing bundles: |
|
515 | $ hg clone -q $TESTDIR/bundles/issue4438-r1.hg r1 | |
|
516 |
$ hg |
|
|
515 | $ hg init r1 | |
|
516 | $ hg -R r1 -q unbundle $TESTDIR/bundles/issue4438-r1.hg | |
|
517 | $ hg -R r1 -q up | |
|
518 | $ hg init r2 | |
|
519 | $ hg -R r2 -q unbundle $TESTDIR/bundles/issue4438-r2.hg | |
|
520 | $ hg -R r2 -q up | |
|
517 | 521 | #endif |
|
518 | 522 | |
|
519 | 523 | Set iteration order could cause wrong and unstable results - fixed in 73cfaa348650: |
|
520 | 524 | |
|
521 | 525 | $ hg -R r1 outgoing r2 -T'{rev} ' |
|
522 | 526 | comparing with r2 |
|
523 | 527 | searching for changes |
|
524 | 528 | 101 102 103 104 105 106 107 108 109 110 (no-eol) |
|
525 | 529 | |
|
526 | 530 | The case where all the 'initialsamplesize' samples already were common would |
|
527 | 531 | give 'all remote heads known locally' without checking the remaining heads - |
|
528 | 532 | fixed in 86c35b7ae300: |
|
529 | 533 | |
|
530 | 534 | $ cat >> $TESTTMP/unrandomsample.py << EOF |
|
531 | 535 | > import random |
|
532 | 536 | > def sample(population, k): |
|
533 | 537 | > return sorted(population)[:k] |
|
534 | 538 | > random.sample = sample |
|
535 | 539 | > EOF |
|
536 | 540 | |
|
537 | 541 | $ cat >> r1/.hg/hgrc << EOF |
|
538 | 542 | > [extensions] |
|
539 | 543 | > unrandomsample = $TESTTMP/unrandomsample.py |
|
540 | 544 | > EOF |
|
541 | 545 | |
|
542 | 546 | $ hg -R r1 outgoing r2 -T'{rev} ' --config extensions.blackbox= |
|
543 | 547 | comparing with r2 |
|
544 | 548 | searching for changes |
|
545 | 549 | 101 102 103 104 105 106 107 108 109 110 (no-eol) |
|
546 | 550 | $ hg -R r1 --config extensions.blackbox= blackbox |
|
547 | 551 | * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> serve --cmdserver chgunix * (glob) (chg !) |
|
548 | 552 | * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* (glob) |
|
549 | 553 | * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> found 101 common and 1 unknown server heads, 2 roundtrips in *.????s (glob) |
|
550 | 554 | * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* exited 0 after *.?? seconds (glob) |
|
551 | 555 | * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 --config *extensions.blackbox=* blackbox (glob) |
|
552 | 556 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now