##// END OF EJS Templates
discovery: add config options to control sample size...
marmoute -
r47068:0600e846 default
parent child Browse files
Show More
@@ -1,2582 +1,2594 b''
1 # configitems.py - centralized declaration of configuration option
1 # configitems.py - centralized declaration of configuration option
2 #
2 #
3 # Copyright 2017 Pierre-Yves David <pierre-yves.david@octobus.net>
3 # Copyright 2017 Pierre-Yves David <pierre-yves.david@octobus.net>
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version.
6 # GNU General Public License version 2 or any later version.
7
7
8 from __future__ import absolute_import
8 from __future__ import absolute_import
9
9
10 import functools
10 import functools
11 import re
11 import re
12
12
13 from . import (
13 from . import (
14 encoding,
14 encoding,
15 error,
15 error,
16 )
16 )
17
17
18
18
19 def loadconfigtable(ui, extname, configtable):
19 def loadconfigtable(ui, extname, configtable):
20 """update config item known to the ui with the extension ones"""
20 """update config item known to the ui with the extension ones"""
21 for section, items in sorted(configtable.items()):
21 for section, items in sorted(configtable.items()):
22 knownitems = ui._knownconfig.setdefault(section, itemregister())
22 knownitems = ui._knownconfig.setdefault(section, itemregister())
23 knownkeys = set(knownitems)
23 knownkeys = set(knownitems)
24 newkeys = set(items)
24 newkeys = set(items)
25 for key in sorted(knownkeys & newkeys):
25 for key in sorted(knownkeys & newkeys):
26 msg = b"extension '%s' overwrite config item '%s.%s'"
26 msg = b"extension '%s' overwrite config item '%s.%s'"
27 msg %= (extname, section, key)
27 msg %= (extname, section, key)
28 ui.develwarn(msg, config=b'warn-config')
28 ui.develwarn(msg, config=b'warn-config')
29
29
30 knownitems.update(items)
30 knownitems.update(items)
31
31
32
32
33 class configitem(object):
33 class configitem(object):
34 """represent a known config item
34 """represent a known config item
35
35
36 :section: the official config section where to find this item,
36 :section: the official config section where to find this item,
37 :name: the official name within the section,
37 :name: the official name within the section,
38 :default: default value for this item,
38 :default: default value for this item,
39 :alias: optional list of tuples as alternatives,
39 :alias: optional list of tuples as alternatives,
40 :generic: this is a generic definition, match name using regular expression.
40 :generic: this is a generic definition, match name using regular expression.
41 """
41 """
42
42
43 def __init__(
43 def __init__(
44 self,
44 self,
45 section,
45 section,
46 name,
46 name,
47 default=None,
47 default=None,
48 alias=(),
48 alias=(),
49 generic=False,
49 generic=False,
50 priority=0,
50 priority=0,
51 experimental=False,
51 experimental=False,
52 ):
52 ):
53 self.section = section
53 self.section = section
54 self.name = name
54 self.name = name
55 self.default = default
55 self.default = default
56 self.alias = list(alias)
56 self.alias = list(alias)
57 self.generic = generic
57 self.generic = generic
58 self.priority = priority
58 self.priority = priority
59 self.experimental = experimental
59 self.experimental = experimental
60 self._re = None
60 self._re = None
61 if generic:
61 if generic:
62 self._re = re.compile(self.name)
62 self._re = re.compile(self.name)
63
63
64
64
65 class itemregister(dict):
65 class itemregister(dict):
66 """A specialized dictionary that can handle wild-card selection"""
66 """A specialized dictionary that can handle wild-card selection"""
67
67
68 def __init__(self):
68 def __init__(self):
69 super(itemregister, self).__init__()
69 super(itemregister, self).__init__()
70 self._generics = set()
70 self._generics = set()
71
71
72 def update(self, other):
72 def update(self, other):
73 super(itemregister, self).update(other)
73 super(itemregister, self).update(other)
74 self._generics.update(other._generics)
74 self._generics.update(other._generics)
75
75
76 def __setitem__(self, key, item):
76 def __setitem__(self, key, item):
77 super(itemregister, self).__setitem__(key, item)
77 super(itemregister, self).__setitem__(key, item)
78 if item.generic:
78 if item.generic:
79 self._generics.add(item)
79 self._generics.add(item)
80
80
81 def get(self, key):
81 def get(self, key):
82 baseitem = super(itemregister, self).get(key)
82 baseitem = super(itemregister, self).get(key)
83 if baseitem is not None and not baseitem.generic:
83 if baseitem is not None and not baseitem.generic:
84 return baseitem
84 return baseitem
85
85
86 # search for a matching generic item
86 # search for a matching generic item
87 generics = sorted(self._generics, key=(lambda x: (x.priority, x.name)))
87 generics = sorted(self._generics, key=(lambda x: (x.priority, x.name)))
88 for item in generics:
88 for item in generics:
89 # we use 'match' instead of 'search' to make the matching simpler
89 # we use 'match' instead of 'search' to make the matching simpler
90 # for people unfamiliar with regular expression. Having the match
90 # for people unfamiliar with regular expression. Having the match
91 # rooted to the start of the string will produce less surprising
91 # rooted to the start of the string will produce less surprising
92 # result for user writing simple regex for sub-attribute.
92 # result for user writing simple regex for sub-attribute.
93 #
93 #
94 # For example using "color\..*" match produces an unsurprising
94 # For example using "color\..*" match produces an unsurprising
95 # result, while using search could suddenly match apparently
95 # result, while using search could suddenly match apparently
96 # unrelated configuration that happens to contains "color."
96 # unrelated configuration that happens to contains "color."
97 # anywhere. This is a tradeoff where we favor requiring ".*" on
97 # anywhere. This is a tradeoff where we favor requiring ".*" on
98 # some match to avoid the need to prefix most pattern with "^".
98 # some match to avoid the need to prefix most pattern with "^".
99 # The "^" seems more error prone.
99 # The "^" seems more error prone.
100 if item._re.match(key):
100 if item._re.match(key):
101 return item
101 return item
102
102
103 return None
103 return None
104
104
105
105
106 coreitems = {}
106 coreitems = {}
107
107
108
108
109 def _register(configtable, *args, **kwargs):
109 def _register(configtable, *args, **kwargs):
110 item = configitem(*args, **kwargs)
110 item = configitem(*args, **kwargs)
111 section = configtable.setdefault(item.section, itemregister())
111 section = configtable.setdefault(item.section, itemregister())
112 if item.name in section:
112 if item.name in section:
113 msg = b"duplicated config item registration for '%s.%s'"
113 msg = b"duplicated config item registration for '%s.%s'"
114 raise error.ProgrammingError(msg % (item.section, item.name))
114 raise error.ProgrammingError(msg % (item.section, item.name))
115 section[item.name] = item
115 section[item.name] = item
116
116
117
117
118 # special value for case where the default is derived from other values
118 # special value for case where the default is derived from other values
119 dynamicdefault = object()
119 dynamicdefault = object()
120
120
121 # Registering actual config items
121 # Registering actual config items
122
122
123
123
124 def getitemregister(configtable):
124 def getitemregister(configtable):
125 f = functools.partial(_register, configtable)
125 f = functools.partial(_register, configtable)
126 # export pseudo enum as configitem.*
126 # export pseudo enum as configitem.*
127 f.dynamicdefault = dynamicdefault
127 f.dynamicdefault = dynamicdefault
128 return f
128 return f
129
129
130
130
131 coreconfigitem = getitemregister(coreitems)
131 coreconfigitem = getitemregister(coreitems)
132
132
133
133
134 def _registerdiffopts(section, configprefix=b''):
134 def _registerdiffopts(section, configprefix=b''):
135 coreconfigitem(
135 coreconfigitem(
136 section,
136 section,
137 configprefix + b'nodates',
137 configprefix + b'nodates',
138 default=False,
138 default=False,
139 )
139 )
140 coreconfigitem(
140 coreconfigitem(
141 section,
141 section,
142 configprefix + b'showfunc',
142 configprefix + b'showfunc',
143 default=False,
143 default=False,
144 )
144 )
145 coreconfigitem(
145 coreconfigitem(
146 section,
146 section,
147 configprefix + b'unified',
147 configprefix + b'unified',
148 default=None,
148 default=None,
149 )
149 )
150 coreconfigitem(
150 coreconfigitem(
151 section,
151 section,
152 configprefix + b'git',
152 configprefix + b'git',
153 default=False,
153 default=False,
154 )
154 )
155 coreconfigitem(
155 coreconfigitem(
156 section,
156 section,
157 configprefix + b'ignorews',
157 configprefix + b'ignorews',
158 default=False,
158 default=False,
159 )
159 )
160 coreconfigitem(
160 coreconfigitem(
161 section,
161 section,
162 configprefix + b'ignorewsamount',
162 configprefix + b'ignorewsamount',
163 default=False,
163 default=False,
164 )
164 )
165 coreconfigitem(
165 coreconfigitem(
166 section,
166 section,
167 configprefix + b'ignoreblanklines',
167 configprefix + b'ignoreblanklines',
168 default=False,
168 default=False,
169 )
169 )
170 coreconfigitem(
170 coreconfigitem(
171 section,
171 section,
172 configprefix + b'ignorewseol',
172 configprefix + b'ignorewseol',
173 default=False,
173 default=False,
174 )
174 )
175 coreconfigitem(
175 coreconfigitem(
176 section,
176 section,
177 configprefix + b'nobinary',
177 configprefix + b'nobinary',
178 default=False,
178 default=False,
179 )
179 )
180 coreconfigitem(
180 coreconfigitem(
181 section,
181 section,
182 configprefix + b'noprefix',
182 configprefix + b'noprefix',
183 default=False,
183 default=False,
184 )
184 )
185 coreconfigitem(
185 coreconfigitem(
186 section,
186 section,
187 configprefix + b'word-diff',
187 configprefix + b'word-diff',
188 default=False,
188 default=False,
189 )
189 )
190
190
191
191
192 coreconfigitem(
192 coreconfigitem(
193 b'alias',
193 b'alias',
194 b'.*',
194 b'.*',
195 default=dynamicdefault,
195 default=dynamicdefault,
196 generic=True,
196 generic=True,
197 )
197 )
198 coreconfigitem(
198 coreconfigitem(
199 b'auth',
199 b'auth',
200 b'cookiefile',
200 b'cookiefile',
201 default=None,
201 default=None,
202 )
202 )
203 _registerdiffopts(section=b'annotate')
203 _registerdiffopts(section=b'annotate')
204 # bookmarks.pushing: internal hack for discovery
204 # bookmarks.pushing: internal hack for discovery
205 coreconfigitem(
205 coreconfigitem(
206 b'bookmarks',
206 b'bookmarks',
207 b'pushing',
207 b'pushing',
208 default=list,
208 default=list,
209 )
209 )
210 # bundle.mainreporoot: internal hack for bundlerepo
210 # bundle.mainreporoot: internal hack for bundlerepo
211 coreconfigitem(
211 coreconfigitem(
212 b'bundle',
212 b'bundle',
213 b'mainreporoot',
213 b'mainreporoot',
214 default=b'',
214 default=b'',
215 )
215 )
216 coreconfigitem(
216 coreconfigitem(
217 b'censor',
217 b'censor',
218 b'policy',
218 b'policy',
219 default=b'abort',
219 default=b'abort',
220 experimental=True,
220 experimental=True,
221 )
221 )
222 coreconfigitem(
222 coreconfigitem(
223 b'chgserver',
223 b'chgserver',
224 b'idletimeout',
224 b'idletimeout',
225 default=3600,
225 default=3600,
226 )
226 )
227 coreconfigitem(
227 coreconfigitem(
228 b'chgserver',
228 b'chgserver',
229 b'skiphash',
229 b'skiphash',
230 default=False,
230 default=False,
231 )
231 )
232 coreconfigitem(
232 coreconfigitem(
233 b'cmdserver',
233 b'cmdserver',
234 b'log',
234 b'log',
235 default=None,
235 default=None,
236 )
236 )
237 coreconfigitem(
237 coreconfigitem(
238 b'cmdserver',
238 b'cmdserver',
239 b'max-log-files',
239 b'max-log-files',
240 default=7,
240 default=7,
241 )
241 )
242 coreconfigitem(
242 coreconfigitem(
243 b'cmdserver',
243 b'cmdserver',
244 b'max-log-size',
244 b'max-log-size',
245 default=b'1 MB',
245 default=b'1 MB',
246 )
246 )
247 coreconfigitem(
247 coreconfigitem(
248 b'cmdserver',
248 b'cmdserver',
249 b'max-repo-cache',
249 b'max-repo-cache',
250 default=0,
250 default=0,
251 experimental=True,
251 experimental=True,
252 )
252 )
253 coreconfigitem(
253 coreconfigitem(
254 b'cmdserver',
254 b'cmdserver',
255 b'message-encodings',
255 b'message-encodings',
256 default=list,
256 default=list,
257 )
257 )
258 coreconfigitem(
258 coreconfigitem(
259 b'cmdserver',
259 b'cmdserver',
260 b'track-log',
260 b'track-log',
261 default=lambda: [b'chgserver', b'cmdserver', b'repocache'],
261 default=lambda: [b'chgserver', b'cmdserver', b'repocache'],
262 )
262 )
263 coreconfigitem(
263 coreconfigitem(
264 b'cmdserver',
264 b'cmdserver',
265 b'shutdown-on-interrupt',
265 b'shutdown-on-interrupt',
266 default=True,
266 default=True,
267 )
267 )
268 coreconfigitem(
268 coreconfigitem(
269 b'color',
269 b'color',
270 b'.*',
270 b'.*',
271 default=None,
271 default=None,
272 generic=True,
272 generic=True,
273 )
273 )
274 coreconfigitem(
274 coreconfigitem(
275 b'color',
275 b'color',
276 b'mode',
276 b'mode',
277 default=b'auto',
277 default=b'auto',
278 )
278 )
279 coreconfigitem(
279 coreconfigitem(
280 b'color',
280 b'color',
281 b'pagermode',
281 b'pagermode',
282 default=dynamicdefault,
282 default=dynamicdefault,
283 )
283 )
284 coreconfigitem(
284 coreconfigitem(
285 b'command-templates',
285 b'command-templates',
286 b'graphnode',
286 b'graphnode',
287 default=None,
287 default=None,
288 alias=[(b'ui', b'graphnodetemplate')],
288 alias=[(b'ui', b'graphnodetemplate')],
289 )
289 )
290 coreconfigitem(
290 coreconfigitem(
291 b'command-templates',
291 b'command-templates',
292 b'log',
292 b'log',
293 default=None,
293 default=None,
294 alias=[(b'ui', b'logtemplate')],
294 alias=[(b'ui', b'logtemplate')],
295 )
295 )
296 coreconfigitem(
296 coreconfigitem(
297 b'command-templates',
297 b'command-templates',
298 b'mergemarker',
298 b'mergemarker',
299 default=(
299 default=(
300 b'{node|short} '
300 b'{node|short} '
301 b'{ifeq(tags, "tip", "", '
301 b'{ifeq(tags, "tip", "", '
302 b'ifeq(tags, "", "", "{tags} "))}'
302 b'ifeq(tags, "", "", "{tags} "))}'
303 b'{if(bookmarks, "{bookmarks} ")}'
303 b'{if(bookmarks, "{bookmarks} ")}'
304 b'{ifeq(branch, "default", "", "{branch} ")}'
304 b'{ifeq(branch, "default", "", "{branch} ")}'
305 b'- {author|user}: {desc|firstline}'
305 b'- {author|user}: {desc|firstline}'
306 ),
306 ),
307 alias=[(b'ui', b'mergemarkertemplate')],
307 alias=[(b'ui', b'mergemarkertemplate')],
308 )
308 )
309 coreconfigitem(
309 coreconfigitem(
310 b'command-templates',
310 b'command-templates',
311 b'pre-merge-tool-output',
311 b'pre-merge-tool-output',
312 default=None,
312 default=None,
313 alias=[(b'ui', b'pre-merge-tool-output-template')],
313 alias=[(b'ui', b'pre-merge-tool-output-template')],
314 )
314 )
315 coreconfigitem(
315 coreconfigitem(
316 b'command-templates',
316 b'command-templates',
317 b'oneline-summary',
317 b'oneline-summary',
318 default=None,
318 default=None,
319 )
319 )
320 coreconfigitem(
320 coreconfigitem(
321 b'command-templates',
321 b'command-templates',
322 b'oneline-summary.*',
322 b'oneline-summary.*',
323 default=dynamicdefault,
323 default=dynamicdefault,
324 generic=True,
324 generic=True,
325 )
325 )
326 _registerdiffopts(section=b'commands', configprefix=b'commit.interactive.')
326 _registerdiffopts(section=b'commands', configprefix=b'commit.interactive.')
327 coreconfigitem(
327 coreconfigitem(
328 b'commands',
328 b'commands',
329 b'commit.post-status',
329 b'commit.post-status',
330 default=False,
330 default=False,
331 )
331 )
332 coreconfigitem(
332 coreconfigitem(
333 b'commands',
333 b'commands',
334 b'grep.all-files',
334 b'grep.all-files',
335 default=False,
335 default=False,
336 experimental=True,
336 experimental=True,
337 )
337 )
338 coreconfigitem(
338 coreconfigitem(
339 b'commands',
339 b'commands',
340 b'merge.require-rev',
340 b'merge.require-rev',
341 default=False,
341 default=False,
342 )
342 )
343 coreconfigitem(
343 coreconfigitem(
344 b'commands',
344 b'commands',
345 b'push.require-revs',
345 b'push.require-revs',
346 default=False,
346 default=False,
347 )
347 )
348 coreconfigitem(
348 coreconfigitem(
349 b'commands',
349 b'commands',
350 b'resolve.confirm',
350 b'resolve.confirm',
351 default=False,
351 default=False,
352 )
352 )
353 coreconfigitem(
353 coreconfigitem(
354 b'commands',
354 b'commands',
355 b'resolve.explicit-re-merge',
355 b'resolve.explicit-re-merge',
356 default=False,
356 default=False,
357 )
357 )
358 coreconfigitem(
358 coreconfigitem(
359 b'commands',
359 b'commands',
360 b'resolve.mark-check',
360 b'resolve.mark-check',
361 default=b'none',
361 default=b'none',
362 )
362 )
363 _registerdiffopts(section=b'commands', configprefix=b'revert.interactive.')
363 _registerdiffopts(section=b'commands', configprefix=b'revert.interactive.')
364 coreconfigitem(
364 coreconfigitem(
365 b'commands',
365 b'commands',
366 b'show.aliasprefix',
366 b'show.aliasprefix',
367 default=list,
367 default=list,
368 )
368 )
369 coreconfigitem(
369 coreconfigitem(
370 b'commands',
370 b'commands',
371 b'status.relative',
371 b'status.relative',
372 default=False,
372 default=False,
373 )
373 )
374 coreconfigitem(
374 coreconfigitem(
375 b'commands',
375 b'commands',
376 b'status.skipstates',
376 b'status.skipstates',
377 default=[],
377 default=[],
378 experimental=True,
378 experimental=True,
379 )
379 )
380 coreconfigitem(
380 coreconfigitem(
381 b'commands',
381 b'commands',
382 b'status.terse',
382 b'status.terse',
383 default=b'',
383 default=b'',
384 )
384 )
385 coreconfigitem(
385 coreconfigitem(
386 b'commands',
386 b'commands',
387 b'status.verbose',
387 b'status.verbose',
388 default=False,
388 default=False,
389 )
389 )
390 coreconfigitem(
390 coreconfigitem(
391 b'commands',
391 b'commands',
392 b'update.check',
392 b'update.check',
393 default=None,
393 default=None,
394 )
394 )
395 coreconfigitem(
395 coreconfigitem(
396 b'commands',
396 b'commands',
397 b'update.requiredest',
397 b'update.requiredest',
398 default=False,
398 default=False,
399 )
399 )
400 coreconfigitem(
400 coreconfigitem(
401 b'committemplate',
401 b'committemplate',
402 b'.*',
402 b'.*',
403 default=None,
403 default=None,
404 generic=True,
404 generic=True,
405 )
405 )
406 coreconfigitem(
406 coreconfigitem(
407 b'convert',
407 b'convert',
408 b'bzr.saverev',
408 b'bzr.saverev',
409 default=True,
409 default=True,
410 )
410 )
411 coreconfigitem(
411 coreconfigitem(
412 b'convert',
412 b'convert',
413 b'cvsps.cache',
413 b'cvsps.cache',
414 default=True,
414 default=True,
415 )
415 )
416 coreconfigitem(
416 coreconfigitem(
417 b'convert',
417 b'convert',
418 b'cvsps.fuzz',
418 b'cvsps.fuzz',
419 default=60,
419 default=60,
420 )
420 )
421 coreconfigitem(
421 coreconfigitem(
422 b'convert',
422 b'convert',
423 b'cvsps.logencoding',
423 b'cvsps.logencoding',
424 default=None,
424 default=None,
425 )
425 )
426 coreconfigitem(
426 coreconfigitem(
427 b'convert',
427 b'convert',
428 b'cvsps.mergefrom',
428 b'cvsps.mergefrom',
429 default=None,
429 default=None,
430 )
430 )
431 coreconfigitem(
431 coreconfigitem(
432 b'convert',
432 b'convert',
433 b'cvsps.mergeto',
433 b'cvsps.mergeto',
434 default=None,
434 default=None,
435 )
435 )
436 coreconfigitem(
436 coreconfigitem(
437 b'convert',
437 b'convert',
438 b'git.committeractions',
438 b'git.committeractions',
439 default=lambda: [b'messagedifferent'],
439 default=lambda: [b'messagedifferent'],
440 )
440 )
441 coreconfigitem(
441 coreconfigitem(
442 b'convert',
442 b'convert',
443 b'git.extrakeys',
443 b'git.extrakeys',
444 default=list,
444 default=list,
445 )
445 )
446 coreconfigitem(
446 coreconfigitem(
447 b'convert',
447 b'convert',
448 b'git.findcopiesharder',
448 b'git.findcopiesharder',
449 default=False,
449 default=False,
450 )
450 )
451 coreconfigitem(
451 coreconfigitem(
452 b'convert',
452 b'convert',
453 b'git.remoteprefix',
453 b'git.remoteprefix',
454 default=b'remote',
454 default=b'remote',
455 )
455 )
456 coreconfigitem(
456 coreconfigitem(
457 b'convert',
457 b'convert',
458 b'git.renamelimit',
458 b'git.renamelimit',
459 default=400,
459 default=400,
460 )
460 )
461 coreconfigitem(
461 coreconfigitem(
462 b'convert',
462 b'convert',
463 b'git.saverev',
463 b'git.saverev',
464 default=True,
464 default=True,
465 )
465 )
466 coreconfigitem(
466 coreconfigitem(
467 b'convert',
467 b'convert',
468 b'git.similarity',
468 b'git.similarity',
469 default=50,
469 default=50,
470 )
470 )
471 coreconfigitem(
471 coreconfigitem(
472 b'convert',
472 b'convert',
473 b'git.skipsubmodules',
473 b'git.skipsubmodules',
474 default=False,
474 default=False,
475 )
475 )
476 coreconfigitem(
476 coreconfigitem(
477 b'convert',
477 b'convert',
478 b'hg.clonebranches',
478 b'hg.clonebranches',
479 default=False,
479 default=False,
480 )
480 )
481 coreconfigitem(
481 coreconfigitem(
482 b'convert',
482 b'convert',
483 b'hg.ignoreerrors',
483 b'hg.ignoreerrors',
484 default=False,
484 default=False,
485 )
485 )
486 coreconfigitem(
486 coreconfigitem(
487 b'convert',
487 b'convert',
488 b'hg.preserve-hash',
488 b'hg.preserve-hash',
489 default=False,
489 default=False,
490 )
490 )
491 coreconfigitem(
491 coreconfigitem(
492 b'convert',
492 b'convert',
493 b'hg.revs',
493 b'hg.revs',
494 default=None,
494 default=None,
495 )
495 )
496 coreconfigitem(
496 coreconfigitem(
497 b'convert',
497 b'convert',
498 b'hg.saverev',
498 b'hg.saverev',
499 default=False,
499 default=False,
500 )
500 )
501 coreconfigitem(
501 coreconfigitem(
502 b'convert',
502 b'convert',
503 b'hg.sourcename',
503 b'hg.sourcename',
504 default=None,
504 default=None,
505 )
505 )
506 coreconfigitem(
506 coreconfigitem(
507 b'convert',
507 b'convert',
508 b'hg.startrev',
508 b'hg.startrev',
509 default=None,
509 default=None,
510 )
510 )
511 coreconfigitem(
511 coreconfigitem(
512 b'convert',
512 b'convert',
513 b'hg.tagsbranch',
513 b'hg.tagsbranch',
514 default=b'default',
514 default=b'default',
515 )
515 )
516 coreconfigitem(
516 coreconfigitem(
517 b'convert',
517 b'convert',
518 b'hg.usebranchnames',
518 b'hg.usebranchnames',
519 default=True,
519 default=True,
520 )
520 )
521 coreconfigitem(
521 coreconfigitem(
522 b'convert',
522 b'convert',
523 b'ignoreancestorcheck',
523 b'ignoreancestorcheck',
524 default=False,
524 default=False,
525 experimental=True,
525 experimental=True,
526 )
526 )
527 coreconfigitem(
527 coreconfigitem(
528 b'convert',
528 b'convert',
529 b'localtimezone',
529 b'localtimezone',
530 default=False,
530 default=False,
531 )
531 )
532 coreconfigitem(
532 coreconfigitem(
533 b'convert',
533 b'convert',
534 b'p4.encoding',
534 b'p4.encoding',
535 default=dynamicdefault,
535 default=dynamicdefault,
536 )
536 )
537 coreconfigitem(
537 coreconfigitem(
538 b'convert',
538 b'convert',
539 b'p4.startrev',
539 b'p4.startrev',
540 default=0,
540 default=0,
541 )
541 )
542 coreconfigitem(
542 coreconfigitem(
543 b'convert',
543 b'convert',
544 b'skiptags',
544 b'skiptags',
545 default=False,
545 default=False,
546 )
546 )
547 coreconfigitem(
547 coreconfigitem(
548 b'convert',
548 b'convert',
549 b'svn.debugsvnlog',
549 b'svn.debugsvnlog',
550 default=True,
550 default=True,
551 )
551 )
552 coreconfigitem(
552 coreconfigitem(
553 b'convert',
553 b'convert',
554 b'svn.trunk',
554 b'svn.trunk',
555 default=None,
555 default=None,
556 )
556 )
557 coreconfigitem(
557 coreconfigitem(
558 b'convert',
558 b'convert',
559 b'svn.tags',
559 b'svn.tags',
560 default=None,
560 default=None,
561 )
561 )
562 coreconfigitem(
562 coreconfigitem(
563 b'convert',
563 b'convert',
564 b'svn.branches',
564 b'svn.branches',
565 default=None,
565 default=None,
566 )
566 )
567 coreconfigitem(
567 coreconfigitem(
568 b'convert',
568 b'convert',
569 b'svn.startrev',
569 b'svn.startrev',
570 default=0,
570 default=0,
571 )
571 )
572 coreconfigitem(
572 coreconfigitem(
573 b'debug',
573 b'debug',
574 b'dirstate.delaywrite',
574 b'dirstate.delaywrite',
575 default=0,
575 default=0,
576 )
576 )
577 coreconfigitem(
577 coreconfigitem(
578 b'defaults',
578 b'defaults',
579 b'.*',
579 b'.*',
580 default=None,
580 default=None,
581 generic=True,
581 generic=True,
582 )
582 )
583 coreconfigitem(
583 coreconfigitem(
584 b'devel',
584 b'devel',
585 b'all-warnings',
585 b'all-warnings',
586 default=False,
586 default=False,
587 )
587 )
588 coreconfigitem(
588 coreconfigitem(
589 b'devel',
589 b'devel',
590 b'bundle2.debug',
590 b'bundle2.debug',
591 default=False,
591 default=False,
592 )
592 )
593 coreconfigitem(
593 coreconfigitem(
594 b'devel',
594 b'devel',
595 b'bundle.delta',
595 b'bundle.delta',
596 default=b'',
596 default=b'',
597 )
597 )
598 coreconfigitem(
598 coreconfigitem(
599 b'devel',
599 b'devel',
600 b'cache-vfs',
600 b'cache-vfs',
601 default=None,
601 default=None,
602 )
602 )
603 coreconfigitem(
603 coreconfigitem(
604 b'devel',
604 b'devel',
605 b'check-locks',
605 b'check-locks',
606 default=False,
606 default=False,
607 )
607 )
608 coreconfigitem(
608 coreconfigitem(
609 b'devel',
609 b'devel',
610 b'check-relroot',
610 b'check-relroot',
611 default=False,
611 default=False,
612 )
612 )
613 coreconfigitem(
613 coreconfigitem(
614 b'devel',
614 b'devel',
615 b'default-date',
615 b'default-date',
616 default=None,
616 default=None,
617 )
617 )
618 coreconfigitem(
618 coreconfigitem(
619 b'devel',
619 b'devel',
620 b'deprec-warn',
620 b'deprec-warn',
621 default=False,
621 default=False,
622 )
622 )
623 coreconfigitem(
623 coreconfigitem(
624 b'devel',
624 b'devel',
625 b'disableloaddefaultcerts',
625 b'disableloaddefaultcerts',
626 default=False,
626 default=False,
627 )
627 )
628 coreconfigitem(
628 coreconfigitem(
629 b'devel',
629 b'devel',
630 b'warn-empty-changegroup',
630 b'warn-empty-changegroup',
631 default=False,
631 default=False,
632 )
632 )
633 coreconfigitem(
633 coreconfigitem(
634 b'devel',
634 b'devel',
635 b'legacy.exchange',
635 b'legacy.exchange',
636 default=list,
636 default=list,
637 )
637 )
638 # When True, revlogs use a special reference version of the nodemap, that is not
638 # When True, revlogs use a special reference version of the nodemap, that is not
639 # performant but is "known" to behave properly.
639 # performant but is "known" to behave properly.
640 coreconfigitem(
640 coreconfigitem(
641 b'devel',
641 b'devel',
642 b'persistent-nodemap',
642 b'persistent-nodemap',
643 default=False,
643 default=False,
644 )
644 )
645 coreconfigitem(
645 coreconfigitem(
646 b'devel',
646 b'devel',
647 b'servercafile',
647 b'servercafile',
648 default=b'',
648 default=b'',
649 )
649 )
650 coreconfigitem(
650 coreconfigitem(
651 b'devel',
651 b'devel',
652 b'serverexactprotocol',
652 b'serverexactprotocol',
653 default=b'',
653 default=b'',
654 )
654 )
655 coreconfigitem(
655 coreconfigitem(
656 b'devel',
656 b'devel',
657 b'serverrequirecert',
657 b'serverrequirecert',
658 default=False,
658 default=False,
659 )
659 )
660 coreconfigitem(
660 coreconfigitem(
661 b'devel',
661 b'devel',
662 b'strip-obsmarkers',
662 b'strip-obsmarkers',
663 default=True,
663 default=True,
664 )
664 )
665 coreconfigitem(
665 coreconfigitem(
666 b'devel',
666 b'devel',
667 b'warn-config',
667 b'warn-config',
668 default=None,
668 default=None,
669 )
669 )
670 coreconfigitem(
670 coreconfigitem(
671 b'devel',
671 b'devel',
672 b'warn-config-default',
672 b'warn-config-default',
673 default=None,
673 default=None,
674 )
674 )
675 coreconfigitem(
675 coreconfigitem(
676 b'devel',
676 b'devel',
677 b'user.obsmarker',
677 b'user.obsmarker',
678 default=None,
678 default=None,
679 )
679 )
680 coreconfigitem(
680 coreconfigitem(
681 b'devel',
681 b'devel',
682 b'warn-config-unknown',
682 b'warn-config-unknown',
683 default=None,
683 default=None,
684 )
684 )
685 coreconfigitem(
685 coreconfigitem(
686 b'devel',
686 b'devel',
687 b'debug.copies',
687 b'debug.copies',
688 default=False,
688 default=False,
689 )
689 )
690 coreconfigitem(
690 coreconfigitem(
691 b'devel',
691 b'devel',
692 b'debug.extensions',
692 b'debug.extensions',
693 default=False,
693 default=False,
694 )
694 )
695 coreconfigitem(
695 coreconfigitem(
696 b'devel',
696 b'devel',
697 b'debug.repo-filters',
697 b'debug.repo-filters',
698 default=False,
698 default=False,
699 )
699 )
700 coreconfigitem(
700 coreconfigitem(
701 b'devel',
701 b'devel',
702 b'debug.peer-request',
702 b'debug.peer-request',
703 default=False,
703 default=False,
704 )
704 )
705 # If discovery.exchange-heads is False, the discovery will not start with
705 # If discovery.exchange-heads is False, the discovery will not start with
706 # remote head fetching and local head querying.
706 # remote head fetching and local head querying.
707 coreconfigitem(
707 coreconfigitem(
708 b'devel',
708 b'devel',
709 b'discovery.exchange-heads',
709 b'discovery.exchange-heads',
710 default=True,
710 default=True,
711 )
711 )
712 # If discovery.grow-sample is False, the sample size used in set discovery will
712 # If discovery.grow-sample is False, the sample size used in set discovery will
713 # not be increased through the process
713 # not be increased through the process
714 coreconfigitem(
714 coreconfigitem(
715 b'devel',
715 b'devel',
716 b'discovery.grow-sample',
716 b'discovery.grow-sample',
717 default=True,
717 default=True,
718 )
718 )
719 # discovery.grow-sample.rate control the rate at which the sample grow
719 # discovery.grow-sample.rate control the rate at which the sample grow
720 coreconfigitem(
720 coreconfigitem(
721 b'devel',
721 b'devel',
722 b'discovery.grow-sample.rate',
722 b'discovery.grow-sample.rate',
723 default=1.05,
723 default=1.05,
724 )
724 )
725 # If discovery.randomize is False, random sampling during discovery are
725 # If discovery.randomize is False, random sampling during discovery are
726 # deterministic. It is meant for integration tests.
726 # deterministic. It is meant for integration tests.
727 coreconfigitem(
727 coreconfigitem(
728 b'devel',
728 b'devel',
729 b'discovery.randomize',
729 b'discovery.randomize',
730 default=True,
730 default=True,
731 )
731 )
732 # Control the initial size of the discovery sample
733 coreconfigitem(
734 b'devel',
735 b'discovery.sample-size',
736 default=200,
737 )
738 # Control the initial size of the discovery for initial change
739 coreconfigitem(
740 b'devel',
741 b'discovery.sample-size.initial',
742 default=100,
743 )
732 _registerdiffopts(section=b'diff')
744 _registerdiffopts(section=b'diff')
733 coreconfigitem(
745 coreconfigitem(
734 b'email',
746 b'email',
735 b'bcc',
747 b'bcc',
736 default=None,
748 default=None,
737 )
749 )
738 coreconfigitem(
750 coreconfigitem(
739 b'email',
751 b'email',
740 b'cc',
752 b'cc',
741 default=None,
753 default=None,
742 )
754 )
743 coreconfigitem(
755 coreconfigitem(
744 b'email',
756 b'email',
745 b'charsets',
757 b'charsets',
746 default=list,
758 default=list,
747 )
759 )
748 coreconfigitem(
760 coreconfigitem(
749 b'email',
761 b'email',
750 b'from',
762 b'from',
751 default=None,
763 default=None,
752 )
764 )
753 coreconfigitem(
765 coreconfigitem(
754 b'email',
766 b'email',
755 b'method',
767 b'method',
756 default=b'smtp',
768 default=b'smtp',
757 )
769 )
758 coreconfigitem(
770 coreconfigitem(
759 b'email',
771 b'email',
760 b'reply-to',
772 b'reply-to',
761 default=None,
773 default=None,
762 )
774 )
763 coreconfigitem(
775 coreconfigitem(
764 b'email',
776 b'email',
765 b'to',
777 b'to',
766 default=None,
778 default=None,
767 )
779 )
768 coreconfigitem(
780 coreconfigitem(
769 b'experimental',
781 b'experimental',
770 b'archivemetatemplate',
782 b'archivemetatemplate',
771 default=dynamicdefault,
783 default=dynamicdefault,
772 )
784 )
773 coreconfigitem(
785 coreconfigitem(
774 b'experimental',
786 b'experimental',
775 b'auto-publish',
787 b'auto-publish',
776 default=b'publish',
788 default=b'publish',
777 )
789 )
778 coreconfigitem(
790 coreconfigitem(
779 b'experimental',
791 b'experimental',
780 b'bundle-phases',
792 b'bundle-phases',
781 default=False,
793 default=False,
782 )
794 )
783 coreconfigitem(
795 coreconfigitem(
784 b'experimental',
796 b'experimental',
785 b'bundle2-advertise',
797 b'bundle2-advertise',
786 default=True,
798 default=True,
787 )
799 )
788 coreconfigitem(
800 coreconfigitem(
789 b'experimental',
801 b'experimental',
790 b'bundle2-output-capture',
802 b'bundle2-output-capture',
791 default=False,
803 default=False,
792 )
804 )
793 coreconfigitem(
805 coreconfigitem(
794 b'experimental',
806 b'experimental',
795 b'bundle2.pushback',
807 b'bundle2.pushback',
796 default=False,
808 default=False,
797 )
809 )
798 coreconfigitem(
810 coreconfigitem(
799 b'experimental',
811 b'experimental',
800 b'bundle2lazylocking',
812 b'bundle2lazylocking',
801 default=False,
813 default=False,
802 )
814 )
803 coreconfigitem(
815 coreconfigitem(
804 b'experimental',
816 b'experimental',
805 b'bundlecomplevel',
817 b'bundlecomplevel',
806 default=None,
818 default=None,
807 )
819 )
808 coreconfigitem(
820 coreconfigitem(
809 b'experimental',
821 b'experimental',
810 b'bundlecomplevel.bzip2',
822 b'bundlecomplevel.bzip2',
811 default=None,
823 default=None,
812 )
824 )
813 coreconfigitem(
825 coreconfigitem(
814 b'experimental',
826 b'experimental',
815 b'bundlecomplevel.gzip',
827 b'bundlecomplevel.gzip',
816 default=None,
828 default=None,
817 )
829 )
818 coreconfigitem(
830 coreconfigitem(
819 b'experimental',
831 b'experimental',
820 b'bundlecomplevel.none',
832 b'bundlecomplevel.none',
821 default=None,
833 default=None,
822 )
834 )
823 coreconfigitem(
835 coreconfigitem(
824 b'experimental',
836 b'experimental',
825 b'bundlecomplevel.zstd',
837 b'bundlecomplevel.zstd',
826 default=None,
838 default=None,
827 )
839 )
828 coreconfigitem(
840 coreconfigitem(
829 b'experimental',
841 b'experimental',
830 b'changegroup3',
842 b'changegroup3',
831 default=False,
843 default=False,
832 )
844 )
833 coreconfigitem(
845 coreconfigitem(
834 b'experimental',
846 b'experimental',
835 b'cleanup-as-archived',
847 b'cleanup-as-archived',
836 default=False,
848 default=False,
837 )
849 )
838 coreconfigitem(
850 coreconfigitem(
839 b'experimental',
851 b'experimental',
840 b'clientcompressionengines',
852 b'clientcompressionengines',
841 default=list,
853 default=list,
842 )
854 )
843 coreconfigitem(
855 coreconfigitem(
844 b'experimental',
856 b'experimental',
845 b'copytrace',
857 b'copytrace',
846 default=b'on',
858 default=b'on',
847 )
859 )
848 coreconfigitem(
860 coreconfigitem(
849 b'experimental',
861 b'experimental',
850 b'copytrace.movecandidateslimit',
862 b'copytrace.movecandidateslimit',
851 default=100,
863 default=100,
852 )
864 )
853 coreconfigitem(
865 coreconfigitem(
854 b'experimental',
866 b'experimental',
855 b'copytrace.sourcecommitlimit',
867 b'copytrace.sourcecommitlimit',
856 default=100,
868 default=100,
857 )
869 )
858 coreconfigitem(
870 coreconfigitem(
859 b'experimental',
871 b'experimental',
860 b'copies.read-from',
872 b'copies.read-from',
861 default=b"filelog-only",
873 default=b"filelog-only",
862 )
874 )
863 coreconfigitem(
875 coreconfigitem(
864 b'experimental',
876 b'experimental',
865 b'copies.write-to',
877 b'copies.write-to',
866 default=b'filelog-only',
878 default=b'filelog-only',
867 )
879 )
868 coreconfigitem(
880 coreconfigitem(
869 b'experimental',
881 b'experimental',
870 b'crecordtest',
882 b'crecordtest',
871 default=None,
883 default=None,
872 )
884 )
873 coreconfigitem(
885 coreconfigitem(
874 b'experimental',
886 b'experimental',
875 b'directaccess',
887 b'directaccess',
876 default=False,
888 default=False,
877 )
889 )
878 coreconfigitem(
890 coreconfigitem(
879 b'experimental',
891 b'experimental',
880 b'directaccess.revnums',
892 b'directaccess.revnums',
881 default=False,
893 default=False,
882 )
894 )
883 coreconfigitem(
895 coreconfigitem(
884 b'experimental',
896 b'experimental',
885 b'editortmpinhg',
897 b'editortmpinhg',
886 default=False,
898 default=False,
887 )
899 )
888 coreconfigitem(
900 coreconfigitem(
889 b'experimental',
901 b'experimental',
890 b'evolution',
902 b'evolution',
891 default=list,
903 default=list,
892 )
904 )
893 coreconfigitem(
905 coreconfigitem(
894 b'experimental',
906 b'experimental',
895 b'evolution.allowdivergence',
907 b'evolution.allowdivergence',
896 default=False,
908 default=False,
897 alias=[(b'experimental', b'allowdivergence')],
909 alias=[(b'experimental', b'allowdivergence')],
898 )
910 )
899 coreconfigitem(
911 coreconfigitem(
900 b'experimental',
912 b'experimental',
901 b'evolution.allowunstable',
913 b'evolution.allowunstable',
902 default=None,
914 default=None,
903 )
915 )
904 coreconfigitem(
916 coreconfigitem(
905 b'experimental',
917 b'experimental',
906 b'evolution.createmarkers',
918 b'evolution.createmarkers',
907 default=None,
919 default=None,
908 )
920 )
909 coreconfigitem(
921 coreconfigitem(
910 b'experimental',
922 b'experimental',
911 b'evolution.effect-flags',
923 b'evolution.effect-flags',
912 default=True,
924 default=True,
913 alias=[(b'experimental', b'effect-flags')],
925 alias=[(b'experimental', b'effect-flags')],
914 )
926 )
915 coreconfigitem(
927 coreconfigitem(
916 b'experimental',
928 b'experimental',
917 b'evolution.exchange',
929 b'evolution.exchange',
918 default=None,
930 default=None,
919 )
931 )
920 coreconfigitem(
932 coreconfigitem(
921 b'experimental',
933 b'experimental',
922 b'evolution.bundle-obsmarker',
934 b'evolution.bundle-obsmarker',
923 default=False,
935 default=False,
924 )
936 )
925 coreconfigitem(
937 coreconfigitem(
926 b'experimental',
938 b'experimental',
927 b'evolution.bundle-obsmarker:mandatory',
939 b'evolution.bundle-obsmarker:mandatory',
928 default=True,
940 default=True,
929 )
941 )
930 coreconfigitem(
942 coreconfigitem(
931 b'experimental',
943 b'experimental',
932 b'log.topo',
944 b'log.topo',
933 default=False,
945 default=False,
934 )
946 )
935 coreconfigitem(
947 coreconfigitem(
936 b'experimental',
948 b'experimental',
937 b'evolution.report-instabilities',
949 b'evolution.report-instabilities',
938 default=True,
950 default=True,
939 )
951 )
940 coreconfigitem(
952 coreconfigitem(
941 b'experimental',
953 b'experimental',
942 b'evolution.track-operation',
954 b'evolution.track-operation',
943 default=True,
955 default=True,
944 )
956 )
945 # repo-level config to exclude a revset visibility
957 # repo-level config to exclude a revset visibility
946 #
958 #
947 # The target use case is to use `share` to expose different subset of the same
959 # The target use case is to use `share` to expose different subset of the same
948 # repository, especially server side. See also `server.view`.
960 # repository, especially server side. See also `server.view`.
949 coreconfigitem(
961 coreconfigitem(
950 b'experimental',
962 b'experimental',
951 b'extra-filter-revs',
963 b'extra-filter-revs',
952 default=None,
964 default=None,
953 )
965 )
954 coreconfigitem(
966 coreconfigitem(
955 b'experimental',
967 b'experimental',
956 b'maxdeltachainspan',
968 b'maxdeltachainspan',
957 default=-1,
969 default=-1,
958 )
970 )
959 # tracks files which were undeleted (merge might delete them but we explicitly
971 # tracks files which were undeleted (merge might delete them but we explicitly
960 # kept/undeleted them) and creates new filenodes for them
972 # kept/undeleted them) and creates new filenodes for them
961 coreconfigitem(
973 coreconfigitem(
962 b'experimental',
974 b'experimental',
963 b'merge-track-salvaged',
975 b'merge-track-salvaged',
964 default=False,
976 default=False,
965 )
977 )
966 coreconfigitem(
978 coreconfigitem(
967 b'experimental',
979 b'experimental',
968 b'mergetempdirprefix',
980 b'mergetempdirprefix',
969 default=None,
981 default=None,
970 )
982 )
971 coreconfigitem(
983 coreconfigitem(
972 b'experimental',
984 b'experimental',
973 b'mmapindexthreshold',
985 b'mmapindexthreshold',
974 default=None,
986 default=None,
975 )
987 )
976 coreconfigitem(
988 coreconfigitem(
977 b'experimental',
989 b'experimental',
978 b'narrow',
990 b'narrow',
979 default=False,
991 default=False,
980 )
992 )
981 coreconfigitem(
993 coreconfigitem(
982 b'experimental',
994 b'experimental',
983 b'nonnormalparanoidcheck',
995 b'nonnormalparanoidcheck',
984 default=False,
996 default=False,
985 )
997 )
986 coreconfigitem(
998 coreconfigitem(
987 b'experimental',
999 b'experimental',
988 b'exportableenviron',
1000 b'exportableenviron',
989 default=list,
1001 default=list,
990 )
1002 )
991 coreconfigitem(
1003 coreconfigitem(
992 b'experimental',
1004 b'experimental',
993 b'extendedheader.index',
1005 b'extendedheader.index',
994 default=None,
1006 default=None,
995 )
1007 )
996 coreconfigitem(
1008 coreconfigitem(
997 b'experimental',
1009 b'experimental',
998 b'extendedheader.similarity',
1010 b'extendedheader.similarity',
999 default=False,
1011 default=False,
1000 )
1012 )
1001 coreconfigitem(
1013 coreconfigitem(
1002 b'experimental',
1014 b'experimental',
1003 b'graphshorten',
1015 b'graphshorten',
1004 default=False,
1016 default=False,
1005 )
1017 )
1006 coreconfigitem(
1018 coreconfigitem(
1007 b'experimental',
1019 b'experimental',
1008 b'graphstyle.parent',
1020 b'graphstyle.parent',
1009 default=dynamicdefault,
1021 default=dynamicdefault,
1010 )
1022 )
1011 coreconfigitem(
1023 coreconfigitem(
1012 b'experimental',
1024 b'experimental',
1013 b'graphstyle.missing',
1025 b'graphstyle.missing',
1014 default=dynamicdefault,
1026 default=dynamicdefault,
1015 )
1027 )
1016 coreconfigitem(
1028 coreconfigitem(
1017 b'experimental',
1029 b'experimental',
1018 b'graphstyle.grandparent',
1030 b'graphstyle.grandparent',
1019 default=dynamicdefault,
1031 default=dynamicdefault,
1020 )
1032 )
1021 coreconfigitem(
1033 coreconfigitem(
1022 b'experimental',
1034 b'experimental',
1023 b'hook-track-tags',
1035 b'hook-track-tags',
1024 default=False,
1036 default=False,
1025 )
1037 )
1026 coreconfigitem(
1038 coreconfigitem(
1027 b'experimental',
1039 b'experimental',
1028 b'httppeer.advertise-v2',
1040 b'httppeer.advertise-v2',
1029 default=False,
1041 default=False,
1030 )
1042 )
1031 coreconfigitem(
1043 coreconfigitem(
1032 b'experimental',
1044 b'experimental',
1033 b'httppeer.v2-encoder-order',
1045 b'httppeer.v2-encoder-order',
1034 default=None,
1046 default=None,
1035 )
1047 )
1036 coreconfigitem(
1048 coreconfigitem(
1037 b'experimental',
1049 b'experimental',
1038 b'httppostargs',
1050 b'httppostargs',
1039 default=False,
1051 default=False,
1040 )
1052 )
1041 coreconfigitem(b'experimental', b'nointerrupt', default=False)
1053 coreconfigitem(b'experimental', b'nointerrupt', default=False)
1042 coreconfigitem(b'experimental', b'nointerrupt-interactiveonly', default=True)
1054 coreconfigitem(b'experimental', b'nointerrupt-interactiveonly', default=True)
1043
1055
1044 coreconfigitem(
1056 coreconfigitem(
1045 b'experimental',
1057 b'experimental',
1046 b'obsmarkers-exchange-debug',
1058 b'obsmarkers-exchange-debug',
1047 default=False,
1059 default=False,
1048 )
1060 )
1049 coreconfigitem(
1061 coreconfigitem(
1050 b'experimental',
1062 b'experimental',
1051 b'remotenames',
1063 b'remotenames',
1052 default=False,
1064 default=False,
1053 )
1065 )
1054 coreconfigitem(
1066 coreconfigitem(
1055 b'experimental',
1067 b'experimental',
1056 b'removeemptydirs',
1068 b'removeemptydirs',
1057 default=True,
1069 default=True,
1058 )
1070 )
1059 coreconfigitem(
1071 coreconfigitem(
1060 b'experimental',
1072 b'experimental',
1061 b'revert.interactive.select-to-keep',
1073 b'revert.interactive.select-to-keep',
1062 default=False,
1074 default=False,
1063 )
1075 )
1064 coreconfigitem(
1076 coreconfigitem(
1065 b'experimental',
1077 b'experimental',
1066 b'revisions.prefixhexnode',
1078 b'revisions.prefixhexnode',
1067 default=False,
1079 default=False,
1068 )
1080 )
1069 coreconfigitem(
1081 coreconfigitem(
1070 b'experimental',
1082 b'experimental',
1071 b'revlogv2',
1083 b'revlogv2',
1072 default=None,
1084 default=None,
1073 )
1085 )
1074 coreconfigitem(
1086 coreconfigitem(
1075 b'experimental',
1087 b'experimental',
1076 b'revisions.disambiguatewithin',
1088 b'revisions.disambiguatewithin',
1077 default=None,
1089 default=None,
1078 )
1090 )
1079 coreconfigitem(
1091 coreconfigitem(
1080 b'experimental',
1092 b'experimental',
1081 b'rust.index',
1093 b'rust.index',
1082 default=False,
1094 default=False,
1083 )
1095 )
1084 coreconfigitem(
1096 coreconfigitem(
1085 b'experimental',
1097 b'experimental',
1086 b'server.filesdata.recommended-batch-size',
1098 b'server.filesdata.recommended-batch-size',
1087 default=50000,
1099 default=50000,
1088 )
1100 )
1089 coreconfigitem(
1101 coreconfigitem(
1090 b'experimental',
1102 b'experimental',
1091 b'server.manifestdata.recommended-batch-size',
1103 b'server.manifestdata.recommended-batch-size',
1092 default=100000,
1104 default=100000,
1093 )
1105 )
1094 coreconfigitem(
1106 coreconfigitem(
1095 b'experimental',
1107 b'experimental',
1096 b'server.stream-narrow-clones',
1108 b'server.stream-narrow-clones',
1097 default=False,
1109 default=False,
1098 )
1110 )
1099 coreconfigitem(
1111 coreconfigitem(
1100 b'experimental',
1112 b'experimental',
1101 b'single-head-per-branch',
1113 b'single-head-per-branch',
1102 default=False,
1114 default=False,
1103 )
1115 )
1104 coreconfigitem(
1116 coreconfigitem(
1105 b'experimental',
1117 b'experimental',
1106 b'single-head-per-branch:account-closed-heads',
1118 b'single-head-per-branch:account-closed-heads',
1107 default=False,
1119 default=False,
1108 )
1120 )
1109 coreconfigitem(
1121 coreconfigitem(
1110 b'experimental',
1122 b'experimental',
1111 b'single-head-per-branch:public-changes-only',
1123 b'single-head-per-branch:public-changes-only',
1112 default=False,
1124 default=False,
1113 )
1125 )
1114 coreconfigitem(
1126 coreconfigitem(
1115 b'experimental',
1127 b'experimental',
1116 b'sshserver.support-v2',
1128 b'sshserver.support-v2',
1117 default=False,
1129 default=False,
1118 )
1130 )
1119 coreconfigitem(
1131 coreconfigitem(
1120 b'experimental',
1132 b'experimental',
1121 b'sparse-read',
1133 b'sparse-read',
1122 default=False,
1134 default=False,
1123 )
1135 )
1124 coreconfigitem(
1136 coreconfigitem(
1125 b'experimental',
1137 b'experimental',
1126 b'sparse-read.density-threshold',
1138 b'sparse-read.density-threshold',
1127 default=0.50,
1139 default=0.50,
1128 )
1140 )
1129 coreconfigitem(
1141 coreconfigitem(
1130 b'experimental',
1142 b'experimental',
1131 b'sparse-read.min-gap-size',
1143 b'sparse-read.min-gap-size',
1132 default=b'65K',
1144 default=b'65K',
1133 )
1145 )
1134 coreconfigitem(
1146 coreconfigitem(
1135 b'experimental',
1147 b'experimental',
1136 b'treemanifest',
1148 b'treemanifest',
1137 default=False,
1149 default=False,
1138 )
1150 )
1139 coreconfigitem(
1151 coreconfigitem(
1140 b'experimental',
1152 b'experimental',
1141 b'update.atomic-file',
1153 b'update.atomic-file',
1142 default=False,
1154 default=False,
1143 )
1155 )
1144 coreconfigitem(
1156 coreconfigitem(
1145 b'experimental',
1157 b'experimental',
1146 b'sshpeer.advertise-v2',
1158 b'sshpeer.advertise-v2',
1147 default=False,
1159 default=False,
1148 )
1160 )
1149 coreconfigitem(
1161 coreconfigitem(
1150 b'experimental',
1162 b'experimental',
1151 b'web.apiserver',
1163 b'web.apiserver',
1152 default=False,
1164 default=False,
1153 )
1165 )
1154 coreconfigitem(
1166 coreconfigitem(
1155 b'experimental',
1167 b'experimental',
1156 b'web.api.http-v2',
1168 b'web.api.http-v2',
1157 default=False,
1169 default=False,
1158 )
1170 )
1159 coreconfigitem(
1171 coreconfigitem(
1160 b'experimental',
1172 b'experimental',
1161 b'web.api.debugreflect',
1173 b'web.api.debugreflect',
1162 default=False,
1174 default=False,
1163 )
1175 )
1164 coreconfigitem(
1176 coreconfigitem(
1165 b'experimental',
1177 b'experimental',
1166 b'worker.wdir-get-thread-safe',
1178 b'worker.wdir-get-thread-safe',
1167 default=False,
1179 default=False,
1168 )
1180 )
1169 coreconfigitem(
1181 coreconfigitem(
1170 b'experimental',
1182 b'experimental',
1171 b'worker.repository-upgrade',
1183 b'worker.repository-upgrade',
1172 default=False,
1184 default=False,
1173 )
1185 )
1174 coreconfigitem(
1186 coreconfigitem(
1175 b'experimental',
1187 b'experimental',
1176 b'xdiff',
1188 b'xdiff',
1177 default=False,
1189 default=False,
1178 )
1190 )
1179 coreconfigitem(
1191 coreconfigitem(
1180 b'extensions',
1192 b'extensions',
1181 b'.*',
1193 b'.*',
1182 default=None,
1194 default=None,
1183 generic=True,
1195 generic=True,
1184 )
1196 )
1185 coreconfigitem(
1197 coreconfigitem(
1186 b'extdata',
1198 b'extdata',
1187 b'.*',
1199 b'.*',
1188 default=None,
1200 default=None,
1189 generic=True,
1201 generic=True,
1190 )
1202 )
1191 coreconfigitem(
1203 coreconfigitem(
1192 b'format',
1204 b'format',
1193 b'bookmarks-in-store',
1205 b'bookmarks-in-store',
1194 default=False,
1206 default=False,
1195 )
1207 )
1196 coreconfigitem(
1208 coreconfigitem(
1197 b'format',
1209 b'format',
1198 b'chunkcachesize',
1210 b'chunkcachesize',
1199 default=None,
1211 default=None,
1200 experimental=True,
1212 experimental=True,
1201 )
1213 )
1202 coreconfigitem(
1214 coreconfigitem(
1203 b'format',
1215 b'format',
1204 b'dotencode',
1216 b'dotencode',
1205 default=True,
1217 default=True,
1206 )
1218 )
1207 coreconfigitem(
1219 coreconfigitem(
1208 b'format',
1220 b'format',
1209 b'generaldelta',
1221 b'generaldelta',
1210 default=False,
1222 default=False,
1211 experimental=True,
1223 experimental=True,
1212 )
1224 )
1213 coreconfigitem(
1225 coreconfigitem(
1214 b'format',
1226 b'format',
1215 b'manifestcachesize',
1227 b'manifestcachesize',
1216 default=None,
1228 default=None,
1217 experimental=True,
1229 experimental=True,
1218 )
1230 )
1219 coreconfigitem(
1231 coreconfigitem(
1220 b'format',
1232 b'format',
1221 b'maxchainlen',
1233 b'maxchainlen',
1222 default=dynamicdefault,
1234 default=dynamicdefault,
1223 experimental=True,
1235 experimental=True,
1224 )
1236 )
1225 coreconfigitem(
1237 coreconfigitem(
1226 b'format',
1238 b'format',
1227 b'obsstore-version',
1239 b'obsstore-version',
1228 default=None,
1240 default=None,
1229 )
1241 )
1230 coreconfigitem(
1242 coreconfigitem(
1231 b'format',
1243 b'format',
1232 b'sparse-revlog',
1244 b'sparse-revlog',
1233 default=True,
1245 default=True,
1234 )
1246 )
1235 coreconfigitem(
1247 coreconfigitem(
1236 b'format',
1248 b'format',
1237 b'revlog-compression',
1249 b'revlog-compression',
1238 default=lambda: [b'zlib'],
1250 default=lambda: [b'zlib'],
1239 alias=[(b'experimental', b'format.compression')],
1251 alias=[(b'experimental', b'format.compression')],
1240 )
1252 )
1241 coreconfigitem(
1253 coreconfigitem(
1242 b'format',
1254 b'format',
1243 b'usefncache',
1255 b'usefncache',
1244 default=True,
1256 default=True,
1245 )
1257 )
1246 coreconfigitem(
1258 coreconfigitem(
1247 b'format',
1259 b'format',
1248 b'usegeneraldelta',
1260 b'usegeneraldelta',
1249 default=True,
1261 default=True,
1250 )
1262 )
1251 coreconfigitem(
1263 coreconfigitem(
1252 b'format',
1264 b'format',
1253 b'usestore',
1265 b'usestore',
1254 default=True,
1266 default=True,
1255 )
1267 )
1256 coreconfigitem(
1268 coreconfigitem(
1257 b'format',
1269 b'format',
1258 b'use-persistent-nodemap',
1270 b'use-persistent-nodemap',
1259 default=False,
1271 default=False,
1260 )
1272 )
1261 coreconfigitem(
1273 coreconfigitem(
1262 b'format',
1274 b'format',
1263 b'exp-use-copies-side-data-changeset',
1275 b'exp-use-copies-side-data-changeset',
1264 default=False,
1276 default=False,
1265 experimental=True,
1277 experimental=True,
1266 )
1278 )
1267 coreconfigitem(
1279 coreconfigitem(
1268 b'format',
1280 b'format',
1269 b'exp-use-side-data',
1281 b'exp-use-side-data',
1270 default=False,
1282 default=False,
1271 experimental=True,
1283 experimental=True,
1272 )
1284 )
1273 coreconfigitem(
1285 coreconfigitem(
1274 b'format',
1286 b'format',
1275 b'use-share-safe',
1287 b'use-share-safe',
1276 default=False,
1288 default=False,
1277 )
1289 )
1278 coreconfigitem(
1290 coreconfigitem(
1279 b'format',
1291 b'format',
1280 b'internal-phase',
1292 b'internal-phase',
1281 default=False,
1293 default=False,
1282 experimental=True,
1294 experimental=True,
1283 )
1295 )
1284 coreconfigitem(
1296 coreconfigitem(
1285 b'fsmonitor',
1297 b'fsmonitor',
1286 b'warn_when_unused',
1298 b'warn_when_unused',
1287 default=True,
1299 default=True,
1288 )
1300 )
1289 coreconfigitem(
1301 coreconfigitem(
1290 b'fsmonitor',
1302 b'fsmonitor',
1291 b'warn_update_file_count',
1303 b'warn_update_file_count',
1292 default=50000,
1304 default=50000,
1293 )
1305 )
1294 coreconfigitem(
1306 coreconfigitem(
1295 b'fsmonitor',
1307 b'fsmonitor',
1296 b'warn_update_file_count_rust',
1308 b'warn_update_file_count_rust',
1297 default=400000,
1309 default=400000,
1298 )
1310 )
1299 coreconfigitem(
1311 coreconfigitem(
1300 b'help',
1312 b'help',
1301 br'hidden-command\..*',
1313 br'hidden-command\..*',
1302 default=False,
1314 default=False,
1303 generic=True,
1315 generic=True,
1304 )
1316 )
1305 coreconfigitem(
1317 coreconfigitem(
1306 b'help',
1318 b'help',
1307 br'hidden-topic\..*',
1319 br'hidden-topic\..*',
1308 default=False,
1320 default=False,
1309 generic=True,
1321 generic=True,
1310 )
1322 )
1311 coreconfigitem(
1323 coreconfigitem(
1312 b'hooks',
1324 b'hooks',
1313 b'.*',
1325 b'.*',
1314 default=dynamicdefault,
1326 default=dynamicdefault,
1315 generic=True,
1327 generic=True,
1316 )
1328 )
1317 coreconfigitem(
1329 coreconfigitem(
1318 b'hgweb-paths',
1330 b'hgweb-paths',
1319 b'.*',
1331 b'.*',
1320 default=list,
1332 default=list,
1321 generic=True,
1333 generic=True,
1322 )
1334 )
1323 coreconfigitem(
1335 coreconfigitem(
1324 b'hostfingerprints',
1336 b'hostfingerprints',
1325 b'.*',
1337 b'.*',
1326 default=list,
1338 default=list,
1327 generic=True,
1339 generic=True,
1328 )
1340 )
1329 coreconfigitem(
1341 coreconfigitem(
1330 b'hostsecurity',
1342 b'hostsecurity',
1331 b'ciphers',
1343 b'ciphers',
1332 default=None,
1344 default=None,
1333 )
1345 )
1334 coreconfigitem(
1346 coreconfigitem(
1335 b'hostsecurity',
1347 b'hostsecurity',
1336 b'minimumprotocol',
1348 b'minimumprotocol',
1337 default=dynamicdefault,
1349 default=dynamicdefault,
1338 )
1350 )
1339 coreconfigitem(
1351 coreconfigitem(
1340 b'hostsecurity',
1352 b'hostsecurity',
1341 b'.*:minimumprotocol$',
1353 b'.*:minimumprotocol$',
1342 default=dynamicdefault,
1354 default=dynamicdefault,
1343 generic=True,
1355 generic=True,
1344 )
1356 )
1345 coreconfigitem(
1357 coreconfigitem(
1346 b'hostsecurity',
1358 b'hostsecurity',
1347 b'.*:ciphers$',
1359 b'.*:ciphers$',
1348 default=dynamicdefault,
1360 default=dynamicdefault,
1349 generic=True,
1361 generic=True,
1350 )
1362 )
1351 coreconfigitem(
1363 coreconfigitem(
1352 b'hostsecurity',
1364 b'hostsecurity',
1353 b'.*:fingerprints$',
1365 b'.*:fingerprints$',
1354 default=list,
1366 default=list,
1355 generic=True,
1367 generic=True,
1356 )
1368 )
1357 coreconfigitem(
1369 coreconfigitem(
1358 b'hostsecurity',
1370 b'hostsecurity',
1359 b'.*:verifycertsfile$',
1371 b'.*:verifycertsfile$',
1360 default=None,
1372 default=None,
1361 generic=True,
1373 generic=True,
1362 )
1374 )
1363
1375
1364 coreconfigitem(
1376 coreconfigitem(
1365 b'http_proxy',
1377 b'http_proxy',
1366 b'always',
1378 b'always',
1367 default=False,
1379 default=False,
1368 )
1380 )
1369 coreconfigitem(
1381 coreconfigitem(
1370 b'http_proxy',
1382 b'http_proxy',
1371 b'host',
1383 b'host',
1372 default=None,
1384 default=None,
1373 )
1385 )
1374 coreconfigitem(
1386 coreconfigitem(
1375 b'http_proxy',
1387 b'http_proxy',
1376 b'no',
1388 b'no',
1377 default=list,
1389 default=list,
1378 )
1390 )
1379 coreconfigitem(
1391 coreconfigitem(
1380 b'http_proxy',
1392 b'http_proxy',
1381 b'passwd',
1393 b'passwd',
1382 default=None,
1394 default=None,
1383 )
1395 )
1384 coreconfigitem(
1396 coreconfigitem(
1385 b'http_proxy',
1397 b'http_proxy',
1386 b'user',
1398 b'user',
1387 default=None,
1399 default=None,
1388 )
1400 )
1389
1401
1390 coreconfigitem(
1402 coreconfigitem(
1391 b'http',
1403 b'http',
1392 b'timeout',
1404 b'timeout',
1393 default=None,
1405 default=None,
1394 )
1406 )
1395
1407
1396 coreconfigitem(
1408 coreconfigitem(
1397 b'logtoprocess',
1409 b'logtoprocess',
1398 b'commandexception',
1410 b'commandexception',
1399 default=None,
1411 default=None,
1400 )
1412 )
1401 coreconfigitem(
1413 coreconfigitem(
1402 b'logtoprocess',
1414 b'logtoprocess',
1403 b'commandfinish',
1415 b'commandfinish',
1404 default=None,
1416 default=None,
1405 )
1417 )
1406 coreconfigitem(
1418 coreconfigitem(
1407 b'logtoprocess',
1419 b'logtoprocess',
1408 b'command',
1420 b'command',
1409 default=None,
1421 default=None,
1410 )
1422 )
1411 coreconfigitem(
1423 coreconfigitem(
1412 b'logtoprocess',
1424 b'logtoprocess',
1413 b'develwarn',
1425 b'develwarn',
1414 default=None,
1426 default=None,
1415 )
1427 )
1416 coreconfigitem(
1428 coreconfigitem(
1417 b'logtoprocess',
1429 b'logtoprocess',
1418 b'uiblocked',
1430 b'uiblocked',
1419 default=None,
1431 default=None,
1420 )
1432 )
1421 coreconfigitem(
1433 coreconfigitem(
1422 b'merge',
1434 b'merge',
1423 b'checkunknown',
1435 b'checkunknown',
1424 default=b'abort',
1436 default=b'abort',
1425 )
1437 )
1426 coreconfigitem(
1438 coreconfigitem(
1427 b'merge',
1439 b'merge',
1428 b'checkignored',
1440 b'checkignored',
1429 default=b'abort',
1441 default=b'abort',
1430 )
1442 )
1431 coreconfigitem(
1443 coreconfigitem(
1432 b'experimental',
1444 b'experimental',
1433 b'merge.checkpathconflicts',
1445 b'merge.checkpathconflicts',
1434 default=False,
1446 default=False,
1435 )
1447 )
1436 coreconfigitem(
1448 coreconfigitem(
1437 b'merge',
1449 b'merge',
1438 b'followcopies',
1450 b'followcopies',
1439 default=True,
1451 default=True,
1440 )
1452 )
1441 coreconfigitem(
1453 coreconfigitem(
1442 b'merge',
1454 b'merge',
1443 b'on-failure',
1455 b'on-failure',
1444 default=b'continue',
1456 default=b'continue',
1445 )
1457 )
1446 coreconfigitem(
1458 coreconfigitem(
1447 b'merge',
1459 b'merge',
1448 b'preferancestor',
1460 b'preferancestor',
1449 default=lambda: [b'*'],
1461 default=lambda: [b'*'],
1450 experimental=True,
1462 experimental=True,
1451 )
1463 )
1452 coreconfigitem(
1464 coreconfigitem(
1453 b'merge',
1465 b'merge',
1454 b'strict-capability-check',
1466 b'strict-capability-check',
1455 default=False,
1467 default=False,
1456 )
1468 )
1457 coreconfigitem(
1469 coreconfigitem(
1458 b'merge-tools',
1470 b'merge-tools',
1459 b'.*',
1471 b'.*',
1460 default=None,
1472 default=None,
1461 generic=True,
1473 generic=True,
1462 )
1474 )
1463 coreconfigitem(
1475 coreconfigitem(
1464 b'merge-tools',
1476 b'merge-tools',
1465 br'.*\.args$',
1477 br'.*\.args$',
1466 default=b"$local $base $other",
1478 default=b"$local $base $other",
1467 generic=True,
1479 generic=True,
1468 priority=-1,
1480 priority=-1,
1469 )
1481 )
1470 coreconfigitem(
1482 coreconfigitem(
1471 b'merge-tools',
1483 b'merge-tools',
1472 br'.*\.binary$',
1484 br'.*\.binary$',
1473 default=False,
1485 default=False,
1474 generic=True,
1486 generic=True,
1475 priority=-1,
1487 priority=-1,
1476 )
1488 )
1477 coreconfigitem(
1489 coreconfigitem(
1478 b'merge-tools',
1490 b'merge-tools',
1479 br'.*\.check$',
1491 br'.*\.check$',
1480 default=list,
1492 default=list,
1481 generic=True,
1493 generic=True,
1482 priority=-1,
1494 priority=-1,
1483 )
1495 )
1484 coreconfigitem(
1496 coreconfigitem(
1485 b'merge-tools',
1497 b'merge-tools',
1486 br'.*\.checkchanged$',
1498 br'.*\.checkchanged$',
1487 default=False,
1499 default=False,
1488 generic=True,
1500 generic=True,
1489 priority=-1,
1501 priority=-1,
1490 )
1502 )
1491 coreconfigitem(
1503 coreconfigitem(
1492 b'merge-tools',
1504 b'merge-tools',
1493 br'.*\.executable$',
1505 br'.*\.executable$',
1494 default=dynamicdefault,
1506 default=dynamicdefault,
1495 generic=True,
1507 generic=True,
1496 priority=-1,
1508 priority=-1,
1497 )
1509 )
1498 coreconfigitem(
1510 coreconfigitem(
1499 b'merge-tools',
1511 b'merge-tools',
1500 br'.*\.fixeol$',
1512 br'.*\.fixeol$',
1501 default=False,
1513 default=False,
1502 generic=True,
1514 generic=True,
1503 priority=-1,
1515 priority=-1,
1504 )
1516 )
1505 coreconfigitem(
1517 coreconfigitem(
1506 b'merge-tools',
1518 b'merge-tools',
1507 br'.*\.gui$',
1519 br'.*\.gui$',
1508 default=False,
1520 default=False,
1509 generic=True,
1521 generic=True,
1510 priority=-1,
1522 priority=-1,
1511 )
1523 )
1512 coreconfigitem(
1524 coreconfigitem(
1513 b'merge-tools',
1525 b'merge-tools',
1514 br'.*\.mergemarkers$',
1526 br'.*\.mergemarkers$',
1515 default=b'basic',
1527 default=b'basic',
1516 generic=True,
1528 generic=True,
1517 priority=-1,
1529 priority=-1,
1518 )
1530 )
1519 coreconfigitem(
1531 coreconfigitem(
1520 b'merge-tools',
1532 b'merge-tools',
1521 br'.*\.mergemarkertemplate$',
1533 br'.*\.mergemarkertemplate$',
1522 default=dynamicdefault, # take from command-templates.mergemarker
1534 default=dynamicdefault, # take from command-templates.mergemarker
1523 generic=True,
1535 generic=True,
1524 priority=-1,
1536 priority=-1,
1525 )
1537 )
1526 coreconfigitem(
1538 coreconfigitem(
1527 b'merge-tools',
1539 b'merge-tools',
1528 br'.*\.priority$',
1540 br'.*\.priority$',
1529 default=0,
1541 default=0,
1530 generic=True,
1542 generic=True,
1531 priority=-1,
1543 priority=-1,
1532 )
1544 )
1533 coreconfigitem(
1545 coreconfigitem(
1534 b'merge-tools',
1546 b'merge-tools',
1535 br'.*\.premerge$',
1547 br'.*\.premerge$',
1536 default=dynamicdefault,
1548 default=dynamicdefault,
1537 generic=True,
1549 generic=True,
1538 priority=-1,
1550 priority=-1,
1539 )
1551 )
1540 coreconfigitem(
1552 coreconfigitem(
1541 b'merge-tools',
1553 b'merge-tools',
1542 br'.*\.symlink$',
1554 br'.*\.symlink$',
1543 default=False,
1555 default=False,
1544 generic=True,
1556 generic=True,
1545 priority=-1,
1557 priority=-1,
1546 )
1558 )
1547 coreconfigitem(
1559 coreconfigitem(
1548 b'pager',
1560 b'pager',
1549 b'attend-.*',
1561 b'attend-.*',
1550 default=dynamicdefault,
1562 default=dynamicdefault,
1551 generic=True,
1563 generic=True,
1552 )
1564 )
1553 coreconfigitem(
1565 coreconfigitem(
1554 b'pager',
1566 b'pager',
1555 b'ignore',
1567 b'ignore',
1556 default=list,
1568 default=list,
1557 )
1569 )
1558 coreconfigitem(
1570 coreconfigitem(
1559 b'pager',
1571 b'pager',
1560 b'pager',
1572 b'pager',
1561 default=dynamicdefault,
1573 default=dynamicdefault,
1562 )
1574 )
1563 coreconfigitem(
1575 coreconfigitem(
1564 b'patch',
1576 b'patch',
1565 b'eol',
1577 b'eol',
1566 default=b'strict',
1578 default=b'strict',
1567 )
1579 )
1568 coreconfigitem(
1580 coreconfigitem(
1569 b'patch',
1581 b'patch',
1570 b'fuzz',
1582 b'fuzz',
1571 default=2,
1583 default=2,
1572 )
1584 )
1573 coreconfigitem(
1585 coreconfigitem(
1574 b'paths',
1586 b'paths',
1575 b'default',
1587 b'default',
1576 default=None,
1588 default=None,
1577 )
1589 )
1578 coreconfigitem(
1590 coreconfigitem(
1579 b'paths',
1591 b'paths',
1580 b'default-push',
1592 b'default-push',
1581 default=None,
1593 default=None,
1582 )
1594 )
1583 coreconfigitem(
1595 coreconfigitem(
1584 b'paths',
1596 b'paths',
1585 b'.*',
1597 b'.*',
1586 default=None,
1598 default=None,
1587 generic=True,
1599 generic=True,
1588 )
1600 )
1589 coreconfigitem(
1601 coreconfigitem(
1590 b'phases',
1602 b'phases',
1591 b'checksubrepos',
1603 b'checksubrepos',
1592 default=b'follow',
1604 default=b'follow',
1593 )
1605 )
1594 coreconfigitem(
1606 coreconfigitem(
1595 b'phases',
1607 b'phases',
1596 b'new-commit',
1608 b'new-commit',
1597 default=b'draft',
1609 default=b'draft',
1598 )
1610 )
1599 coreconfigitem(
1611 coreconfigitem(
1600 b'phases',
1612 b'phases',
1601 b'publish',
1613 b'publish',
1602 default=True,
1614 default=True,
1603 )
1615 )
1604 coreconfigitem(
1616 coreconfigitem(
1605 b'profiling',
1617 b'profiling',
1606 b'enabled',
1618 b'enabled',
1607 default=False,
1619 default=False,
1608 )
1620 )
1609 coreconfigitem(
1621 coreconfigitem(
1610 b'profiling',
1622 b'profiling',
1611 b'format',
1623 b'format',
1612 default=b'text',
1624 default=b'text',
1613 )
1625 )
1614 coreconfigitem(
1626 coreconfigitem(
1615 b'profiling',
1627 b'profiling',
1616 b'freq',
1628 b'freq',
1617 default=1000,
1629 default=1000,
1618 )
1630 )
1619 coreconfigitem(
1631 coreconfigitem(
1620 b'profiling',
1632 b'profiling',
1621 b'limit',
1633 b'limit',
1622 default=30,
1634 default=30,
1623 )
1635 )
1624 coreconfigitem(
1636 coreconfigitem(
1625 b'profiling',
1637 b'profiling',
1626 b'nested',
1638 b'nested',
1627 default=0,
1639 default=0,
1628 )
1640 )
1629 coreconfigitem(
1641 coreconfigitem(
1630 b'profiling',
1642 b'profiling',
1631 b'output',
1643 b'output',
1632 default=None,
1644 default=None,
1633 )
1645 )
1634 coreconfigitem(
1646 coreconfigitem(
1635 b'profiling',
1647 b'profiling',
1636 b'showmax',
1648 b'showmax',
1637 default=0.999,
1649 default=0.999,
1638 )
1650 )
1639 coreconfigitem(
1651 coreconfigitem(
1640 b'profiling',
1652 b'profiling',
1641 b'showmin',
1653 b'showmin',
1642 default=dynamicdefault,
1654 default=dynamicdefault,
1643 )
1655 )
1644 coreconfigitem(
1656 coreconfigitem(
1645 b'profiling',
1657 b'profiling',
1646 b'showtime',
1658 b'showtime',
1647 default=True,
1659 default=True,
1648 )
1660 )
1649 coreconfigitem(
1661 coreconfigitem(
1650 b'profiling',
1662 b'profiling',
1651 b'sort',
1663 b'sort',
1652 default=b'inlinetime',
1664 default=b'inlinetime',
1653 )
1665 )
1654 coreconfigitem(
1666 coreconfigitem(
1655 b'profiling',
1667 b'profiling',
1656 b'statformat',
1668 b'statformat',
1657 default=b'hotpath',
1669 default=b'hotpath',
1658 )
1670 )
1659 coreconfigitem(
1671 coreconfigitem(
1660 b'profiling',
1672 b'profiling',
1661 b'time-track',
1673 b'time-track',
1662 default=dynamicdefault,
1674 default=dynamicdefault,
1663 )
1675 )
1664 coreconfigitem(
1676 coreconfigitem(
1665 b'profiling',
1677 b'profiling',
1666 b'type',
1678 b'type',
1667 default=b'stat',
1679 default=b'stat',
1668 )
1680 )
1669 coreconfigitem(
1681 coreconfigitem(
1670 b'progress',
1682 b'progress',
1671 b'assume-tty',
1683 b'assume-tty',
1672 default=False,
1684 default=False,
1673 )
1685 )
1674 coreconfigitem(
1686 coreconfigitem(
1675 b'progress',
1687 b'progress',
1676 b'changedelay',
1688 b'changedelay',
1677 default=1,
1689 default=1,
1678 )
1690 )
1679 coreconfigitem(
1691 coreconfigitem(
1680 b'progress',
1692 b'progress',
1681 b'clear-complete',
1693 b'clear-complete',
1682 default=True,
1694 default=True,
1683 )
1695 )
1684 coreconfigitem(
1696 coreconfigitem(
1685 b'progress',
1697 b'progress',
1686 b'debug',
1698 b'debug',
1687 default=False,
1699 default=False,
1688 )
1700 )
1689 coreconfigitem(
1701 coreconfigitem(
1690 b'progress',
1702 b'progress',
1691 b'delay',
1703 b'delay',
1692 default=3,
1704 default=3,
1693 )
1705 )
1694 coreconfigitem(
1706 coreconfigitem(
1695 b'progress',
1707 b'progress',
1696 b'disable',
1708 b'disable',
1697 default=False,
1709 default=False,
1698 )
1710 )
1699 coreconfigitem(
1711 coreconfigitem(
1700 b'progress',
1712 b'progress',
1701 b'estimateinterval',
1713 b'estimateinterval',
1702 default=60.0,
1714 default=60.0,
1703 )
1715 )
1704 coreconfigitem(
1716 coreconfigitem(
1705 b'progress',
1717 b'progress',
1706 b'format',
1718 b'format',
1707 default=lambda: [b'topic', b'bar', b'number', b'estimate'],
1719 default=lambda: [b'topic', b'bar', b'number', b'estimate'],
1708 )
1720 )
1709 coreconfigitem(
1721 coreconfigitem(
1710 b'progress',
1722 b'progress',
1711 b'refresh',
1723 b'refresh',
1712 default=0.1,
1724 default=0.1,
1713 )
1725 )
1714 coreconfigitem(
1726 coreconfigitem(
1715 b'progress',
1727 b'progress',
1716 b'width',
1728 b'width',
1717 default=dynamicdefault,
1729 default=dynamicdefault,
1718 )
1730 )
1719 coreconfigitem(
1731 coreconfigitem(
1720 b'pull',
1732 b'pull',
1721 b'confirm',
1733 b'confirm',
1722 default=False,
1734 default=False,
1723 )
1735 )
1724 coreconfigitem(
1736 coreconfigitem(
1725 b'push',
1737 b'push',
1726 b'pushvars.server',
1738 b'pushvars.server',
1727 default=False,
1739 default=False,
1728 )
1740 )
1729 coreconfigitem(
1741 coreconfigitem(
1730 b'rewrite',
1742 b'rewrite',
1731 b'backup-bundle',
1743 b'backup-bundle',
1732 default=True,
1744 default=True,
1733 alias=[(b'ui', b'history-editing-backup')],
1745 alias=[(b'ui', b'history-editing-backup')],
1734 )
1746 )
1735 coreconfigitem(
1747 coreconfigitem(
1736 b'rewrite',
1748 b'rewrite',
1737 b'update-timestamp',
1749 b'update-timestamp',
1738 default=False,
1750 default=False,
1739 )
1751 )
1740 coreconfigitem(
1752 coreconfigitem(
1741 b'rewrite',
1753 b'rewrite',
1742 b'empty-successor',
1754 b'empty-successor',
1743 default=b'skip',
1755 default=b'skip',
1744 experimental=True,
1756 experimental=True,
1745 )
1757 )
1746 coreconfigitem(
1758 coreconfigitem(
1747 b'storage',
1759 b'storage',
1748 b'new-repo-backend',
1760 b'new-repo-backend',
1749 default=b'revlogv1',
1761 default=b'revlogv1',
1750 experimental=True,
1762 experimental=True,
1751 )
1763 )
1752 coreconfigitem(
1764 coreconfigitem(
1753 b'storage',
1765 b'storage',
1754 b'revlog.optimize-delta-parent-choice',
1766 b'revlog.optimize-delta-parent-choice',
1755 default=True,
1767 default=True,
1756 alias=[(b'format', b'aggressivemergedeltas')],
1768 alias=[(b'format', b'aggressivemergedeltas')],
1757 )
1769 )
1758 # experimental as long as rust is experimental (or a C version is implemented)
1770 # experimental as long as rust is experimental (or a C version is implemented)
1759 coreconfigitem(
1771 coreconfigitem(
1760 b'storage',
1772 b'storage',
1761 b'revlog.persistent-nodemap.mmap',
1773 b'revlog.persistent-nodemap.mmap',
1762 default=True,
1774 default=True,
1763 )
1775 )
1764 # experimental as long as format.use-persistent-nodemap is.
1776 # experimental as long as format.use-persistent-nodemap is.
1765 coreconfigitem(
1777 coreconfigitem(
1766 b'storage',
1778 b'storage',
1767 b'revlog.persistent-nodemap.slow-path',
1779 b'revlog.persistent-nodemap.slow-path',
1768 default=b"abort",
1780 default=b"abort",
1769 )
1781 )
1770
1782
1771 coreconfigitem(
1783 coreconfigitem(
1772 b'storage',
1784 b'storage',
1773 b'revlog.reuse-external-delta',
1785 b'revlog.reuse-external-delta',
1774 default=True,
1786 default=True,
1775 )
1787 )
1776 coreconfigitem(
1788 coreconfigitem(
1777 b'storage',
1789 b'storage',
1778 b'revlog.reuse-external-delta-parent',
1790 b'revlog.reuse-external-delta-parent',
1779 default=None,
1791 default=None,
1780 )
1792 )
1781 coreconfigitem(
1793 coreconfigitem(
1782 b'storage',
1794 b'storage',
1783 b'revlog.zlib.level',
1795 b'revlog.zlib.level',
1784 default=None,
1796 default=None,
1785 )
1797 )
1786 coreconfigitem(
1798 coreconfigitem(
1787 b'storage',
1799 b'storage',
1788 b'revlog.zstd.level',
1800 b'revlog.zstd.level',
1789 default=None,
1801 default=None,
1790 )
1802 )
1791 coreconfigitem(
1803 coreconfigitem(
1792 b'server',
1804 b'server',
1793 b'bookmarks-pushkey-compat',
1805 b'bookmarks-pushkey-compat',
1794 default=True,
1806 default=True,
1795 )
1807 )
1796 coreconfigitem(
1808 coreconfigitem(
1797 b'server',
1809 b'server',
1798 b'bundle1',
1810 b'bundle1',
1799 default=True,
1811 default=True,
1800 )
1812 )
1801 coreconfigitem(
1813 coreconfigitem(
1802 b'server',
1814 b'server',
1803 b'bundle1gd',
1815 b'bundle1gd',
1804 default=None,
1816 default=None,
1805 )
1817 )
1806 coreconfigitem(
1818 coreconfigitem(
1807 b'server',
1819 b'server',
1808 b'bundle1.pull',
1820 b'bundle1.pull',
1809 default=None,
1821 default=None,
1810 )
1822 )
1811 coreconfigitem(
1823 coreconfigitem(
1812 b'server',
1824 b'server',
1813 b'bundle1gd.pull',
1825 b'bundle1gd.pull',
1814 default=None,
1826 default=None,
1815 )
1827 )
1816 coreconfigitem(
1828 coreconfigitem(
1817 b'server',
1829 b'server',
1818 b'bundle1.push',
1830 b'bundle1.push',
1819 default=None,
1831 default=None,
1820 )
1832 )
1821 coreconfigitem(
1833 coreconfigitem(
1822 b'server',
1834 b'server',
1823 b'bundle1gd.push',
1835 b'bundle1gd.push',
1824 default=None,
1836 default=None,
1825 )
1837 )
1826 coreconfigitem(
1838 coreconfigitem(
1827 b'server',
1839 b'server',
1828 b'bundle2.stream',
1840 b'bundle2.stream',
1829 default=True,
1841 default=True,
1830 alias=[(b'experimental', b'bundle2.stream')],
1842 alias=[(b'experimental', b'bundle2.stream')],
1831 )
1843 )
1832 coreconfigitem(
1844 coreconfigitem(
1833 b'server',
1845 b'server',
1834 b'compressionengines',
1846 b'compressionengines',
1835 default=list,
1847 default=list,
1836 )
1848 )
1837 coreconfigitem(
1849 coreconfigitem(
1838 b'server',
1850 b'server',
1839 b'concurrent-push-mode',
1851 b'concurrent-push-mode',
1840 default=b'check-related',
1852 default=b'check-related',
1841 )
1853 )
1842 coreconfigitem(
1854 coreconfigitem(
1843 b'server',
1855 b'server',
1844 b'disablefullbundle',
1856 b'disablefullbundle',
1845 default=False,
1857 default=False,
1846 )
1858 )
1847 coreconfigitem(
1859 coreconfigitem(
1848 b'server',
1860 b'server',
1849 b'maxhttpheaderlen',
1861 b'maxhttpheaderlen',
1850 default=1024,
1862 default=1024,
1851 )
1863 )
1852 coreconfigitem(
1864 coreconfigitem(
1853 b'server',
1865 b'server',
1854 b'pullbundle',
1866 b'pullbundle',
1855 default=False,
1867 default=False,
1856 )
1868 )
1857 coreconfigitem(
1869 coreconfigitem(
1858 b'server',
1870 b'server',
1859 b'preferuncompressed',
1871 b'preferuncompressed',
1860 default=False,
1872 default=False,
1861 )
1873 )
1862 coreconfigitem(
1874 coreconfigitem(
1863 b'server',
1875 b'server',
1864 b'streamunbundle',
1876 b'streamunbundle',
1865 default=False,
1877 default=False,
1866 )
1878 )
1867 coreconfigitem(
1879 coreconfigitem(
1868 b'server',
1880 b'server',
1869 b'uncompressed',
1881 b'uncompressed',
1870 default=True,
1882 default=True,
1871 )
1883 )
1872 coreconfigitem(
1884 coreconfigitem(
1873 b'server',
1885 b'server',
1874 b'uncompressedallowsecret',
1886 b'uncompressedallowsecret',
1875 default=False,
1887 default=False,
1876 )
1888 )
1877 coreconfigitem(
1889 coreconfigitem(
1878 b'server',
1890 b'server',
1879 b'view',
1891 b'view',
1880 default=b'served',
1892 default=b'served',
1881 )
1893 )
1882 coreconfigitem(
1894 coreconfigitem(
1883 b'server',
1895 b'server',
1884 b'validate',
1896 b'validate',
1885 default=False,
1897 default=False,
1886 )
1898 )
1887 coreconfigitem(
1899 coreconfigitem(
1888 b'server',
1900 b'server',
1889 b'zliblevel',
1901 b'zliblevel',
1890 default=-1,
1902 default=-1,
1891 )
1903 )
1892 coreconfigitem(
1904 coreconfigitem(
1893 b'server',
1905 b'server',
1894 b'zstdlevel',
1906 b'zstdlevel',
1895 default=3,
1907 default=3,
1896 )
1908 )
1897 coreconfigitem(
1909 coreconfigitem(
1898 b'share',
1910 b'share',
1899 b'pool',
1911 b'pool',
1900 default=None,
1912 default=None,
1901 )
1913 )
1902 coreconfigitem(
1914 coreconfigitem(
1903 b'share',
1915 b'share',
1904 b'poolnaming',
1916 b'poolnaming',
1905 default=b'identity',
1917 default=b'identity',
1906 )
1918 )
1907 coreconfigitem(
1919 coreconfigitem(
1908 b'share',
1920 b'share',
1909 b'safe-mismatch.source-not-safe',
1921 b'safe-mismatch.source-not-safe',
1910 default=b'abort',
1922 default=b'abort',
1911 )
1923 )
1912 coreconfigitem(
1924 coreconfigitem(
1913 b'share',
1925 b'share',
1914 b'safe-mismatch.source-safe',
1926 b'safe-mismatch.source-safe',
1915 default=b'abort',
1927 default=b'abort',
1916 )
1928 )
1917 coreconfigitem(
1929 coreconfigitem(
1918 b'share',
1930 b'share',
1919 b'safe-mismatch.source-not-safe.warn',
1931 b'safe-mismatch.source-not-safe.warn',
1920 default=True,
1932 default=True,
1921 )
1933 )
1922 coreconfigitem(
1934 coreconfigitem(
1923 b'share',
1935 b'share',
1924 b'safe-mismatch.source-safe.warn',
1936 b'safe-mismatch.source-safe.warn',
1925 default=True,
1937 default=True,
1926 )
1938 )
1927 coreconfigitem(
1939 coreconfigitem(
1928 b'shelve',
1940 b'shelve',
1929 b'maxbackups',
1941 b'maxbackups',
1930 default=10,
1942 default=10,
1931 )
1943 )
1932 coreconfigitem(
1944 coreconfigitem(
1933 b'smtp',
1945 b'smtp',
1934 b'host',
1946 b'host',
1935 default=None,
1947 default=None,
1936 )
1948 )
1937 coreconfigitem(
1949 coreconfigitem(
1938 b'smtp',
1950 b'smtp',
1939 b'local_hostname',
1951 b'local_hostname',
1940 default=None,
1952 default=None,
1941 )
1953 )
1942 coreconfigitem(
1954 coreconfigitem(
1943 b'smtp',
1955 b'smtp',
1944 b'password',
1956 b'password',
1945 default=None,
1957 default=None,
1946 )
1958 )
1947 coreconfigitem(
1959 coreconfigitem(
1948 b'smtp',
1960 b'smtp',
1949 b'port',
1961 b'port',
1950 default=dynamicdefault,
1962 default=dynamicdefault,
1951 )
1963 )
1952 coreconfigitem(
1964 coreconfigitem(
1953 b'smtp',
1965 b'smtp',
1954 b'tls',
1966 b'tls',
1955 default=b'none',
1967 default=b'none',
1956 )
1968 )
1957 coreconfigitem(
1969 coreconfigitem(
1958 b'smtp',
1970 b'smtp',
1959 b'username',
1971 b'username',
1960 default=None,
1972 default=None,
1961 )
1973 )
1962 coreconfigitem(
1974 coreconfigitem(
1963 b'sparse',
1975 b'sparse',
1964 b'missingwarning',
1976 b'missingwarning',
1965 default=True,
1977 default=True,
1966 experimental=True,
1978 experimental=True,
1967 )
1979 )
1968 coreconfigitem(
1980 coreconfigitem(
1969 b'subrepos',
1981 b'subrepos',
1970 b'allowed',
1982 b'allowed',
1971 default=dynamicdefault, # to make backporting simpler
1983 default=dynamicdefault, # to make backporting simpler
1972 )
1984 )
1973 coreconfigitem(
1985 coreconfigitem(
1974 b'subrepos',
1986 b'subrepos',
1975 b'hg:allowed',
1987 b'hg:allowed',
1976 default=dynamicdefault,
1988 default=dynamicdefault,
1977 )
1989 )
1978 coreconfigitem(
1990 coreconfigitem(
1979 b'subrepos',
1991 b'subrepos',
1980 b'git:allowed',
1992 b'git:allowed',
1981 default=dynamicdefault,
1993 default=dynamicdefault,
1982 )
1994 )
1983 coreconfigitem(
1995 coreconfigitem(
1984 b'subrepos',
1996 b'subrepos',
1985 b'svn:allowed',
1997 b'svn:allowed',
1986 default=dynamicdefault,
1998 default=dynamicdefault,
1987 )
1999 )
1988 coreconfigitem(
2000 coreconfigitem(
1989 b'templates',
2001 b'templates',
1990 b'.*',
2002 b'.*',
1991 default=None,
2003 default=None,
1992 generic=True,
2004 generic=True,
1993 )
2005 )
1994 coreconfigitem(
2006 coreconfigitem(
1995 b'templateconfig',
2007 b'templateconfig',
1996 b'.*',
2008 b'.*',
1997 default=dynamicdefault,
2009 default=dynamicdefault,
1998 generic=True,
2010 generic=True,
1999 )
2011 )
2000 coreconfigitem(
2012 coreconfigitem(
2001 b'trusted',
2013 b'trusted',
2002 b'groups',
2014 b'groups',
2003 default=list,
2015 default=list,
2004 )
2016 )
2005 coreconfigitem(
2017 coreconfigitem(
2006 b'trusted',
2018 b'trusted',
2007 b'users',
2019 b'users',
2008 default=list,
2020 default=list,
2009 )
2021 )
2010 coreconfigitem(
2022 coreconfigitem(
2011 b'ui',
2023 b'ui',
2012 b'_usedassubrepo',
2024 b'_usedassubrepo',
2013 default=False,
2025 default=False,
2014 )
2026 )
2015 coreconfigitem(
2027 coreconfigitem(
2016 b'ui',
2028 b'ui',
2017 b'allowemptycommit',
2029 b'allowemptycommit',
2018 default=False,
2030 default=False,
2019 )
2031 )
2020 coreconfigitem(
2032 coreconfigitem(
2021 b'ui',
2033 b'ui',
2022 b'archivemeta',
2034 b'archivemeta',
2023 default=True,
2035 default=True,
2024 )
2036 )
2025 coreconfigitem(
2037 coreconfigitem(
2026 b'ui',
2038 b'ui',
2027 b'askusername',
2039 b'askusername',
2028 default=False,
2040 default=False,
2029 )
2041 )
2030 coreconfigitem(
2042 coreconfigitem(
2031 b'ui',
2043 b'ui',
2032 b'available-memory',
2044 b'available-memory',
2033 default=None,
2045 default=None,
2034 )
2046 )
2035
2047
2036 coreconfigitem(
2048 coreconfigitem(
2037 b'ui',
2049 b'ui',
2038 b'clonebundlefallback',
2050 b'clonebundlefallback',
2039 default=False,
2051 default=False,
2040 )
2052 )
2041 coreconfigitem(
2053 coreconfigitem(
2042 b'ui',
2054 b'ui',
2043 b'clonebundleprefers',
2055 b'clonebundleprefers',
2044 default=list,
2056 default=list,
2045 )
2057 )
2046 coreconfigitem(
2058 coreconfigitem(
2047 b'ui',
2059 b'ui',
2048 b'clonebundles',
2060 b'clonebundles',
2049 default=True,
2061 default=True,
2050 )
2062 )
2051 coreconfigitem(
2063 coreconfigitem(
2052 b'ui',
2064 b'ui',
2053 b'color',
2065 b'color',
2054 default=b'auto',
2066 default=b'auto',
2055 )
2067 )
2056 coreconfigitem(
2068 coreconfigitem(
2057 b'ui',
2069 b'ui',
2058 b'commitsubrepos',
2070 b'commitsubrepos',
2059 default=False,
2071 default=False,
2060 )
2072 )
2061 coreconfigitem(
2073 coreconfigitem(
2062 b'ui',
2074 b'ui',
2063 b'debug',
2075 b'debug',
2064 default=False,
2076 default=False,
2065 )
2077 )
2066 coreconfigitem(
2078 coreconfigitem(
2067 b'ui',
2079 b'ui',
2068 b'debugger',
2080 b'debugger',
2069 default=None,
2081 default=None,
2070 )
2082 )
2071 coreconfigitem(
2083 coreconfigitem(
2072 b'ui',
2084 b'ui',
2073 b'editor',
2085 b'editor',
2074 default=dynamicdefault,
2086 default=dynamicdefault,
2075 )
2087 )
2076 coreconfigitem(
2088 coreconfigitem(
2077 b'ui',
2089 b'ui',
2078 b'detailed-exit-code',
2090 b'detailed-exit-code',
2079 default=False,
2091 default=False,
2080 experimental=True,
2092 experimental=True,
2081 )
2093 )
2082 coreconfigitem(
2094 coreconfigitem(
2083 b'ui',
2095 b'ui',
2084 b'fallbackencoding',
2096 b'fallbackencoding',
2085 default=None,
2097 default=None,
2086 )
2098 )
2087 coreconfigitem(
2099 coreconfigitem(
2088 b'ui',
2100 b'ui',
2089 b'forcecwd',
2101 b'forcecwd',
2090 default=None,
2102 default=None,
2091 )
2103 )
2092 coreconfigitem(
2104 coreconfigitem(
2093 b'ui',
2105 b'ui',
2094 b'forcemerge',
2106 b'forcemerge',
2095 default=None,
2107 default=None,
2096 )
2108 )
2097 coreconfigitem(
2109 coreconfigitem(
2098 b'ui',
2110 b'ui',
2099 b'formatdebug',
2111 b'formatdebug',
2100 default=False,
2112 default=False,
2101 )
2113 )
2102 coreconfigitem(
2114 coreconfigitem(
2103 b'ui',
2115 b'ui',
2104 b'formatjson',
2116 b'formatjson',
2105 default=False,
2117 default=False,
2106 )
2118 )
2107 coreconfigitem(
2119 coreconfigitem(
2108 b'ui',
2120 b'ui',
2109 b'formatted',
2121 b'formatted',
2110 default=None,
2122 default=None,
2111 )
2123 )
2112 coreconfigitem(
2124 coreconfigitem(
2113 b'ui',
2125 b'ui',
2114 b'interactive',
2126 b'interactive',
2115 default=None,
2127 default=None,
2116 )
2128 )
2117 coreconfigitem(
2129 coreconfigitem(
2118 b'ui',
2130 b'ui',
2119 b'interface',
2131 b'interface',
2120 default=None,
2132 default=None,
2121 )
2133 )
2122 coreconfigitem(
2134 coreconfigitem(
2123 b'ui',
2135 b'ui',
2124 b'interface.chunkselector',
2136 b'interface.chunkselector',
2125 default=None,
2137 default=None,
2126 )
2138 )
2127 coreconfigitem(
2139 coreconfigitem(
2128 b'ui',
2140 b'ui',
2129 b'large-file-limit',
2141 b'large-file-limit',
2130 default=10000000,
2142 default=10000000,
2131 )
2143 )
2132 coreconfigitem(
2144 coreconfigitem(
2133 b'ui',
2145 b'ui',
2134 b'logblockedtimes',
2146 b'logblockedtimes',
2135 default=False,
2147 default=False,
2136 )
2148 )
2137 coreconfigitem(
2149 coreconfigitem(
2138 b'ui',
2150 b'ui',
2139 b'merge',
2151 b'merge',
2140 default=None,
2152 default=None,
2141 )
2153 )
2142 coreconfigitem(
2154 coreconfigitem(
2143 b'ui',
2155 b'ui',
2144 b'mergemarkers',
2156 b'mergemarkers',
2145 default=b'basic',
2157 default=b'basic',
2146 )
2158 )
2147 coreconfigitem(
2159 coreconfigitem(
2148 b'ui',
2160 b'ui',
2149 b'message-output',
2161 b'message-output',
2150 default=b'stdio',
2162 default=b'stdio',
2151 )
2163 )
2152 coreconfigitem(
2164 coreconfigitem(
2153 b'ui',
2165 b'ui',
2154 b'nontty',
2166 b'nontty',
2155 default=False,
2167 default=False,
2156 )
2168 )
2157 coreconfigitem(
2169 coreconfigitem(
2158 b'ui',
2170 b'ui',
2159 b'origbackuppath',
2171 b'origbackuppath',
2160 default=None,
2172 default=None,
2161 )
2173 )
2162 coreconfigitem(
2174 coreconfigitem(
2163 b'ui',
2175 b'ui',
2164 b'paginate',
2176 b'paginate',
2165 default=True,
2177 default=True,
2166 )
2178 )
2167 coreconfigitem(
2179 coreconfigitem(
2168 b'ui',
2180 b'ui',
2169 b'patch',
2181 b'patch',
2170 default=None,
2182 default=None,
2171 )
2183 )
2172 coreconfigitem(
2184 coreconfigitem(
2173 b'ui',
2185 b'ui',
2174 b'portablefilenames',
2186 b'portablefilenames',
2175 default=b'warn',
2187 default=b'warn',
2176 )
2188 )
2177 coreconfigitem(
2189 coreconfigitem(
2178 b'ui',
2190 b'ui',
2179 b'promptecho',
2191 b'promptecho',
2180 default=False,
2192 default=False,
2181 )
2193 )
2182 coreconfigitem(
2194 coreconfigitem(
2183 b'ui',
2195 b'ui',
2184 b'quiet',
2196 b'quiet',
2185 default=False,
2197 default=False,
2186 )
2198 )
2187 coreconfigitem(
2199 coreconfigitem(
2188 b'ui',
2200 b'ui',
2189 b'quietbookmarkmove',
2201 b'quietbookmarkmove',
2190 default=False,
2202 default=False,
2191 )
2203 )
2192 coreconfigitem(
2204 coreconfigitem(
2193 b'ui',
2205 b'ui',
2194 b'relative-paths',
2206 b'relative-paths',
2195 default=b'legacy',
2207 default=b'legacy',
2196 )
2208 )
2197 coreconfigitem(
2209 coreconfigitem(
2198 b'ui',
2210 b'ui',
2199 b'remotecmd',
2211 b'remotecmd',
2200 default=b'hg',
2212 default=b'hg',
2201 )
2213 )
2202 coreconfigitem(
2214 coreconfigitem(
2203 b'ui',
2215 b'ui',
2204 b'report_untrusted',
2216 b'report_untrusted',
2205 default=True,
2217 default=True,
2206 )
2218 )
2207 coreconfigitem(
2219 coreconfigitem(
2208 b'ui',
2220 b'ui',
2209 b'rollback',
2221 b'rollback',
2210 default=True,
2222 default=True,
2211 )
2223 )
2212 coreconfigitem(
2224 coreconfigitem(
2213 b'ui',
2225 b'ui',
2214 b'signal-safe-lock',
2226 b'signal-safe-lock',
2215 default=True,
2227 default=True,
2216 )
2228 )
2217 coreconfigitem(
2229 coreconfigitem(
2218 b'ui',
2230 b'ui',
2219 b'slash',
2231 b'slash',
2220 default=False,
2232 default=False,
2221 )
2233 )
2222 coreconfigitem(
2234 coreconfigitem(
2223 b'ui',
2235 b'ui',
2224 b'ssh',
2236 b'ssh',
2225 default=b'ssh',
2237 default=b'ssh',
2226 )
2238 )
2227 coreconfigitem(
2239 coreconfigitem(
2228 b'ui',
2240 b'ui',
2229 b'ssherrorhint',
2241 b'ssherrorhint',
2230 default=None,
2242 default=None,
2231 )
2243 )
2232 coreconfigitem(
2244 coreconfigitem(
2233 b'ui',
2245 b'ui',
2234 b'statuscopies',
2246 b'statuscopies',
2235 default=False,
2247 default=False,
2236 )
2248 )
2237 coreconfigitem(
2249 coreconfigitem(
2238 b'ui',
2250 b'ui',
2239 b'strict',
2251 b'strict',
2240 default=False,
2252 default=False,
2241 )
2253 )
2242 coreconfigitem(
2254 coreconfigitem(
2243 b'ui',
2255 b'ui',
2244 b'style',
2256 b'style',
2245 default=b'',
2257 default=b'',
2246 )
2258 )
2247 coreconfigitem(
2259 coreconfigitem(
2248 b'ui',
2260 b'ui',
2249 b'supportcontact',
2261 b'supportcontact',
2250 default=None,
2262 default=None,
2251 )
2263 )
2252 coreconfigitem(
2264 coreconfigitem(
2253 b'ui',
2265 b'ui',
2254 b'textwidth',
2266 b'textwidth',
2255 default=78,
2267 default=78,
2256 )
2268 )
2257 coreconfigitem(
2269 coreconfigitem(
2258 b'ui',
2270 b'ui',
2259 b'timeout',
2271 b'timeout',
2260 default=b'600',
2272 default=b'600',
2261 )
2273 )
2262 coreconfigitem(
2274 coreconfigitem(
2263 b'ui',
2275 b'ui',
2264 b'timeout.warn',
2276 b'timeout.warn',
2265 default=0,
2277 default=0,
2266 )
2278 )
2267 coreconfigitem(
2279 coreconfigitem(
2268 b'ui',
2280 b'ui',
2269 b'timestamp-output',
2281 b'timestamp-output',
2270 default=False,
2282 default=False,
2271 )
2283 )
2272 coreconfigitem(
2284 coreconfigitem(
2273 b'ui',
2285 b'ui',
2274 b'traceback',
2286 b'traceback',
2275 default=False,
2287 default=False,
2276 )
2288 )
2277 coreconfigitem(
2289 coreconfigitem(
2278 b'ui',
2290 b'ui',
2279 b'tweakdefaults',
2291 b'tweakdefaults',
2280 default=False,
2292 default=False,
2281 )
2293 )
2282 coreconfigitem(b'ui', b'username', alias=[(b'ui', b'user')])
2294 coreconfigitem(b'ui', b'username', alias=[(b'ui', b'user')])
2283 coreconfigitem(
2295 coreconfigitem(
2284 b'ui',
2296 b'ui',
2285 b'verbose',
2297 b'verbose',
2286 default=False,
2298 default=False,
2287 )
2299 )
2288 coreconfigitem(
2300 coreconfigitem(
2289 b'verify',
2301 b'verify',
2290 b'skipflags',
2302 b'skipflags',
2291 default=None,
2303 default=None,
2292 )
2304 )
2293 coreconfigitem(
2305 coreconfigitem(
2294 b'web',
2306 b'web',
2295 b'allowbz2',
2307 b'allowbz2',
2296 default=False,
2308 default=False,
2297 )
2309 )
2298 coreconfigitem(
2310 coreconfigitem(
2299 b'web',
2311 b'web',
2300 b'allowgz',
2312 b'allowgz',
2301 default=False,
2313 default=False,
2302 )
2314 )
2303 coreconfigitem(
2315 coreconfigitem(
2304 b'web',
2316 b'web',
2305 b'allow-pull',
2317 b'allow-pull',
2306 alias=[(b'web', b'allowpull')],
2318 alias=[(b'web', b'allowpull')],
2307 default=True,
2319 default=True,
2308 )
2320 )
2309 coreconfigitem(
2321 coreconfigitem(
2310 b'web',
2322 b'web',
2311 b'allow-push',
2323 b'allow-push',
2312 alias=[(b'web', b'allow_push')],
2324 alias=[(b'web', b'allow_push')],
2313 default=list,
2325 default=list,
2314 )
2326 )
2315 coreconfigitem(
2327 coreconfigitem(
2316 b'web',
2328 b'web',
2317 b'allowzip',
2329 b'allowzip',
2318 default=False,
2330 default=False,
2319 )
2331 )
2320 coreconfigitem(
2332 coreconfigitem(
2321 b'web',
2333 b'web',
2322 b'archivesubrepos',
2334 b'archivesubrepos',
2323 default=False,
2335 default=False,
2324 )
2336 )
2325 coreconfigitem(
2337 coreconfigitem(
2326 b'web',
2338 b'web',
2327 b'cache',
2339 b'cache',
2328 default=True,
2340 default=True,
2329 )
2341 )
2330 coreconfigitem(
2342 coreconfigitem(
2331 b'web',
2343 b'web',
2332 b'comparisoncontext',
2344 b'comparisoncontext',
2333 default=5,
2345 default=5,
2334 )
2346 )
2335 coreconfigitem(
2347 coreconfigitem(
2336 b'web',
2348 b'web',
2337 b'contact',
2349 b'contact',
2338 default=None,
2350 default=None,
2339 )
2351 )
2340 coreconfigitem(
2352 coreconfigitem(
2341 b'web',
2353 b'web',
2342 b'deny_push',
2354 b'deny_push',
2343 default=list,
2355 default=list,
2344 )
2356 )
2345 coreconfigitem(
2357 coreconfigitem(
2346 b'web',
2358 b'web',
2347 b'guessmime',
2359 b'guessmime',
2348 default=False,
2360 default=False,
2349 )
2361 )
2350 coreconfigitem(
2362 coreconfigitem(
2351 b'web',
2363 b'web',
2352 b'hidden',
2364 b'hidden',
2353 default=False,
2365 default=False,
2354 )
2366 )
2355 coreconfigitem(
2367 coreconfigitem(
2356 b'web',
2368 b'web',
2357 b'labels',
2369 b'labels',
2358 default=list,
2370 default=list,
2359 )
2371 )
2360 coreconfigitem(
2372 coreconfigitem(
2361 b'web',
2373 b'web',
2362 b'logoimg',
2374 b'logoimg',
2363 default=b'hglogo.png',
2375 default=b'hglogo.png',
2364 )
2376 )
2365 coreconfigitem(
2377 coreconfigitem(
2366 b'web',
2378 b'web',
2367 b'logourl',
2379 b'logourl',
2368 default=b'https://mercurial-scm.org/',
2380 default=b'https://mercurial-scm.org/',
2369 )
2381 )
2370 coreconfigitem(
2382 coreconfigitem(
2371 b'web',
2383 b'web',
2372 b'accesslog',
2384 b'accesslog',
2373 default=b'-',
2385 default=b'-',
2374 )
2386 )
2375 coreconfigitem(
2387 coreconfigitem(
2376 b'web',
2388 b'web',
2377 b'address',
2389 b'address',
2378 default=b'',
2390 default=b'',
2379 )
2391 )
2380 coreconfigitem(
2392 coreconfigitem(
2381 b'web',
2393 b'web',
2382 b'allow-archive',
2394 b'allow-archive',
2383 alias=[(b'web', b'allow_archive')],
2395 alias=[(b'web', b'allow_archive')],
2384 default=list,
2396 default=list,
2385 )
2397 )
2386 coreconfigitem(
2398 coreconfigitem(
2387 b'web',
2399 b'web',
2388 b'allow_read',
2400 b'allow_read',
2389 default=list,
2401 default=list,
2390 )
2402 )
2391 coreconfigitem(
2403 coreconfigitem(
2392 b'web',
2404 b'web',
2393 b'baseurl',
2405 b'baseurl',
2394 default=None,
2406 default=None,
2395 )
2407 )
2396 coreconfigitem(
2408 coreconfigitem(
2397 b'web',
2409 b'web',
2398 b'cacerts',
2410 b'cacerts',
2399 default=None,
2411 default=None,
2400 )
2412 )
2401 coreconfigitem(
2413 coreconfigitem(
2402 b'web',
2414 b'web',
2403 b'certificate',
2415 b'certificate',
2404 default=None,
2416 default=None,
2405 )
2417 )
2406 coreconfigitem(
2418 coreconfigitem(
2407 b'web',
2419 b'web',
2408 b'collapse',
2420 b'collapse',
2409 default=False,
2421 default=False,
2410 )
2422 )
2411 coreconfigitem(
2423 coreconfigitem(
2412 b'web',
2424 b'web',
2413 b'csp',
2425 b'csp',
2414 default=None,
2426 default=None,
2415 )
2427 )
2416 coreconfigitem(
2428 coreconfigitem(
2417 b'web',
2429 b'web',
2418 b'deny_read',
2430 b'deny_read',
2419 default=list,
2431 default=list,
2420 )
2432 )
2421 coreconfigitem(
2433 coreconfigitem(
2422 b'web',
2434 b'web',
2423 b'descend',
2435 b'descend',
2424 default=True,
2436 default=True,
2425 )
2437 )
2426 coreconfigitem(
2438 coreconfigitem(
2427 b'web',
2439 b'web',
2428 b'description',
2440 b'description',
2429 default=b"",
2441 default=b"",
2430 )
2442 )
2431 coreconfigitem(
2443 coreconfigitem(
2432 b'web',
2444 b'web',
2433 b'encoding',
2445 b'encoding',
2434 default=lambda: encoding.encoding,
2446 default=lambda: encoding.encoding,
2435 )
2447 )
2436 coreconfigitem(
2448 coreconfigitem(
2437 b'web',
2449 b'web',
2438 b'errorlog',
2450 b'errorlog',
2439 default=b'-',
2451 default=b'-',
2440 )
2452 )
2441 coreconfigitem(
2453 coreconfigitem(
2442 b'web',
2454 b'web',
2443 b'ipv6',
2455 b'ipv6',
2444 default=False,
2456 default=False,
2445 )
2457 )
2446 coreconfigitem(
2458 coreconfigitem(
2447 b'web',
2459 b'web',
2448 b'maxchanges',
2460 b'maxchanges',
2449 default=10,
2461 default=10,
2450 )
2462 )
2451 coreconfigitem(
2463 coreconfigitem(
2452 b'web',
2464 b'web',
2453 b'maxfiles',
2465 b'maxfiles',
2454 default=10,
2466 default=10,
2455 )
2467 )
2456 coreconfigitem(
2468 coreconfigitem(
2457 b'web',
2469 b'web',
2458 b'maxshortchanges',
2470 b'maxshortchanges',
2459 default=60,
2471 default=60,
2460 )
2472 )
2461 coreconfigitem(
2473 coreconfigitem(
2462 b'web',
2474 b'web',
2463 b'motd',
2475 b'motd',
2464 default=b'',
2476 default=b'',
2465 )
2477 )
2466 coreconfigitem(
2478 coreconfigitem(
2467 b'web',
2479 b'web',
2468 b'name',
2480 b'name',
2469 default=dynamicdefault,
2481 default=dynamicdefault,
2470 )
2482 )
2471 coreconfigitem(
2483 coreconfigitem(
2472 b'web',
2484 b'web',
2473 b'port',
2485 b'port',
2474 default=8000,
2486 default=8000,
2475 )
2487 )
2476 coreconfigitem(
2488 coreconfigitem(
2477 b'web',
2489 b'web',
2478 b'prefix',
2490 b'prefix',
2479 default=b'',
2491 default=b'',
2480 )
2492 )
2481 coreconfigitem(
2493 coreconfigitem(
2482 b'web',
2494 b'web',
2483 b'push_ssl',
2495 b'push_ssl',
2484 default=True,
2496 default=True,
2485 )
2497 )
2486 coreconfigitem(
2498 coreconfigitem(
2487 b'web',
2499 b'web',
2488 b'refreshinterval',
2500 b'refreshinterval',
2489 default=20,
2501 default=20,
2490 )
2502 )
2491 coreconfigitem(
2503 coreconfigitem(
2492 b'web',
2504 b'web',
2493 b'server-header',
2505 b'server-header',
2494 default=None,
2506 default=None,
2495 )
2507 )
2496 coreconfigitem(
2508 coreconfigitem(
2497 b'web',
2509 b'web',
2498 b'static',
2510 b'static',
2499 default=None,
2511 default=None,
2500 )
2512 )
2501 coreconfigitem(
2513 coreconfigitem(
2502 b'web',
2514 b'web',
2503 b'staticurl',
2515 b'staticurl',
2504 default=None,
2516 default=None,
2505 )
2517 )
2506 coreconfigitem(
2518 coreconfigitem(
2507 b'web',
2519 b'web',
2508 b'stripes',
2520 b'stripes',
2509 default=1,
2521 default=1,
2510 )
2522 )
2511 coreconfigitem(
2523 coreconfigitem(
2512 b'web',
2524 b'web',
2513 b'style',
2525 b'style',
2514 default=b'paper',
2526 default=b'paper',
2515 )
2527 )
2516 coreconfigitem(
2528 coreconfigitem(
2517 b'web',
2529 b'web',
2518 b'templates',
2530 b'templates',
2519 default=None,
2531 default=None,
2520 )
2532 )
2521 coreconfigitem(
2533 coreconfigitem(
2522 b'web',
2534 b'web',
2523 b'view',
2535 b'view',
2524 default=b'served',
2536 default=b'served',
2525 experimental=True,
2537 experimental=True,
2526 )
2538 )
2527 coreconfigitem(
2539 coreconfigitem(
2528 b'worker',
2540 b'worker',
2529 b'backgroundclose',
2541 b'backgroundclose',
2530 default=dynamicdefault,
2542 default=dynamicdefault,
2531 )
2543 )
2532 # Windows defaults to a limit of 512 open files. A buffer of 128
2544 # Windows defaults to a limit of 512 open files. A buffer of 128
2533 # should give us enough headway.
2545 # should give us enough headway.
2534 coreconfigitem(
2546 coreconfigitem(
2535 b'worker',
2547 b'worker',
2536 b'backgroundclosemaxqueue',
2548 b'backgroundclosemaxqueue',
2537 default=384,
2549 default=384,
2538 )
2550 )
2539 coreconfigitem(
2551 coreconfigitem(
2540 b'worker',
2552 b'worker',
2541 b'backgroundcloseminfilecount',
2553 b'backgroundcloseminfilecount',
2542 default=2048,
2554 default=2048,
2543 )
2555 )
2544 coreconfigitem(
2556 coreconfigitem(
2545 b'worker',
2557 b'worker',
2546 b'backgroundclosethreadcount',
2558 b'backgroundclosethreadcount',
2547 default=4,
2559 default=4,
2548 )
2560 )
2549 coreconfigitem(
2561 coreconfigitem(
2550 b'worker',
2562 b'worker',
2551 b'enabled',
2563 b'enabled',
2552 default=True,
2564 default=True,
2553 )
2565 )
2554 coreconfigitem(
2566 coreconfigitem(
2555 b'worker',
2567 b'worker',
2556 b'numcpus',
2568 b'numcpus',
2557 default=None,
2569 default=None,
2558 )
2570 )
2559
2571
2560 # Rebase related configuration moved to core because other extension are doing
2572 # Rebase related configuration moved to core because other extension are doing
2561 # strange things. For example, shelve import the extensions to reuse some bit
2573 # strange things. For example, shelve import the extensions to reuse some bit
2562 # without formally loading it.
2574 # without formally loading it.
2563 coreconfigitem(
2575 coreconfigitem(
2564 b'commands',
2576 b'commands',
2565 b'rebase.requiredest',
2577 b'rebase.requiredest',
2566 default=False,
2578 default=False,
2567 )
2579 )
2568 coreconfigitem(
2580 coreconfigitem(
2569 b'experimental',
2581 b'experimental',
2570 b'rebaseskipobsolete',
2582 b'rebaseskipobsolete',
2571 default=True,
2583 default=True,
2572 )
2584 )
2573 coreconfigitem(
2585 coreconfigitem(
2574 b'rebase',
2586 b'rebase',
2575 b'singletransaction',
2587 b'singletransaction',
2576 default=False,
2588 default=False,
2577 )
2589 )
2578 coreconfigitem(
2590 coreconfigitem(
2579 b'rebase',
2591 b'rebase',
2580 b'experimental.inmemory',
2592 b'experimental.inmemory',
2581 default=False,
2593 default=False,
2582 )
2594 )
@@ -1,517 +1,516 b''
1 # setdiscovery.py - improved discovery of common nodeset for mercurial
1 # setdiscovery.py - improved discovery of common nodeset for mercurial
2 #
2 #
3 # Copyright 2010 Benoit Boissinot <bboissin@gmail.com>
3 # Copyright 2010 Benoit Boissinot <bboissin@gmail.com>
4 # and Peter Arrenbrecht <peter@arrenbrecht.ch>
4 # and Peter Arrenbrecht <peter@arrenbrecht.ch>
5 #
5 #
6 # This software may be used and distributed according to the terms of the
6 # This software may be used and distributed according to the terms of the
7 # GNU General Public License version 2 or any later version.
7 # GNU General Public License version 2 or any later version.
8 """
8 """
9 Algorithm works in the following way. You have two repository: local and
9 Algorithm works in the following way. You have two repository: local and
10 remote. They both contains a DAG of changelists.
10 remote. They both contains a DAG of changelists.
11
11
12 The goal of the discovery protocol is to find one set of node *common*,
12 The goal of the discovery protocol is to find one set of node *common*,
13 the set of nodes shared by local and remote.
13 the set of nodes shared by local and remote.
14
14
15 One of the issue with the original protocol was latency, it could
15 One of the issue with the original protocol was latency, it could
16 potentially require lots of roundtrips to discover that the local repo was a
16 potentially require lots of roundtrips to discover that the local repo was a
17 subset of remote (which is a very common case, you usually have few changes
17 subset of remote (which is a very common case, you usually have few changes
18 compared to upstream, while upstream probably had lots of development).
18 compared to upstream, while upstream probably had lots of development).
19
19
20 The new protocol only requires one interface for the remote repo: `known()`,
20 The new protocol only requires one interface for the remote repo: `known()`,
21 which given a set of changelists tells you if they are present in the DAG.
21 which given a set of changelists tells you if they are present in the DAG.
22
22
23 The algorithm then works as follow:
23 The algorithm then works as follow:
24
24
25 - We will be using three sets, `common`, `missing`, `unknown`. Originally
25 - We will be using three sets, `common`, `missing`, `unknown`. Originally
26 all nodes are in `unknown`.
26 all nodes are in `unknown`.
27 - Take a sample from `unknown`, call `remote.known(sample)`
27 - Take a sample from `unknown`, call `remote.known(sample)`
28 - For each node that remote knows, move it and all its ancestors to `common`
28 - For each node that remote knows, move it and all its ancestors to `common`
29 - For each node that remote doesn't know, move it and all its descendants
29 - For each node that remote doesn't know, move it and all its descendants
30 to `missing`
30 to `missing`
31 - Iterate until `unknown` is empty
31 - Iterate until `unknown` is empty
32
32
33 There are a couple optimizations, first is instead of starting with a random
33 There are a couple optimizations, first is instead of starting with a random
34 sample of missing, start by sending all heads, in the case where the local
34 sample of missing, start by sending all heads, in the case where the local
35 repo is a subset, you computed the answer in one round trip.
35 repo is a subset, you computed the answer in one round trip.
36
36
37 Then you can do something similar to the bisecting strategy used when
37 Then you can do something similar to the bisecting strategy used when
38 finding faulty changesets. Instead of random samples, you can try picking
38 finding faulty changesets. Instead of random samples, you can try picking
39 nodes that will maximize the number of nodes that will be
39 nodes that will maximize the number of nodes that will be
40 classified with it (since all ancestors or descendants will be marked as well).
40 classified with it (since all ancestors or descendants will be marked as well).
41 """
41 """
42
42
43 from __future__ import absolute_import
43 from __future__ import absolute_import
44
44
45 import collections
45 import collections
46 import random
46 import random
47
47
48 from .i18n import _
48 from .i18n import _
49 from .node import (
49 from .node import (
50 nullid,
50 nullid,
51 nullrev,
51 nullrev,
52 )
52 )
53 from . import (
53 from . import (
54 error,
54 error,
55 policy,
55 policy,
56 util,
56 util,
57 )
57 )
58
58
59
59
60 def _updatesample(revs, heads, sample, parentfn, quicksamplesize=0):
60 def _updatesample(revs, heads, sample, parentfn, quicksamplesize=0):
61 """update an existing sample to match the expected size
61 """update an existing sample to match the expected size
62
62
63 The sample is updated with revs exponentially distant from each head of the
63 The sample is updated with revs exponentially distant from each head of the
64 <revs> set. (H~1, H~2, H~4, H~8, etc).
64 <revs> set. (H~1, H~2, H~4, H~8, etc).
65
65
66 If a target size is specified, the sampling will stop once this size is
66 If a target size is specified, the sampling will stop once this size is
67 reached. Otherwise sampling will happen until roots of the <revs> set are
67 reached. Otherwise sampling will happen until roots of the <revs> set are
68 reached.
68 reached.
69
69
70 :revs: set of revs we want to discover (if None, assume the whole dag)
70 :revs: set of revs we want to discover (if None, assume the whole dag)
71 :heads: set of DAG head revs
71 :heads: set of DAG head revs
72 :sample: a sample to update
72 :sample: a sample to update
73 :parentfn: a callable to resolve parents for a revision
73 :parentfn: a callable to resolve parents for a revision
74 :quicksamplesize: optional target size of the sample"""
74 :quicksamplesize: optional target size of the sample"""
75 dist = {}
75 dist = {}
76 visit = collections.deque(heads)
76 visit = collections.deque(heads)
77 seen = set()
77 seen = set()
78 factor = 1
78 factor = 1
79 while visit:
79 while visit:
80 curr = visit.popleft()
80 curr = visit.popleft()
81 if curr in seen:
81 if curr in seen:
82 continue
82 continue
83 d = dist.setdefault(curr, 1)
83 d = dist.setdefault(curr, 1)
84 if d > factor:
84 if d > factor:
85 factor *= 2
85 factor *= 2
86 if d == factor:
86 if d == factor:
87 sample.add(curr)
87 sample.add(curr)
88 if quicksamplesize and (len(sample) >= quicksamplesize):
88 if quicksamplesize and (len(sample) >= quicksamplesize):
89 return
89 return
90 seen.add(curr)
90 seen.add(curr)
91
91
92 for p in parentfn(curr):
92 for p in parentfn(curr):
93 if p != nullrev and (not revs or p in revs):
93 if p != nullrev and (not revs or p in revs):
94 dist.setdefault(p, d + 1)
94 dist.setdefault(p, d + 1)
95 visit.append(p)
95 visit.append(p)
96
96
97
97
98 def _limitsample(sample, desiredlen, randomize=True):
98 def _limitsample(sample, desiredlen, randomize=True):
99 """return a random subset of sample of at most desiredlen item.
99 """return a random subset of sample of at most desiredlen item.
100
100
101 If randomize is False, though, a deterministic subset is returned.
101 If randomize is False, though, a deterministic subset is returned.
102 This is meant for integration tests.
102 This is meant for integration tests.
103 """
103 """
104 if len(sample) <= desiredlen:
104 if len(sample) <= desiredlen:
105 return sample
105 return sample
106 if randomize:
106 if randomize:
107 return set(random.sample(sample, desiredlen))
107 return set(random.sample(sample, desiredlen))
108 sample = list(sample)
108 sample = list(sample)
109 sample.sort()
109 sample.sort()
110 return set(sample[:desiredlen])
110 return set(sample[:desiredlen])
111
111
112
112
113 class partialdiscovery(object):
113 class partialdiscovery(object):
114 """an object representing ongoing discovery
114 """an object representing ongoing discovery
115
115
116 Feed with data from the remote repository, this object keep track of the
116 Feed with data from the remote repository, this object keep track of the
117 current set of changeset in various states:
117 current set of changeset in various states:
118
118
119 - common: revs also known remotely
119 - common: revs also known remotely
120 - undecided: revs we don't have information on yet
120 - undecided: revs we don't have information on yet
121 - missing: revs missing remotely
121 - missing: revs missing remotely
122 (all tracked revisions are known locally)
122 (all tracked revisions are known locally)
123 """
123 """
124
124
125 def __init__(self, repo, targetheads, respectsize, randomize=True):
125 def __init__(self, repo, targetheads, respectsize, randomize=True):
126 self._repo = repo
126 self._repo = repo
127 self._targetheads = targetheads
127 self._targetheads = targetheads
128 self._common = repo.changelog.incrementalmissingrevs()
128 self._common = repo.changelog.incrementalmissingrevs()
129 self._undecided = None
129 self._undecided = None
130 self.missing = set()
130 self.missing = set()
131 self._childrenmap = None
131 self._childrenmap = None
132 self._respectsize = respectsize
132 self._respectsize = respectsize
133 self.randomize = randomize
133 self.randomize = randomize
134
134
135 def addcommons(self, commons):
135 def addcommons(self, commons):
136 """register nodes known as common"""
136 """register nodes known as common"""
137 self._common.addbases(commons)
137 self._common.addbases(commons)
138 if self._undecided is not None:
138 if self._undecided is not None:
139 self._common.removeancestorsfrom(self._undecided)
139 self._common.removeancestorsfrom(self._undecided)
140
140
141 def addmissings(self, missings):
141 def addmissings(self, missings):
142 """register some nodes as missing"""
142 """register some nodes as missing"""
143 newmissing = self._repo.revs(b'%ld::%ld', missings, self.undecided)
143 newmissing = self._repo.revs(b'%ld::%ld', missings, self.undecided)
144 if newmissing:
144 if newmissing:
145 self.missing.update(newmissing)
145 self.missing.update(newmissing)
146 self.undecided.difference_update(newmissing)
146 self.undecided.difference_update(newmissing)
147
147
148 def addinfo(self, sample):
148 def addinfo(self, sample):
149 """consume an iterable of (rev, known) tuples"""
149 """consume an iterable of (rev, known) tuples"""
150 common = set()
150 common = set()
151 missing = set()
151 missing = set()
152 for rev, known in sample:
152 for rev, known in sample:
153 if known:
153 if known:
154 common.add(rev)
154 common.add(rev)
155 else:
155 else:
156 missing.add(rev)
156 missing.add(rev)
157 if common:
157 if common:
158 self.addcommons(common)
158 self.addcommons(common)
159 if missing:
159 if missing:
160 self.addmissings(missing)
160 self.addmissings(missing)
161
161
162 def hasinfo(self):
162 def hasinfo(self):
163 """return True is we have any clue about the remote state"""
163 """return True is we have any clue about the remote state"""
164 return self._common.hasbases()
164 return self._common.hasbases()
165
165
166 def iscomplete(self):
166 def iscomplete(self):
167 """True if all the necessary data have been gathered"""
167 """True if all the necessary data have been gathered"""
168 return self._undecided is not None and not self._undecided
168 return self._undecided is not None and not self._undecided
169
169
170 @property
170 @property
171 def undecided(self):
171 def undecided(self):
172 if self._undecided is not None:
172 if self._undecided is not None:
173 return self._undecided
173 return self._undecided
174 self._undecided = set(self._common.missingancestors(self._targetheads))
174 self._undecided = set(self._common.missingancestors(self._targetheads))
175 return self._undecided
175 return self._undecided
176
176
177 def stats(self):
177 def stats(self):
178 return {
178 return {
179 'undecided': len(self.undecided),
179 'undecided': len(self.undecided),
180 }
180 }
181
181
182 def commonheads(self):
182 def commonheads(self):
183 """the heads of the known common set"""
183 """the heads of the known common set"""
184 # heads(common) == heads(common.bases) since common represents
184 # heads(common) == heads(common.bases) since common represents
185 # common.bases and all its ancestors
185 # common.bases and all its ancestors
186 return self._common.basesheads()
186 return self._common.basesheads()
187
187
188 def _parentsgetter(self):
188 def _parentsgetter(self):
189 getrev = self._repo.changelog.index.__getitem__
189 getrev = self._repo.changelog.index.__getitem__
190
190
191 def getparents(r):
191 def getparents(r):
192 return getrev(r)[5:7]
192 return getrev(r)[5:7]
193
193
194 return getparents
194 return getparents
195
195
196 def _childrengetter(self):
196 def _childrengetter(self):
197
197
198 if self._childrenmap is not None:
198 if self._childrenmap is not None:
199 # During discovery, the `undecided` set keep shrinking.
199 # During discovery, the `undecided` set keep shrinking.
200 # Therefore, the map computed for an iteration N will be
200 # Therefore, the map computed for an iteration N will be
201 # valid for iteration N+1. Instead of computing the same
201 # valid for iteration N+1. Instead of computing the same
202 # data over and over we cached it the first time.
202 # data over and over we cached it the first time.
203 return self._childrenmap.__getitem__
203 return self._childrenmap.__getitem__
204
204
205 # _updatesample() essentially does interaction over revisions to look
205 # _updatesample() essentially does interaction over revisions to look
206 # up their children. This lookup is expensive and doing it in a loop is
206 # up their children. This lookup is expensive and doing it in a loop is
207 # quadratic. We precompute the children for all relevant revisions and
207 # quadratic. We precompute the children for all relevant revisions and
208 # make the lookup in _updatesample() a simple dict lookup.
208 # make the lookup in _updatesample() a simple dict lookup.
209 self._childrenmap = children = {}
209 self._childrenmap = children = {}
210
210
211 parentrevs = self._parentsgetter()
211 parentrevs = self._parentsgetter()
212 revs = self.undecided
212 revs = self.undecided
213
213
214 for rev in sorted(revs):
214 for rev in sorted(revs):
215 # Always ensure revision has an entry so we don't need to worry
215 # Always ensure revision has an entry so we don't need to worry
216 # about missing keys.
216 # about missing keys.
217 children[rev] = []
217 children[rev] = []
218 for prev in parentrevs(rev):
218 for prev in parentrevs(rev):
219 if prev == nullrev:
219 if prev == nullrev:
220 continue
220 continue
221 c = children.get(prev)
221 c = children.get(prev)
222 if c is not None:
222 if c is not None:
223 c.append(rev)
223 c.append(rev)
224 return children.__getitem__
224 return children.__getitem__
225
225
226 def takequicksample(self, headrevs, size):
226 def takequicksample(self, headrevs, size):
227 """takes a quick sample of size <size>
227 """takes a quick sample of size <size>
228
228
229 It is meant for initial sampling and focuses on querying heads and close
229 It is meant for initial sampling and focuses on querying heads and close
230 ancestors of heads.
230 ancestors of heads.
231
231
232 :headrevs: set of head revisions in local DAG to consider
232 :headrevs: set of head revisions in local DAG to consider
233 :size: the maximum size of the sample"""
233 :size: the maximum size of the sample"""
234 revs = self.undecided
234 revs = self.undecided
235 if len(revs) <= size:
235 if len(revs) <= size:
236 return list(revs)
236 return list(revs)
237 sample = set(self._repo.revs(b'heads(%ld)', revs))
237 sample = set(self._repo.revs(b'heads(%ld)', revs))
238
238
239 if len(sample) >= size:
239 if len(sample) >= size:
240 return _limitsample(sample, size, randomize=self.randomize)
240 return _limitsample(sample, size, randomize=self.randomize)
241
241
242 _updatesample(
242 _updatesample(
243 None, headrevs, sample, self._parentsgetter(), quicksamplesize=size
243 None, headrevs, sample, self._parentsgetter(), quicksamplesize=size
244 )
244 )
245 return sample
245 return sample
246
246
247 def takefullsample(self, headrevs, size):
247 def takefullsample(self, headrevs, size):
248 revs = self.undecided
248 revs = self.undecided
249 if len(revs) <= size:
249 if len(revs) <= size:
250 return list(revs)
250 return list(revs)
251 repo = self._repo
251 repo = self._repo
252 sample = set(repo.revs(b'heads(%ld)', revs))
252 sample = set(repo.revs(b'heads(%ld)', revs))
253 parentrevs = self._parentsgetter()
253 parentrevs = self._parentsgetter()
254
254
255 # update from heads
255 # update from heads
256 revsheads = sample.copy()
256 revsheads = sample.copy()
257 _updatesample(revs, revsheads, sample, parentrevs)
257 _updatesample(revs, revsheads, sample, parentrevs)
258
258
259 # update from roots
259 # update from roots
260 revsroots = set(repo.revs(b'roots(%ld)', revs))
260 revsroots = set(repo.revs(b'roots(%ld)', revs))
261 childrenrevs = self._childrengetter()
261 childrenrevs = self._childrengetter()
262 _updatesample(revs, revsroots, sample, childrenrevs)
262 _updatesample(revs, revsroots, sample, childrenrevs)
263 assert sample
263 assert sample
264
264
265 if not self._respectsize:
265 if not self._respectsize:
266 size = max(size, min(len(revsroots), len(revsheads)))
266 size = max(size, min(len(revsroots), len(revsheads)))
267
267
268 sample = _limitsample(sample, size, randomize=self.randomize)
268 sample = _limitsample(sample, size, randomize=self.randomize)
269 if len(sample) < size:
269 if len(sample) < size:
270 more = size - len(sample)
270 more = size - len(sample)
271 takefrom = list(revs - sample)
271 takefrom = list(revs - sample)
272 if self.randomize:
272 if self.randomize:
273 sample.update(random.sample(takefrom, more))
273 sample.update(random.sample(takefrom, more))
274 else:
274 else:
275 takefrom.sort()
275 takefrom.sort()
276 sample.update(takefrom[:more])
276 sample.update(takefrom[:more])
277 return sample
277 return sample
278
278
279
279
280 partialdiscovery = policy.importrust(
280 partialdiscovery = policy.importrust(
281 'discovery', member='PartialDiscovery', default=partialdiscovery
281 'discovery', member='PartialDiscovery', default=partialdiscovery
282 )
282 )
283
283
284
284
285 def findcommonheads(
285 def findcommonheads(
286 ui,
286 ui,
287 local,
287 local,
288 remote,
288 remote,
289 initialsamplesize=100,
290 fullsamplesize=200,
291 abortwhenunrelated=True,
289 abortwhenunrelated=True,
292 ancestorsof=None,
290 ancestorsof=None,
293 audit=None,
291 audit=None,
294 ):
292 ):
295 """Return a tuple (common, anyincoming, remoteheads) used to identify
293 """Return a tuple (common, anyincoming, remoteheads) used to identify
296 missing nodes from or in remote.
294 missing nodes from or in remote.
297
295
298 The audit argument is an optional dictionnary that a caller can pass. it
296 The audit argument is an optional dictionnary that a caller can pass. it
299 will be updated with extra data about the discovery, this is useful for
297 will be updated with extra data about the discovery, this is useful for
300 debug.
298 debug.
301 """
299 """
302
300
303 samplegrowth = float(ui.config(b'devel', b'discovery.grow-sample.rate'))
301 samplegrowth = float(ui.config(b'devel', b'discovery.grow-sample.rate'))
304
302
305 start = util.timer()
303 start = util.timer()
306
304
307 roundtrips = 0
305 roundtrips = 0
308 cl = local.changelog
306 cl = local.changelog
309 clnode = cl.node
307 clnode = cl.node
310 clrev = cl.rev
308 clrev = cl.rev
311
309
312 if ancestorsof is not None:
310 if ancestorsof is not None:
313 ownheads = [clrev(n) for n in ancestorsof]
311 ownheads = [clrev(n) for n in ancestorsof]
314 else:
312 else:
315 ownheads = [rev for rev in cl.headrevs() if rev != nullrev]
313 ownheads = [rev for rev in cl.headrevs() if rev != nullrev]
316
314
317 initial_head_exchange = ui.configbool(b'devel', b'discovery.exchange-heads')
315 initial_head_exchange = ui.configbool(b'devel', b'discovery.exchange-heads')
318
316 initialsamplesize = ui.configint(b'devel', b'discovery.sample-size.initial')
317 fullsamplesize = ui.configint(b'devel', b'discovery.sample-size')
319 # We also ask remote about all the local heads. That set can be arbitrarily
318 # We also ask remote about all the local heads. That set can be arbitrarily
320 # large, so we used to limit it size to `initialsamplesize`. We no longer
319 # large, so we used to limit it size to `initialsamplesize`. We no longer
321 # do as it proved counter productive. The skipped heads could lead to a
320 # do as it proved counter productive. The skipped heads could lead to a
322 # large "undecided" set, slower to be clarified than if we asked the
321 # large "undecided" set, slower to be clarified than if we asked the
323 # question for all heads right away.
322 # question for all heads right away.
324 #
323 #
325 # We are already fetching all server heads using the `heads` commands,
324 # We are already fetching all server heads using the `heads` commands,
326 # sending a equivalent number of heads the other way should not have a
325 # sending a equivalent number of heads the other way should not have a
327 # significant impact. In addition, it is very likely that we are going to
326 # significant impact. In addition, it is very likely that we are going to
328 # have to issue "known" request for an equivalent amount of revisions in
327 # have to issue "known" request for an equivalent amount of revisions in
329 # order to decide if theses heads are common or missing.
328 # order to decide if theses heads are common or missing.
330 #
329 #
331 # find a detailled analysis below.
330 # find a detailled analysis below.
332 #
331 #
333 # Case A: local and server both has few heads
332 # Case A: local and server both has few heads
334 #
333 #
335 # Ownheads is below initialsamplesize, limit would not have any effect.
334 # Ownheads is below initialsamplesize, limit would not have any effect.
336 #
335 #
337 # Case B: local has few heads and server has many
336 # Case B: local has few heads and server has many
338 #
337 #
339 # Ownheads is below initialsamplesize, limit would not have any effect.
338 # Ownheads is below initialsamplesize, limit would not have any effect.
340 #
339 #
341 # Case C: local and server both has many heads
340 # Case C: local and server both has many heads
342 #
341 #
343 # We now transfert some more data, but not significantly more than is
342 # We now transfert some more data, but not significantly more than is
344 # already transfered to carry the server heads.
343 # already transfered to carry the server heads.
345 #
344 #
346 # Case D: local has many heads, server has few
345 # Case D: local has many heads, server has few
347 #
346 #
348 # D.1 local heads are mostly known remotely
347 # D.1 local heads are mostly known remotely
349 #
348 #
350 # All the known head will have be part of a `known` request at some
349 # All the known head will have be part of a `known` request at some
351 # point for the discovery to finish. Sending them all earlier is
350 # point for the discovery to finish. Sending them all earlier is
352 # actually helping.
351 # actually helping.
353 #
352 #
354 # (This case is fairly unlikely, it requires the numerous heads to all
353 # (This case is fairly unlikely, it requires the numerous heads to all
355 # be merged server side in only a few heads)
354 # be merged server side in only a few heads)
356 #
355 #
357 # D.2 local heads are mostly missing remotely
356 # D.2 local heads are mostly missing remotely
358 #
357 #
359 # To determine that the heads are missing, we'll have to issue `known`
358 # To determine that the heads are missing, we'll have to issue `known`
360 # request for them or one of their ancestors. This amount of `known`
359 # request for them or one of their ancestors. This amount of `known`
361 # request will likely be in the same order of magnitude than the amount
360 # request will likely be in the same order of magnitude than the amount
362 # of local heads.
361 # of local heads.
363 #
362 #
364 # The only case where we can be more efficient using `known` request on
363 # The only case where we can be more efficient using `known` request on
365 # ancestors are case were all the "missing" local heads are based on a
364 # ancestors are case were all the "missing" local heads are based on a
366 # few changeset, also "missing". This means we would have a "complex"
365 # few changeset, also "missing". This means we would have a "complex"
367 # graph (with many heads) attached to, but very independant to a the
366 # graph (with many heads) attached to, but very independant to a the
368 # "simple" graph on the server. This is a fairly usual case and have
367 # "simple" graph on the server. This is a fairly usual case and have
369 # not been met in the wild so far.
368 # not been met in the wild so far.
370 if initial_head_exchange:
369 if initial_head_exchange:
371 if remote.limitedarguments:
370 if remote.limitedarguments:
372 sample = _limitsample(ownheads, initialsamplesize)
371 sample = _limitsample(ownheads, initialsamplesize)
373 # indices between sample and externalized version must match
372 # indices between sample and externalized version must match
374 sample = list(sample)
373 sample = list(sample)
375 else:
374 else:
376 sample = ownheads
375 sample = ownheads
377
376
378 ui.debug(b"query 1; heads\n")
377 ui.debug(b"query 1; heads\n")
379 roundtrips += 1
378 roundtrips += 1
380 with remote.commandexecutor() as e:
379 with remote.commandexecutor() as e:
381 fheads = e.callcommand(b'heads', {})
380 fheads = e.callcommand(b'heads', {})
382 fknown = e.callcommand(
381 fknown = e.callcommand(
383 b'known',
382 b'known',
384 {
383 {
385 b'nodes': [clnode(r) for r in sample],
384 b'nodes': [clnode(r) for r in sample],
386 },
385 },
387 )
386 )
388
387
389 srvheadhashes, yesno = fheads.result(), fknown.result()
388 srvheadhashes, yesno = fheads.result(), fknown.result()
390
389
391 if audit is not None:
390 if audit is not None:
392 audit[b'total-roundtrips'] = 1
391 audit[b'total-roundtrips'] = 1
393
392
394 if cl.tip() == nullid:
393 if cl.tip() == nullid:
395 if srvheadhashes != [nullid]:
394 if srvheadhashes != [nullid]:
396 return [nullid], True, srvheadhashes
395 return [nullid], True, srvheadhashes
397 return [nullid], False, []
396 return [nullid], False, []
398 else:
397 else:
399 # we still need the remote head for the function return
398 # we still need the remote head for the function return
400 with remote.commandexecutor() as e:
399 with remote.commandexecutor() as e:
401 fheads = e.callcommand(b'heads', {})
400 fheads = e.callcommand(b'heads', {})
402 srvheadhashes = fheads.result()
401 srvheadhashes = fheads.result()
403
402
404 # start actual discovery (we note this before the next "if" for
403 # start actual discovery (we note this before the next "if" for
405 # compatibility reasons)
404 # compatibility reasons)
406 ui.status(_(b"searching for changes\n"))
405 ui.status(_(b"searching for changes\n"))
407
406
408 knownsrvheads = [] # revnos of remote heads that are known locally
407 knownsrvheads = [] # revnos of remote heads that are known locally
409 for node in srvheadhashes:
408 for node in srvheadhashes:
410 if node == nullid:
409 if node == nullid:
411 continue
410 continue
412
411
413 try:
412 try:
414 knownsrvheads.append(clrev(node))
413 knownsrvheads.append(clrev(node))
415 # Catches unknown and filtered nodes.
414 # Catches unknown and filtered nodes.
416 except error.LookupError:
415 except error.LookupError:
417 continue
416 continue
418
417
419 if initial_head_exchange:
418 if initial_head_exchange:
420 # early exit if we know all the specified remote heads already
419 # early exit if we know all the specified remote heads already
421 if len(knownsrvheads) == len(srvheadhashes):
420 if len(knownsrvheads) == len(srvheadhashes):
422 ui.debug(b"all remote heads known locally\n")
421 ui.debug(b"all remote heads known locally\n")
423 return srvheadhashes, False, srvheadhashes
422 return srvheadhashes, False, srvheadhashes
424
423
425 if len(sample) == len(ownheads) and all(yesno):
424 if len(sample) == len(ownheads) and all(yesno):
426 ui.note(_(b"all local changesets known remotely\n"))
425 ui.note(_(b"all local changesets known remotely\n"))
427 ownheadhashes = [clnode(r) for r in ownheads]
426 ownheadhashes = [clnode(r) for r in ownheads]
428 return ownheadhashes, True, srvheadhashes
427 return ownheadhashes, True, srvheadhashes
429
428
430 # full blown discovery
429 # full blown discovery
431
430
432 # if the server has a limit to its arguments size, we can't grow the sample.
431 # if the server has a limit to its arguments size, we can't grow the sample.
433 hard_limit_sample = remote.limitedarguments
432 hard_limit_sample = remote.limitedarguments
434 grow_sample = local.ui.configbool(b'devel', b'discovery.grow-sample')
433 grow_sample = local.ui.configbool(b'devel', b'discovery.grow-sample')
435 hard_limit_sample = hard_limit_sample and grow_sample
434 hard_limit_sample = hard_limit_sample and grow_sample
436
435
437 randomize = ui.configbool(b'devel', b'discovery.randomize')
436 randomize = ui.configbool(b'devel', b'discovery.randomize')
438 disco = partialdiscovery(
437 disco = partialdiscovery(
439 local, ownheads, hard_limit_sample, randomize=randomize
438 local, ownheads, hard_limit_sample, randomize=randomize
440 )
439 )
441 if initial_head_exchange:
440 if initial_head_exchange:
442 # treat remote heads (and maybe own heads) as a first implicit sample
441 # treat remote heads (and maybe own heads) as a first implicit sample
443 # response
442 # response
444 disco.addcommons(knownsrvheads)
443 disco.addcommons(knownsrvheads)
445 disco.addinfo(zip(sample, yesno))
444 disco.addinfo(zip(sample, yesno))
446
445
447 full = not initial_head_exchange
446 full = not initial_head_exchange
448 progress = ui.makeprogress(_(b'searching'), unit=_(b'queries'))
447 progress = ui.makeprogress(_(b'searching'), unit=_(b'queries'))
449 while not disco.iscomplete():
448 while not disco.iscomplete():
450
449
451 if full or disco.hasinfo():
450 if full or disco.hasinfo():
452 if full:
451 if full:
453 ui.note(_(b"sampling from both directions\n"))
452 ui.note(_(b"sampling from both directions\n"))
454 else:
453 else:
455 ui.debug(b"taking initial sample\n")
454 ui.debug(b"taking initial sample\n")
456 samplefunc = disco.takefullsample
455 samplefunc = disco.takefullsample
457 targetsize = fullsamplesize
456 targetsize = fullsamplesize
458 if not hard_limit_sample:
457 if not hard_limit_sample:
459 fullsamplesize = int(fullsamplesize * samplegrowth)
458 fullsamplesize = int(fullsamplesize * samplegrowth)
460 else:
459 else:
461 # use even cheaper initial sample
460 # use even cheaper initial sample
462 ui.debug(b"taking quick initial sample\n")
461 ui.debug(b"taking quick initial sample\n")
463 samplefunc = disco.takequicksample
462 samplefunc = disco.takequicksample
464 targetsize = initialsamplesize
463 targetsize = initialsamplesize
465 sample = samplefunc(ownheads, targetsize)
464 sample = samplefunc(ownheads, targetsize)
466
465
467 roundtrips += 1
466 roundtrips += 1
468 progress.update(roundtrips)
467 progress.update(roundtrips)
469 stats = disco.stats()
468 stats = disco.stats()
470 ui.debug(
469 ui.debug(
471 b"query %i; still undecided: %i, sample size is: %i\n"
470 b"query %i; still undecided: %i, sample size is: %i\n"
472 % (roundtrips, stats['undecided'], len(sample))
471 % (roundtrips, stats['undecided'], len(sample))
473 )
472 )
474
473
475 # indices between sample and externalized version must match
474 # indices between sample and externalized version must match
476 sample = list(sample)
475 sample = list(sample)
477
476
478 with remote.commandexecutor() as e:
477 with remote.commandexecutor() as e:
479 yesno = e.callcommand(
478 yesno = e.callcommand(
480 b'known',
479 b'known',
481 {
480 {
482 b'nodes': [clnode(r) for r in sample],
481 b'nodes': [clnode(r) for r in sample],
483 },
482 },
484 ).result()
483 ).result()
485
484
486 full = True
485 full = True
487
486
488 disco.addinfo(zip(sample, yesno))
487 disco.addinfo(zip(sample, yesno))
489
488
490 result = disco.commonheads()
489 result = disco.commonheads()
491 elapsed = util.timer() - start
490 elapsed = util.timer() - start
492 progress.complete()
491 progress.complete()
493 ui.debug(b"%d total queries in %.4fs\n" % (roundtrips, elapsed))
492 ui.debug(b"%d total queries in %.4fs\n" % (roundtrips, elapsed))
494 msg = (
493 msg = (
495 b'found %d common and %d unknown server heads,'
494 b'found %d common and %d unknown server heads,'
496 b' %d roundtrips in %.4fs\n'
495 b' %d roundtrips in %.4fs\n'
497 )
496 )
498 missing = set(result) - set(knownsrvheads)
497 missing = set(result) - set(knownsrvheads)
499 ui.log(b'discovery', msg, len(result), len(missing), roundtrips, elapsed)
498 ui.log(b'discovery', msg, len(result), len(missing), roundtrips, elapsed)
500
499
501 if audit is not None:
500 if audit is not None:
502 audit[b'total-roundtrips'] = roundtrips
501 audit[b'total-roundtrips'] = roundtrips
503
502
504 if not result and srvheadhashes != [nullid]:
503 if not result and srvheadhashes != [nullid]:
505 if abortwhenunrelated:
504 if abortwhenunrelated:
506 raise error.Abort(_(b"repository is unrelated"))
505 raise error.Abort(_(b"repository is unrelated"))
507 else:
506 else:
508 ui.warn(_(b"warning: repository is unrelated\n"))
507 ui.warn(_(b"warning: repository is unrelated\n"))
509 return (
508 return (
510 {nullid},
509 {nullid},
511 True,
510 True,
512 srvheadhashes,
511 srvheadhashes,
513 )
512 )
514
513
515 anyincoming = srvheadhashes != [nullid]
514 anyincoming = srvheadhashes != [nullid]
516 result = {clnode(r) for r in result}
515 result = {clnode(r) for r in result}
517 return result, anyincoming, srvheadhashes
516 return result, anyincoming, srvheadhashes
@@ -1,1582 +1,1590 b''
1
1
2 Function to test discovery between two repos in both directions, using both the local shortcut
2 Function to test discovery between two repos in both directions, using both the local shortcut
3 (which is currently not activated by default) and the full remotable protocol:
3 (which is currently not activated by default) and the full remotable protocol:
4
4
5 $ testdesc() { # revs_a, revs_b, dagdesc
5 $ testdesc() { # revs_a, revs_b, dagdesc
6 > if [ -d foo ]; then rm -rf foo; fi
6 > if [ -d foo ]; then rm -rf foo; fi
7 > hg init foo
7 > hg init foo
8 > cd foo
8 > cd foo
9 > hg debugbuilddag "$3"
9 > hg debugbuilddag "$3"
10 > hg clone . a $1 --quiet
10 > hg clone . a $1 --quiet
11 > hg clone . b $2 --quiet
11 > hg clone . b $2 --quiet
12 > echo
12 > echo
13 > echo "% -- a -> b tree"
13 > echo "% -- a -> b tree"
14 > hg -R a debugdiscovery b --verbose --old
14 > hg -R a debugdiscovery b --verbose --old
15 > echo
15 > echo
16 > echo "% -- a -> b set"
16 > echo "% -- a -> b set"
17 > hg -R a debugdiscovery b --verbose --debug --config progress.debug=true
17 > hg -R a debugdiscovery b --verbose --debug --config progress.debug=true
18 > echo
18 > echo
19 > echo "% -- a -> b set (tip only)"
19 > echo "% -- a -> b set (tip only)"
20 > hg -R a debugdiscovery b --verbose --debug --config progress.debug=true --rev tip
20 > hg -R a debugdiscovery b --verbose --debug --config progress.debug=true --rev tip
21 > echo
21 > echo
22 > echo "% -- b -> a tree"
22 > echo "% -- b -> a tree"
23 > hg -R b debugdiscovery a --verbose --old
23 > hg -R b debugdiscovery a --verbose --old
24 > echo
24 > echo
25 > echo "% -- b -> a set"
25 > echo "% -- b -> a set"
26 > hg -R b debugdiscovery a --verbose --debug --config progress.debug=true
26 > hg -R b debugdiscovery a --verbose --debug --config progress.debug=true
27 > echo
27 > echo
28 > echo "% -- b -> a set (tip only)"
28 > echo "% -- b -> a set (tip only)"
29 > hg -R b debugdiscovery a --verbose --debug --config progress.debug=true --rev tip
29 > hg -R b debugdiscovery a --verbose --debug --config progress.debug=true --rev tip
30 > cd ..
30 > cd ..
31 > }
31 > }
32
32
33
33
34 Small superset:
34 Small superset:
35
35
36 $ testdesc '-ra1 -ra2' '-rb1 -rb2 -rb3' '
36 $ testdesc '-ra1 -ra2' '-rb1 -rb2 -rb3' '
37 > +2:f +1:a1:b1
37 > +2:f +1:a1:b1
38 > <f +4 :a2
38 > <f +4 :a2
39 > +5 :b2
39 > +5 :b2
40 > <f +3 :b3'
40 > <f +3 :b3'
41
41
42 % -- a -> b tree
42 % -- a -> b tree
43 comparing with b
43 comparing with b
44 searching for changes
44 searching for changes
45 unpruned common: 01241442b3c2 66f7d451a68b b5714e113bc0
45 unpruned common: 01241442b3c2 66f7d451a68b b5714e113bc0
46 elapsed time: * seconds (glob)
46 elapsed time: * seconds (glob)
47 round-trips: 2
47 round-trips: 2
48 heads summary:
48 heads summary:
49 total common heads: 2
49 total common heads: 2
50 also local heads: 2
50 also local heads: 2
51 also remote heads: 1
51 also remote heads: 1
52 both: 1
52 both: 1
53 local heads: 2
53 local heads: 2
54 common: 2
54 common: 2
55 missing: 0
55 missing: 0
56 remote heads: 3
56 remote heads: 3
57 common: 1
57 common: 1
58 unknown: 2
58 unknown: 2
59 local changesets: 7
59 local changesets: 7
60 common: 7
60 common: 7
61 heads: 2
61 heads: 2
62 roots: 1
62 roots: 1
63 missing: 0
63 missing: 0
64 heads: 0
64 heads: 0
65 roots: 0
65 roots: 0
66 first undecided set: 3
66 first undecided set: 3
67 heads: 1
67 heads: 1
68 roots: 1
68 roots: 1
69 common: 3
69 common: 3
70 missing: 0
70 missing: 0
71 common heads: 01241442b3c2 b5714e113bc0
71 common heads: 01241442b3c2 b5714e113bc0
72
72
73 % -- a -> b set
73 % -- a -> b set
74 comparing with b
74 comparing with b
75 query 1; heads
75 query 1; heads
76 searching for changes
76 searching for changes
77 all local changesets known remotely
77 all local changesets known remotely
78 elapsed time: * seconds (glob)
78 elapsed time: * seconds (glob)
79 round-trips: 1
79 round-trips: 1
80 heads summary:
80 heads summary:
81 total common heads: 2
81 total common heads: 2
82 also local heads: 2
82 also local heads: 2
83 also remote heads: 1
83 also remote heads: 1
84 both: 1
84 both: 1
85 local heads: 2
85 local heads: 2
86 common: 2
86 common: 2
87 missing: 0
87 missing: 0
88 remote heads: 3
88 remote heads: 3
89 common: 1
89 common: 1
90 unknown: 2
90 unknown: 2
91 local changesets: 7
91 local changesets: 7
92 common: 7
92 common: 7
93 heads: 2
93 heads: 2
94 roots: 1
94 roots: 1
95 missing: 0
95 missing: 0
96 heads: 0
96 heads: 0
97 roots: 0
97 roots: 0
98 first undecided set: 3
98 first undecided set: 3
99 heads: 1
99 heads: 1
100 roots: 1
100 roots: 1
101 common: 3
101 common: 3
102 missing: 0
102 missing: 0
103 common heads: 01241442b3c2 b5714e113bc0
103 common heads: 01241442b3c2 b5714e113bc0
104
104
105 % -- a -> b set (tip only)
105 % -- a -> b set (tip only)
106 comparing with b
106 comparing with b
107 query 1; heads
107 query 1; heads
108 searching for changes
108 searching for changes
109 all local changesets known remotely
109 all local changesets known remotely
110 elapsed time: * seconds (glob)
110 elapsed time: * seconds (glob)
111 round-trips: 1
111 round-trips: 1
112 heads summary:
112 heads summary:
113 total common heads: 1
113 total common heads: 1
114 also local heads: 1
114 also local heads: 1
115 also remote heads: 0
115 also remote heads: 0
116 both: 0
116 both: 0
117 local heads: 2
117 local heads: 2
118 common: 1
118 common: 1
119 missing: 1
119 missing: 1
120 remote heads: 3
120 remote heads: 3
121 common: 0
121 common: 0
122 unknown: 3
122 unknown: 3
123 local changesets: 7
123 local changesets: 7
124 common: 6
124 common: 6
125 heads: 1
125 heads: 1
126 roots: 1
126 roots: 1
127 missing: 1
127 missing: 1
128 heads: 1
128 heads: 1
129 roots: 1
129 roots: 1
130 first undecided set: 6
130 first undecided set: 6
131 heads: 2
131 heads: 2
132 roots: 1
132 roots: 1
133 common: 5
133 common: 5
134 missing: 1
134 missing: 1
135 common heads: b5714e113bc0
135 common heads: b5714e113bc0
136
136
137 % -- b -> a tree
137 % -- b -> a tree
138 comparing with a
138 comparing with a
139 searching for changes
139 searching for changes
140 unpruned common: 01241442b3c2 b5714e113bc0
140 unpruned common: 01241442b3c2 b5714e113bc0
141 elapsed time: * seconds (glob)
141 elapsed time: * seconds (glob)
142 round-trips: 1
142 round-trips: 1
143 heads summary:
143 heads summary:
144 total common heads: 2
144 total common heads: 2
145 also local heads: 1
145 also local heads: 1
146 also remote heads: 2
146 also remote heads: 2
147 both: 1
147 both: 1
148 local heads: 3
148 local heads: 3
149 common: 1
149 common: 1
150 missing: 2
150 missing: 2
151 remote heads: 2
151 remote heads: 2
152 common: 2
152 common: 2
153 unknown: 0
153 unknown: 0
154 local changesets: 15
154 local changesets: 15
155 common: 7
155 common: 7
156 heads: 2
156 heads: 2
157 roots: 1
157 roots: 1
158 missing: 8
158 missing: 8
159 heads: 2
159 heads: 2
160 roots: 2
160 roots: 2
161 first undecided set: 8
161 first undecided set: 8
162 heads: 2
162 heads: 2
163 roots: 2
163 roots: 2
164 common: 0
164 common: 0
165 missing: 8
165 missing: 8
166 common heads: 01241442b3c2 b5714e113bc0
166 common heads: 01241442b3c2 b5714e113bc0
167
167
168 % -- b -> a set
168 % -- b -> a set
169 comparing with a
169 comparing with a
170 query 1; heads
170 query 1; heads
171 searching for changes
171 searching for changes
172 all remote heads known locally
172 all remote heads known locally
173 elapsed time: * seconds (glob)
173 elapsed time: * seconds (glob)
174 round-trips: 1
174 round-trips: 1
175 heads summary:
175 heads summary:
176 total common heads: 2
176 total common heads: 2
177 also local heads: 1
177 also local heads: 1
178 also remote heads: 2
178 also remote heads: 2
179 both: 1
179 both: 1
180 local heads: 3
180 local heads: 3
181 common: 1
181 common: 1
182 missing: 2
182 missing: 2
183 remote heads: 2
183 remote heads: 2
184 common: 2
184 common: 2
185 unknown: 0
185 unknown: 0
186 local changesets: 15
186 local changesets: 15
187 common: 7
187 common: 7
188 heads: 2
188 heads: 2
189 roots: 1
189 roots: 1
190 missing: 8
190 missing: 8
191 heads: 2
191 heads: 2
192 roots: 2
192 roots: 2
193 first undecided set: 8
193 first undecided set: 8
194 heads: 2
194 heads: 2
195 roots: 2
195 roots: 2
196 common: 0
196 common: 0
197 missing: 8
197 missing: 8
198 common heads: 01241442b3c2 b5714e113bc0
198 common heads: 01241442b3c2 b5714e113bc0
199
199
200 % -- b -> a set (tip only)
200 % -- b -> a set (tip only)
201 comparing with a
201 comparing with a
202 query 1; heads
202 query 1; heads
203 searching for changes
203 searching for changes
204 all remote heads known locally
204 all remote heads known locally
205 elapsed time: * seconds (glob)
205 elapsed time: * seconds (glob)
206 round-trips: 1
206 round-trips: 1
207 heads summary:
207 heads summary:
208 total common heads: 2
208 total common heads: 2
209 also local heads: 1
209 also local heads: 1
210 also remote heads: 2
210 also remote heads: 2
211 both: 1
211 both: 1
212 local heads: 3
212 local heads: 3
213 common: 1
213 common: 1
214 missing: 2
214 missing: 2
215 remote heads: 2
215 remote heads: 2
216 common: 2
216 common: 2
217 unknown: 0
217 unknown: 0
218 local changesets: 15
218 local changesets: 15
219 common: 7
219 common: 7
220 heads: 2
220 heads: 2
221 roots: 1
221 roots: 1
222 missing: 8
222 missing: 8
223 heads: 2
223 heads: 2
224 roots: 2
224 roots: 2
225 first undecided set: 8
225 first undecided set: 8
226 heads: 2
226 heads: 2
227 roots: 2
227 roots: 2
228 common: 0
228 common: 0
229 missing: 8
229 missing: 8
230 common heads: 01241442b3c2 b5714e113bc0
230 common heads: 01241442b3c2 b5714e113bc0
231
231
232
232
233 Many new:
233 Many new:
234
234
235 $ testdesc '-ra1 -ra2' '-rb' '
235 $ testdesc '-ra1 -ra2' '-rb' '
236 > +2:f +3:a1 +3:b
236 > +2:f +3:a1 +3:b
237 > <f +30 :a2'
237 > <f +30 :a2'
238
238
239 % -- a -> b tree
239 % -- a -> b tree
240 comparing with b
240 comparing with b
241 searching for changes
241 searching for changes
242 unpruned common: bebd167eb94d
242 unpruned common: bebd167eb94d
243 elapsed time: * seconds (glob)
243 elapsed time: * seconds (glob)
244 round-trips: 2
244 round-trips: 2
245 heads summary:
245 heads summary:
246 total common heads: 1
246 total common heads: 1
247 also local heads: 1
247 also local heads: 1
248 also remote heads: 0
248 also remote heads: 0
249 both: 0
249 both: 0
250 local heads: 2
250 local heads: 2
251 common: 1
251 common: 1
252 missing: 1
252 missing: 1
253 remote heads: 1
253 remote heads: 1
254 common: 0
254 common: 0
255 unknown: 1
255 unknown: 1
256 local changesets: 35
256 local changesets: 35
257 common: 5
257 common: 5
258 heads: 1
258 heads: 1
259 roots: 1
259 roots: 1
260 missing: 30
260 missing: 30
261 heads: 1
261 heads: 1
262 roots: 1
262 roots: 1
263 first undecided set: 34
263 first undecided set: 34
264 heads: 2
264 heads: 2
265 roots: 1
265 roots: 1
266 common: 4
266 common: 4
267 missing: 30
267 missing: 30
268 common heads: bebd167eb94d
268 common heads: bebd167eb94d
269
269
270 % -- a -> b set
270 % -- a -> b set
271 comparing with b
271 comparing with b
272 query 1; heads
272 query 1; heads
273 searching for changes
273 searching for changes
274 taking initial sample
274 taking initial sample
275 searching: 2 queries
275 searching: 2 queries
276 query 2; still undecided: 29, sample size is: 29
276 query 2; still undecided: 29, sample size is: 29
277 2 total queries in *.????s (glob)
277 2 total queries in *.????s (glob)
278 elapsed time: * seconds (glob)
278 elapsed time: * seconds (glob)
279 round-trips: 2
279 round-trips: 2
280 heads summary:
280 heads summary:
281 total common heads: 1
281 total common heads: 1
282 also local heads: 1
282 also local heads: 1
283 also remote heads: 0
283 also remote heads: 0
284 both: 0
284 both: 0
285 local heads: 2
285 local heads: 2
286 common: 1
286 common: 1
287 missing: 1
287 missing: 1
288 remote heads: 1
288 remote heads: 1
289 common: 0
289 common: 0
290 unknown: 1
290 unknown: 1
291 local changesets: 35
291 local changesets: 35
292 common: 5
292 common: 5
293 heads: 1
293 heads: 1
294 roots: 1
294 roots: 1
295 missing: 30
295 missing: 30
296 heads: 1
296 heads: 1
297 roots: 1
297 roots: 1
298 first undecided set: 34
298 first undecided set: 34
299 heads: 2
299 heads: 2
300 roots: 1
300 roots: 1
301 common: 4
301 common: 4
302 missing: 30
302 missing: 30
303 common heads: bebd167eb94d
303 common heads: bebd167eb94d
304
304
305 % -- a -> b set (tip only)
305 % -- a -> b set (tip only)
306 comparing with b
306 comparing with b
307 query 1; heads
307 query 1; heads
308 searching for changes
308 searching for changes
309 taking quick initial sample
309 taking quick initial sample
310 searching: 2 queries
310 searching: 2 queries
311 query 2; still undecided: 31, sample size is: 31
311 query 2; still undecided: 31, sample size is: 31
312 2 total queries in *.????s (glob)
312 2 total queries in *.????s (glob)
313 elapsed time: * seconds (glob)
313 elapsed time: * seconds (glob)
314 round-trips: 2
314 round-trips: 2
315 heads summary:
315 heads summary:
316 total common heads: 1
316 total common heads: 1
317 also local heads: 0
317 also local heads: 0
318 also remote heads: 0
318 also remote heads: 0
319 both: 0
319 both: 0
320 local heads: 2
320 local heads: 2
321 common: 0
321 common: 0
322 missing: 2
322 missing: 2
323 remote heads: 1
323 remote heads: 1
324 common: 0
324 common: 0
325 unknown: 1
325 unknown: 1
326 local changesets: 35
326 local changesets: 35
327 common: 2
327 common: 2
328 heads: 1
328 heads: 1
329 roots: 1
329 roots: 1
330 missing: 33
330 missing: 33
331 heads: 2
331 heads: 2
332 roots: 2
332 roots: 2
333 first undecided set: 35
333 first undecided set: 35
334 heads: 2
334 heads: 2
335 roots: 1
335 roots: 1
336 common: 2
336 common: 2
337 missing: 33
337 missing: 33
338 common heads: 66f7d451a68b
338 common heads: 66f7d451a68b
339
339
340 % -- b -> a tree
340 % -- b -> a tree
341 comparing with a
341 comparing with a
342 searching for changes
342 searching for changes
343 unpruned common: 66f7d451a68b bebd167eb94d
343 unpruned common: 66f7d451a68b bebd167eb94d
344 elapsed time: * seconds (glob)
344 elapsed time: * seconds (glob)
345 round-trips: 4
345 round-trips: 4
346 heads summary:
346 heads summary:
347 total common heads: 1
347 total common heads: 1
348 also local heads: 0
348 also local heads: 0
349 also remote heads: 1
349 also remote heads: 1
350 both: 0
350 both: 0
351 local heads: 1
351 local heads: 1
352 common: 0
352 common: 0
353 missing: 1
353 missing: 1
354 remote heads: 2
354 remote heads: 2
355 common: 1
355 common: 1
356 unknown: 1
356 unknown: 1
357 local changesets: 8
357 local changesets: 8
358 common: 5
358 common: 5
359 heads: 1
359 heads: 1
360 roots: 1
360 roots: 1
361 missing: 3
361 missing: 3
362 heads: 1
362 heads: 1
363 roots: 1
363 roots: 1
364 first undecided set: 3
364 first undecided set: 3
365 heads: 1
365 heads: 1
366 roots: 1
366 roots: 1
367 common: 0
367 common: 0
368 missing: 3
368 missing: 3
369 common heads: bebd167eb94d
369 common heads: bebd167eb94d
370
370
371 % -- b -> a set
371 % -- b -> a set
372 comparing with a
372 comparing with a
373 query 1; heads
373 query 1; heads
374 searching for changes
374 searching for changes
375 taking initial sample
375 taking initial sample
376 searching: 2 queries
376 searching: 2 queries
377 query 2; still undecided: 2, sample size is: 2
377 query 2; still undecided: 2, sample size is: 2
378 2 total queries in *.????s (glob)
378 2 total queries in *.????s (glob)
379 elapsed time: * seconds (glob)
379 elapsed time: * seconds (glob)
380 round-trips: 2
380 round-trips: 2
381 heads summary:
381 heads summary:
382 total common heads: 1
382 total common heads: 1
383 also local heads: 0
383 also local heads: 0
384 also remote heads: 1
384 also remote heads: 1
385 both: 0
385 both: 0
386 local heads: 1
386 local heads: 1
387 common: 0
387 common: 0
388 missing: 1
388 missing: 1
389 remote heads: 2
389 remote heads: 2
390 common: 1
390 common: 1
391 unknown: 1
391 unknown: 1
392 local changesets: 8
392 local changesets: 8
393 common: 5
393 common: 5
394 heads: 1
394 heads: 1
395 roots: 1
395 roots: 1
396 missing: 3
396 missing: 3
397 heads: 1
397 heads: 1
398 roots: 1
398 roots: 1
399 first undecided set: 3
399 first undecided set: 3
400 heads: 1
400 heads: 1
401 roots: 1
401 roots: 1
402 common: 0
402 common: 0
403 missing: 3
403 missing: 3
404 common heads: bebd167eb94d
404 common heads: bebd167eb94d
405
405
406 % -- b -> a set (tip only)
406 % -- b -> a set (tip only)
407 comparing with a
407 comparing with a
408 query 1; heads
408 query 1; heads
409 searching for changes
409 searching for changes
410 taking initial sample
410 taking initial sample
411 searching: 2 queries
411 searching: 2 queries
412 query 2; still undecided: 2, sample size is: 2
412 query 2; still undecided: 2, sample size is: 2
413 2 total queries in *.????s (glob)
413 2 total queries in *.????s (glob)
414 elapsed time: * seconds (glob)
414 elapsed time: * seconds (glob)
415 round-trips: 2
415 round-trips: 2
416 heads summary:
416 heads summary:
417 total common heads: 1
417 total common heads: 1
418 also local heads: 0
418 also local heads: 0
419 also remote heads: 1
419 also remote heads: 1
420 both: 0
420 both: 0
421 local heads: 1
421 local heads: 1
422 common: 0
422 common: 0
423 missing: 1
423 missing: 1
424 remote heads: 2
424 remote heads: 2
425 common: 1
425 common: 1
426 unknown: 1
426 unknown: 1
427 local changesets: 8
427 local changesets: 8
428 common: 5
428 common: 5
429 heads: 1
429 heads: 1
430 roots: 1
430 roots: 1
431 missing: 3
431 missing: 3
432 heads: 1
432 heads: 1
433 roots: 1
433 roots: 1
434 first undecided set: 3
434 first undecided set: 3
435 heads: 1
435 heads: 1
436 roots: 1
436 roots: 1
437 common: 0
437 common: 0
438 missing: 3
438 missing: 3
439 common heads: bebd167eb94d
439 common heads: bebd167eb94d
440
440
441 Both sides many new with stub:
441 Both sides many new with stub:
442
442
443 $ testdesc '-ra1 -ra2' '-rb' '
443 $ testdesc '-ra1 -ra2' '-rb' '
444 > +2:f +2:a1 +30 :b
444 > +2:f +2:a1 +30 :b
445 > <f +30 :a2'
445 > <f +30 :a2'
446
446
447 % -- a -> b tree
447 % -- a -> b tree
448 comparing with b
448 comparing with b
449 searching for changes
449 searching for changes
450 unpruned common: 2dc09a01254d
450 unpruned common: 2dc09a01254d
451 elapsed time: * seconds (glob)
451 elapsed time: * seconds (glob)
452 round-trips: 4
452 round-trips: 4
453 heads summary:
453 heads summary:
454 total common heads: 1
454 total common heads: 1
455 also local heads: 1
455 also local heads: 1
456 also remote heads: 0
456 also remote heads: 0
457 both: 0
457 both: 0
458 local heads: 2
458 local heads: 2
459 common: 1
459 common: 1
460 missing: 1
460 missing: 1
461 remote heads: 1
461 remote heads: 1
462 common: 0
462 common: 0
463 unknown: 1
463 unknown: 1
464 local changesets: 34
464 local changesets: 34
465 common: 4
465 common: 4
466 heads: 1
466 heads: 1
467 roots: 1
467 roots: 1
468 missing: 30
468 missing: 30
469 heads: 1
469 heads: 1
470 roots: 1
470 roots: 1
471 first undecided set: 33
471 first undecided set: 33
472 heads: 2
472 heads: 2
473 roots: 1
473 roots: 1
474 common: 3
474 common: 3
475 missing: 30
475 missing: 30
476 common heads: 2dc09a01254d
476 common heads: 2dc09a01254d
477
477
478 % -- a -> b set
478 % -- a -> b set
479 comparing with b
479 comparing with b
480 query 1; heads
480 query 1; heads
481 searching for changes
481 searching for changes
482 taking initial sample
482 taking initial sample
483 searching: 2 queries
483 searching: 2 queries
484 query 2; still undecided: 29, sample size is: 29
484 query 2; still undecided: 29, sample size is: 29
485 2 total queries in *.????s (glob)
485 2 total queries in *.????s (glob)
486 elapsed time: * seconds (glob)
486 elapsed time: * seconds (glob)
487 round-trips: 2
487 round-trips: 2
488 heads summary:
488 heads summary:
489 total common heads: 1
489 total common heads: 1
490 also local heads: 1
490 also local heads: 1
491 also remote heads: 0
491 also remote heads: 0
492 both: 0
492 both: 0
493 local heads: 2
493 local heads: 2
494 common: 1
494 common: 1
495 missing: 1
495 missing: 1
496 remote heads: 1
496 remote heads: 1
497 common: 0
497 common: 0
498 unknown: 1
498 unknown: 1
499 local changesets: 34
499 local changesets: 34
500 common: 4
500 common: 4
501 heads: 1
501 heads: 1
502 roots: 1
502 roots: 1
503 missing: 30
503 missing: 30
504 heads: 1
504 heads: 1
505 roots: 1
505 roots: 1
506 first undecided set: 33
506 first undecided set: 33
507 heads: 2
507 heads: 2
508 roots: 1
508 roots: 1
509 common: 3
509 common: 3
510 missing: 30
510 missing: 30
511 common heads: 2dc09a01254d
511 common heads: 2dc09a01254d
512
512
513 % -- a -> b set (tip only)
513 % -- a -> b set (tip only)
514 comparing with b
514 comparing with b
515 query 1; heads
515 query 1; heads
516 searching for changes
516 searching for changes
517 taking quick initial sample
517 taking quick initial sample
518 searching: 2 queries
518 searching: 2 queries
519 query 2; still undecided: 31, sample size is: 31
519 query 2; still undecided: 31, sample size is: 31
520 2 total queries in *.????s (glob)
520 2 total queries in *.????s (glob)
521 elapsed time: * seconds (glob)
521 elapsed time: * seconds (glob)
522 round-trips: 2
522 round-trips: 2
523 heads summary:
523 heads summary:
524 total common heads: 1
524 total common heads: 1
525 also local heads: 0
525 also local heads: 0
526 also remote heads: 0
526 also remote heads: 0
527 both: 0
527 both: 0
528 local heads: 2
528 local heads: 2
529 common: 0
529 common: 0
530 missing: 2
530 missing: 2
531 remote heads: 1
531 remote heads: 1
532 common: 0
532 common: 0
533 unknown: 1
533 unknown: 1
534 local changesets: 34
534 local changesets: 34
535 common: 2
535 common: 2
536 heads: 1
536 heads: 1
537 roots: 1
537 roots: 1
538 missing: 32
538 missing: 32
539 heads: 2
539 heads: 2
540 roots: 2
540 roots: 2
541 first undecided set: 34
541 first undecided set: 34
542 heads: 2
542 heads: 2
543 roots: 1
543 roots: 1
544 common: 2
544 common: 2
545 missing: 32
545 missing: 32
546 common heads: 66f7d451a68b
546 common heads: 66f7d451a68b
547
547
548 % -- b -> a tree
548 % -- b -> a tree
549 comparing with a
549 comparing with a
550 searching for changes
550 searching for changes
551 unpruned common: 2dc09a01254d 66f7d451a68b
551 unpruned common: 2dc09a01254d 66f7d451a68b
552 elapsed time: * seconds (glob)
552 elapsed time: * seconds (glob)
553 round-trips: 4
553 round-trips: 4
554 heads summary:
554 heads summary:
555 total common heads: 1
555 total common heads: 1
556 also local heads: 0
556 also local heads: 0
557 also remote heads: 1
557 also remote heads: 1
558 both: 0
558 both: 0
559 local heads: 1
559 local heads: 1
560 common: 0
560 common: 0
561 missing: 1
561 missing: 1
562 remote heads: 2
562 remote heads: 2
563 common: 1
563 common: 1
564 unknown: 1
564 unknown: 1
565 local changesets: 34
565 local changesets: 34
566 common: 4
566 common: 4
567 heads: 1
567 heads: 1
568 roots: 1
568 roots: 1
569 missing: 30
569 missing: 30
570 heads: 1
570 heads: 1
571 roots: 1
571 roots: 1
572 first undecided set: 30
572 first undecided set: 30
573 heads: 1
573 heads: 1
574 roots: 1
574 roots: 1
575 common: 0
575 common: 0
576 missing: 30
576 missing: 30
577 common heads: 2dc09a01254d
577 common heads: 2dc09a01254d
578
578
579 % -- b -> a set
579 % -- b -> a set
580 comparing with a
580 comparing with a
581 query 1; heads
581 query 1; heads
582 searching for changes
582 searching for changes
583 taking initial sample
583 taking initial sample
584 searching: 2 queries
584 searching: 2 queries
585 query 2; still undecided: 29, sample size is: 29
585 query 2; still undecided: 29, sample size is: 29
586 2 total queries in *.????s (glob)
586 2 total queries in *.????s (glob)
587 elapsed time: * seconds (glob)
587 elapsed time: * seconds (glob)
588 round-trips: 2
588 round-trips: 2
589 heads summary:
589 heads summary:
590 total common heads: 1
590 total common heads: 1
591 also local heads: 0
591 also local heads: 0
592 also remote heads: 1
592 also remote heads: 1
593 both: 0
593 both: 0
594 local heads: 1
594 local heads: 1
595 common: 0
595 common: 0
596 missing: 1
596 missing: 1
597 remote heads: 2
597 remote heads: 2
598 common: 1
598 common: 1
599 unknown: 1
599 unknown: 1
600 local changesets: 34
600 local changesets: 34
601 common: 4
601 common: 4
602 heads: 1
602 heads: 1
603 roots: 1
603 roots: 1
604 missing: 30
604 missing: 30
605 heads: 1
605 heads: 1
606 roots: 1
606 roots: 1
607 first undecided set: 30
607 first undecided set: 30
608 heads: 1
608 heads: 1
609 roots: 1
609 roots: 1
610 common: 0
610 common: 0
611 missing: 30
611 missing: 30
612 common heads: 2dc09a01254d
612 common heads: 2dc09a01254d
613
613
614 % -- b -> a set (tip only)
614 % -- b -> a set (tip only)
615 comparing with a
615 comparing with a
616 query 1; heads
616 query 1; heads
617 searching for changes
617 searching for changes
618 taking initial sample
618 taking initial sample
619 searching: 2 queries
619 searching: 2 queries
620 query 2; still undecided: 29, sample size is: 29
620 query 2; still undecided: 29, sample size is: 29
621 2 total queries in *.????s (glob)
621 2 total queries in *.????s (glob)
622 elapsed time: * seconds (glob)
622 elapsed time: * seconds (glob)
623 round-trips: 2
623 round-trips: 2
624 heads summary:
624 heads summary:
625 total common heads: 1
625 total common heads: 1
626 also local heads: 0
626 also local heads: 0
627 also remote heads: 1
627 also remote heads: 1
628 both: 0
628 both: 0
629 local heads: 1
629 local heads: 1
630 common: 0
630 common: 0
631 missing: 1
631 missing: 1
632 remote heads: 2
632 remote heads: 2
633 common: 1
633 common: 1
634 unknown: 1
634 unknown: 1
635 local changesets: 34
635 local changesets: 34
636 common: 4
636 common: 4
637 heads: 1
637 heads: 1
638 roots: 1
638 roots: 1
639 missing: 30
639 missing: 30
640 heads: 1
640 heads: 1
641 roots: 1
641 roots: 1
642 first undecided set: 30
642 first undecided set: 30
643 heads: 1
643 heads: 1
644 roots: 1
644 roots: 1
645 common: 0
645 common: 0
646 missing: 30
646 missing: 30
647 common heads: 2dc09a01254d
647 common heads: 2dc09a01254d
648
648
649
649
650 Both many new:
650 Both many new:
651
651
652 $ testdesc '-ra' '-rb' '
652 $ testdesc '-ra' '-rb' '
653 > +2:f +30 :b
653 > +2:f +30 :b
654 > <f +30 :a'
654 > <f +30 :a'
655
655
656 % -- a -> b tree
656 % -- a -> b tree
657 comparing with b
657 comparing with b
658 searching for changes
658 searching for changes
659 unpruned common: 66f7d451a68b
659 unpruned common: 66f7d451a68b
660 elapsed time: * seconds (glob)
660 elapsed time: * seconds (glob)
661 round-trips: 4
661 round-trips: 4
662 heads summary:
662 heads summary:
663 total common heads: 1
663 total common heads: 1
664 also local heads: 0
664 also local heads: 0
665 also remote heads: 0
665 also remote heads: 0
666 both: 0
666 both: 0
667 local heads: 1
667 local heads: 1
668 common: 0
668 common: 0
669 missing: 1
669 missing: 1
670 remote heads: 1
670 remote heads: 1
671 common: 0
671 common: 0
672 unknown: 1
672 unknown: 1
673 local changesets: 32
673 local changesets: 32
674 common: 2
674 common: 2
675 heads: 1
675 heads: 1
676 roots: 1
676 roots: 1
677 missing: 30
677 missing: 30
678 heads: 1
678 heads: 1
679 roots: 1
679 roots: 1
680 first undecided set: 32
680 first undecided set: 32
681 heads: 1
681 heads: 1
682 roots: 1
682 roots: 1
683 common: 2
683 common: 2
684 missing: 30
684 missing: 30
685 common heads: 66f7d451a68b
685 common heads: 66f7d451a68b
686
686
687 % -- a -> b set
687 % -- a -> b set
688 comparing with b
688 comparing with b
689 query 1; heads
689 query 1; heads
690 searching for changes
690 searching for changes
691 taking quick initial sample
691 taking quick initial sample
692 searching: 2 queries
692 searching: 2 queries
693 query 2; still undecided: 31, sample size is: 31
693 query 2; still undecided: 31, sample size is: 31
694 2 total queries in *.????s (glob)
694 2 total queries in *.????s (glob)
695 elapsed time: * seconds (glob)
695 elapsed time: * seconds (glob)
696 round-trips: 2
696 round-trips: 2
697 heads summary:
697 heads summary:
698 total common heads: 1
698 total common heads: 1
699 also local heads: 0
699 also local heads: 0
700 also remote heads: 0
700 also remote heads: 0
701 both: 0
701 both: 0
702 local heads: 1
702 local heads: 1
703 common: 0
703 common: 0
704 missing: 1
704 missing: 1
705 remote heads: 1
705 remote heads: 1
706 common: 0
706 common: 0
707 unknown: 1
707 unknown: 1
708 local changesets: 32
708 local changesets: 32
709 common: 2
709 common: 2
710 heads: 1
710 heads: 1
711 roots: 1
711 roots: 1
712 missing: 30
712 missing: 30
713 heads: 1
713 heads: 1
714 roots: 1
714 roots: 1
715 first undecided set: 32
715 first undecided set: 32
716 heads: 1
716 heads: 1
717 roots: 1
717 roots: 1
718 common: 2
718 common: 2
719 missing: 30
719 missing: 30
720 common heads: 66f7d451a68b
720 common heads: 66f7d451a68b
721
721
722 % -- a -> b set (tip only)
722 % -- a -> b set (tip only)
723 comparing with b
723 comparing with b
724 query 1; heads
724 query 1; heads
725 searching for changes
725 searching for changes
726 taking quick initial sample
726 taking quick initial sample
727 searching: 2 queries
727 searching: 2 queries
728 query 2; still undecided: 31, sample size is: 31
728 query 2; still undecided: 31, sample size is: 31
729 2 total queries in *.????s (glob)
729 2 total queries in *.????s (glob)
730 elapsed time: * seconds (glob)
730 elapsed time: * seconds (glob)
731 round-trips: 2
731 round-trips: 2
732 heads summary:
732 heads summary:
733 total common heads: 1
733 total common heads: 1
734 also local heads: 0
734 also local heads: 0
735 also remote heads: 0
735 also remote heads: 0
736 both: 0
736 both: 0
737 local heads: 1
737 local heads: 1
738 common: 0
738 common: 0
739 missing: 1
739 missing: 1
740 remote heads: 1
740 remote heads: 1
741 common: 0
741 common: 0
742 unknown: 1
742 unknown: 1
743 local changesets: 32
743 local changesets: 32
744 common: 2
744 common: 2
745 heads: 1
745 heads: 1
746 roots: 1
746 roots: 1
747 missing: 30
747 missing: 30
748 heads: 1
748 heads: 1
749 roots: 1
749 roots: 1
750 first undecided set: 32
750 first undecided set: 32
751 heads: 1
751 heads: 1
752 roots: 1
752 roots: 1
753 common: 2
753 common: 2
754 missing: 30
754 missing: 30
755 common heads: 66f7d451a68b
755 common heads: 66f7d451a68b
756
756
757 % -- b -> a tree
757 % -- b -> a tree
758 comparing with a
758 comparing with a
759 searching for changes
759 searching for changes
760 unpruned common: 66f7d451a68b
760 unpruned common: 66f7d451a68b
761 elapsed time: * seconds (glob)
761 elapsed time: * seconds (glob)
762 round-trips: 4
762 round-trips: 4
763 heads summary:
763 heads summary:
764 total common heads: 1
764 total common heads: 1
765 also local heads: 0
765 also local heads: 0
766 also remote heads: 0
766 also remote heads: 0
767 both: 0
767 both: 0
768 local heads: 1
768 local heads: 1
769 common: 0
769 common: 0
770 missing: 1
770 missing: 1
771 remote heads: 1
771 remote heads: 1
772 common: 0
772 common: 0
773 unknown: 1
773 unknown: 1
774 local changesets: 32
774 local changesets: 32
775 common: 2
775 common: 2
776 heads: 1
776 heads: 1
777 roots: 1
777 roots: 1
778 missing: 30
778 missing: 30
779 heads: 1
779 heads: 1
780 roots: 1
780 roots: 1
781 first undecided set: 32
781 first undecided set: 32
782 heads: 1
782 heads: 1
783 roots: 1
783 roots: 1
784 common: 2
784 common: 2
785 missing: 30
785 missing: 30
786 common heads: 66f7d451a68b
786 common heads: 66f7d451a68b
787
787
788 % -- b -> a set
788 % -- b -> a set
789 comparing with a
789 comparing with a
790 query 1; heads
790 query 1; heads
791 searching for changes
791 searching for changes
792 taking quick initial sample
792 taking quick initial sample
793 searching: 2 queries
793 searching: 2 queries
794 query 2; still undecided: 31, sample size is: 31
794 query 2; still undecided: 31, sample size is: 31
795 2 total queries in *.????s (glob)
795 2 total queries in *.????s (glob)
796 elapsed time: * seconds (glob)
796 elapsed time: * seconds (glob)
797 round-trips: 2
797 round-trips: 2
798 heads summary:
798 heads summary:
799 total common heads: 1
799 total common heads: 1
800 also local heads: 0
800 also local heads: 0
801 also remote heads: 0
801 also remote heads: 0
802 both: 0
802 both: 0
803 local heads: 1
803 local heads: 1
804 common: 0
804 common: 0
805 missing: 1
805 missing: 1
806 remote heads: 1
806 remote heads: 1
807 common: 0
807 common: 0
808 unknown: 1
808 unknown: 1
809 local changesets: 32
809 local changesets: 32
810 common: 2
810 common: 2
811 heads: 1
811 heads: 1
812 roots: 1
812 roots: 1
813 missing: 30
813 missing: 30
814 heads: 1
814 heads: 1
815 roots: 1
815 roots: 1
816 first undecided set: 32
816 first undecided set: 32
817 heads: 1
817 heads: 1
818 roots: 1
818 roots: 1
819 common: 2
819 common: 2
820 missing: 30
820 missing: 30
821 common heads: 66f7d451a68b
821 common heads: 66f7d451a68b
822
822
823 % -- b -> a set (tip only)
823 % -- b -> a set (tip only)
824 comparing with a
824 comparing with a
825 query 1; heads
825 query 1; heads
826 searching for changes
826 searching for changes
827 taking quick initial sample
827 taking quick initial sample
828 searching: 2 queries
828 searching: 2 queries
829 query 2; still undecided: 31, sample size is: 31
829 query 2; still undecided: 31, sample size is: 31
830 2 total queries in *.????s (glob)
830 2 total queries in *.????s (glob)
831 elapsed time: * seconds (glob)
831 elapsed time: * seconds (glob)
832 round-trips: 2
832 round-trips: 2
833 heads summary:
833 heads summary:
834 total common heads: 1
834 total common heads: 1
835 also local heads: 0
835 also local heads: 0
836 also remote heads: 0
836 also remote heads: 0
837 both: 0
837 both: 0
838 local heads: 1
838 local heads: 1
839 common: 0
839 common: 0
840 missing: 1
840 missing: 1
841 remote heads: 1
841 remote heads: 1
842 common: 0
842 common: 0
843 unknown: 1
843 unknown: 1
844 local changesets: 32
844 local changesets: 32
845 common: 2
845 common: 2
846 heads: 1
846 heads: 1
847 roots: 1
847 roots: 1
848 missing: 30
848 missing: 30
849 heads: 1
849 heads: 1
850 roots: 1
850 roots: 1
851 first undecided set: 32
851 first undecided set: 32
852 heads: 1
852 heads: 1
853 roots: 1
853 roots: 1
854 common: 2
854 common: 2
855 missing: 30
855 missing: 30
856 common heads: 66f7d451a68b
856 common heads: 66f7d451a68b
857
857
858
858
859 Both many new skewed:
859 Both many new skewed:
860
860
861 $ testdesc '-ra' '-rb' '
861 $ testdesc '-ra' '-rb' '
862 > +2:f +30 :b
862 > +2:f +30 :b
863 > <f +50 :a'
863 > <f +50 :a'
864
864
865 % -- a -> b tree
865 % -- a -> b tree
866 comparing with b
866 comparing with b
867 searching for changes
867 searching for changes
868 unpruned common: 66f7d451a68b
868 unpruned common: 66f7d451a68b
869 elapsed time: * seconds (glob)
869 elapsed time: * seconds (glob)
870 round-trips: 4
870 round-trips: 4
871 heads summary:
871 heads summary:
872 total common heads: 1
872 total common heads: 1
873 also local heads: 0
873 also local heads: 0
874 also remote heads: 0
874 also remote heads: 0
875 both: 0
875 both: 0
876 local heads: 1
876 local heads: 1
877 common: 0
877 common: 0
878 missing: 1
878 missing: 1
879 remote heads: 1
879 remote heads: 1
880 common: 0
880 common: 0
881 unknown: 1
881 unknown: 1
882 local changesets: 52
882 local changesets: 52
883 common: 2
883 common: 2
884 heads: 1
884 heads: 1
885 roots: 1
885 roots: 1
886 missing: 50
886 missing: 50
887 heads: 1
887 heads: 1
888 roots: 1
888 roots: 1
889 first undecided set: 52
889 first undecided set: 52
890 heads: 1
890 heads: 1
891 roots: 1
891 roots: 1
892 common: 2
892 common: 2
893 missing: 50
893 missing: 50
894 common heads: 66f7d451a68b
894 common heads: 66f7d451a68b
895
895
896 % -- a -> b set
896 % -- a -> b set
897 comparing with b
897 comparing with b
898 query 1; heads
898 query 1; heads
899 searching for changes
899 searching for changes
900 taking quick initial sample
900 taking quick initial sample
901 searching: 2 queries
901 searching: 2 queries
902 query 2; still undecided: 51, sample size is: 51
902 query 2; still undecided: 51, sample size is: 51
903 2 total queries in *.????s (glob)
903 2 total queries in *.????s (glob)
904 elapsed time: * seconds (glob)
904 elapsed time: * seconds (glob)
905 round-trips: 2
905 round-trips: 2
906 heads summary:
906 heads summary:
907 total common heads: 1
907 total common heads: 1
908 also local heads: 0
908 also local heads: 0
909 also remote heads: 0
909 also remote heads: 0
910 both: 0
910 both: 0
911 local heads: 1
911 local heads: 1
912 common: 0
912 common: 0
913 missing: 1
913 missing: 1
914 remote heads: 1
914 remote heads: 1
915 common: 0
915 common: 0
916 unknown: 1
916 unknown: 1
917 local changesets: 52
917 local changesets: 52
918 common: 2
918 common: 2
919 heads: 1
919 heads: 1
920 roots: 1
920 roots: 1
921 missing: 50
921 missing: 50
922 heads: 1
922 heads: 1
923 roots: 1
923 roots: 1
924 first undecided set: 52
924 first undecided set: 52
925 heads: 1
925 heads: 1
926 roots: 1
926 roots: 1
927 common: 2
927 common: 2
928 missing: 50
928 missing: 50
929 common heads: 66f7d451a68b
929 common heads: 66f7d451a68b
930
930
931 % -- a -> b set (tip only)
931 % -- a -> b set (tip only)
932 comparing with b
932 comparing with b
933 query 1; heads
933 query 1; heads
934 searching for changes
934 searching for changes
935 taking quick initial sample
935 taking quick initial sample
936 searching: 2 queries
936 searching: 2 queries
937 query 2; still undecided: 51, sample size is: 51
937 query 2; still undecided: 51, sample size is: 51
938 2 total queries in *.????s (glob)
938 2 total queries in *.????s (glob)
939 elapsed time: * seconds (glob)
939 elapsed time: * seconds (glob)
940 round-trips: 2
940 round-trips: 2
941 heads summary:
941 heads summary:
942 total common heads: 1
942 total common heads: 1
943 also local heads: 0
943 also local heads: 0
944 also remote heads: 0
944 also remote heads: 0
945 both: 0
945 both: 0
946 local heads: 1
946 local heads: 1
947 common: 0
947 common: 0
948 missing: 1
948 missing: 1
949 remote heads: 1
949 remote heads: 1
950 common: 0
950 common: 0
951 unknown: 1
951 unknown: 1
952 local changesets: 52
952 local changesets: 52
953 common: 2
953 common: 2
954 heads: 1
954 heads: 1
955 roots: 1
955 roots: 1
956 missing: 50
956 missing: 50
957 heads: 1
957 heads: 1
958 roots: 1
958 roots: 1
959 first undecided set: 52
959 first undecided set: 52
960 heads: 1
960 heads: 1
961 roots: 1
961 roots: 1
962 common: 2
962 common: 2
963 missing: 50
963 missing: 50
964 common heads: 66f7d451a68b
964 common heads: 66f7d451a68b
965
965
966 % -- b -> a tree
966 % -- b -> a tree
967 comparing with a
967 comparing with a
968 searching for changes
968 searching for changes
969 unpruned common: 66f7d451a68b
969 unpruned common: 66f7d451a68b
970 elapsed time: * seconds (glob)
970 elapsed time: * seconds (glob)
971 round-trips: 3
971 round-trips: 3
972 heads summary:
972 heads summary:
973 total common heads: 1
973 total common heads: 1
974 also local heads: 0
974 also local heads: 0
975 also remote heads: 0
975 also remote heads: 0
976 both: 0
976 both: 0
977 local heads: 1
977 local heads: 1
978 common: 0
978 common: 0
979 missing: 1
979 missing: 1
980 remote heads: 1
980 remote heads: 1
981 common: 0
981 common: 0
982 unknown: 1
982 unknown: 1
983 local changesets: 32
983 local changesets: 32
984 common: 2
984 common: 2
985 heads: 1
985 heads: 1
986 roots: 1
986 roots: 1
987 missing: 30
987 missing: 30
988 heads: 1
988 heads: 1
989 roots: 1
989 roots: 1
990 first undecided set: 32
990 first undecided set: 32
991 heads: 1
991 heads: 1
992 roots: 1
992 roots: 1
993 common: 2
993 common: 2
994 missing: 30
994 missing: 30
995 common heads: 66f7d451a68b
995 common heads: 66f7d451a68b
996
996
997 % -- b -> a set
997 % -- b -> a set
998 comparing with a
998 comparing with a
999 query 1; heads
999 query 1; heads
1000 searching for changes
1000 searching for changes
1001 taking quick initial sample
1001 taking quick initial sample
1002 searching: 2 queries
1002 searching: 2 queries
1003 query 2; still undecided: 31, sample size is: 31
1003 query 2; still undecided: 31, sample size is: 31
1004 2 total queries in *.????s (glob)
1004 2 total queries in *.????s (glob)
1005 elapsed time: * seconds (glob)
1005 elapsed time: * seconds (glob)
1006 round-trips: 2
1006 round-trips: 2
1007 heads summary:
1007 heads summary:
1008 total common heads: 1
1008 total common heads: 1
1009 also local heads: 0
1009 also local heads: 0
1010 also remote heads: 0
1010 also remote heads: 0
1011 both: 0
1011 both: 0
1012 local heads: 1
1012 local heads: 1
1013 common: 0
1013 common: 0
1014 missing: 1
1014 missing: 1
1015 remote heads: 1
1015 remote heads: 1
1016 common: 0
1016 common: 0
1017 unknown: 1
1017 unknown: 1
1018 local changesets: 32
1018 local changesets: 32
1019 common: 2
1019 common: 2
1020 heads: 1
1020 heads: 1
1021 roots: 1
1021 roots: 1
1022 missing: 30
1022 missing: 30
1023 heads: 1
1023 heads: 1
1024 roots: 1
1024 roots: 1
1025 first undecided set: 32
1025 first undecided set: 32
1026 heads: 1
1026 heads: 1
1027 roots: 1
1027 roots: 1
1028 common: 2
1028 common: 2
1029 missing: 30
1029 missing: 30
1030 common heads: 66f7d451a68b
1030 common heads: 66f7d451a68b
1031
1031
1032 % -- b -> a set (tip only)
1032 % -- b -> a set (tip only)
1033 comparing with a
1033 comparing with a
1034 query 1; heads
1034 query 1; heads
1035 searching for changes
1035 searching for changes
1036 taking quick initial sample
1036 taking quick initial sample
1037 searching: 2 queries
1037 searching: 2 queries
1038 query 2; still undecided: 31, sample size is: 31
1038 query 2; still undecided: 31, sample size is: 31
1039 2 total queries in *.????s (glob)
1039 2 total queries in *.????s (glob)
1040 elapsed time: * seconds (glob)
1040 elapsed time: * seconds (glob)
1041 round-trips: 2
1041 round-trips: 2
1042 heads summary:
1042 heads summary:
1043 total common heads: 1
1043 total common heads: 1
1044 also local heads: 0
1044 also local heads: 0
1045 also remote heads: 0
1045 also remote heads: 0
1046 both: 0
1046 both: 0
1047 local heads: 1
1047 local heads: 1
1048 common: 0
1048 common: 0
1049 missing: 1
1049 missing: 1
1050 remote heads: 1
1050 remote heads: 1
1051 common: 0
1051 common: 0
1052 unknown: 1
1052 unknown: 1
1053 local changesets: 32
1053 local changesets: 32
1054 common: 2
1054 common: 2
1055 heads: 1
1055 heads: 1
1056 roots: 1
1056 roots: 1
1057 missing: 30
1057 missing: 30
1058 heads: 1
1058 heads: 1
1059 roots: 1
1059 roots: 1
1060 first undecided set: 32
1060 first undecided set: 32
1061 heads: 1
1061 heads: 1
1062 roots: 1
1062 roots: 1
1063 common: 2
1063 common: 2
1064 missing: 30
1064 missing: 30
1065 common heads: 66f7d451a68b
1065 common heads: 66f7d451a68b
1066
1066
1067
1067
1068 Both many new on top of long history:
1068 Both many new on top of long history:
1069
1069
1070 $ testdesc '-ra' '-rb' '
1070 $ testdesc '-ra' '-rb' '
1071 > +1000:f +30 :b
1071 > +1000:f +30 :b
1072 > <f +50 :a'
1072 > <f +50 :a'
1073
1073
1074 % -- a -> b tree
1074 % -- a -> b tree
1075 comparing with b
1075 comparing with b
1076 searching for changes
1076 searching for changes
1077 unpruned common: 7ead0cba2838
1077 unpruned common: 7ead0cba2838
1078 elapsed time: * seconds (glob)
1078 elapsed time: * seconds (glob)
1079 round-trips: 4
1079 round-trips: 4
1080 heads summary:
1080 heads summary:
1081 total common heads: 1
1081 total common heads: 1
1082 also local heads: 0
1082 also local heads: 0
1083 also remote heads: 0
1083 also remote heads: 0
1084 both: 0
1084 both: 0
1085 local heads: 1
1085 local heads: 1
1086 common: 0
1086 common: 0
1087 missing: 1
1087 missing: 1
1088 remote heads: 1
1088 remote heads: 1
1089 common: 0
1089 common: 0
1090 unknown: 1
1090 unknown: 1
1091 local changesets: 1050
1091 local changesets: 1050
1092 common: 1000
1092 common: 1000
1093 heads: 1
1093 heads: 1
1094 roots: 1
1094 roots: 1
1095 missing: 50
1095 missing: 50
1096 heads: 1
1096 heads: 1
1097 roots: 1
1097 roots: 1
1098 first undecided set: 1050
1098 first undecided set: 1050
1099 heads: 1
1099 heads: 1
1100 roots: 1
1100 roots: 1
1101 common: 1000
1101 common: 1000
1102 missing: 50
1102 missing: 50
1103 common heads: 7ead0cba2838
1103 common heads: 7ead0cba2838
1104
1104
1105 % -- a -> b set
1105 % -- a -> b set
1106 comparing with b
1106 comparing with b
1107 query 1; heads
1107 query 1; heads
1108 searching for changes
1108 searching for changes
1109 taking quick initial sample
1109 taking quick initial sample
1110 searching: 2 queries
1110 searching: 2 queries
1111 query 2; still undecided: 1049, sample size is: 11
1111 query 2; still undecided: 1049, sample size is: 11
1112 sampling from both directions
1112 sampling from both directions
1113 searching: 3 queries
1113 searching: 3 queries
1114 query 3; still undecided: 31, sample size is: 31
1114 query 3; still undecided: 31, sample size is: 31
1115 3 total queries in *.????s (glob)
1115 3 total queries in *.????s (glob)
1116 elapsed time: * seconds (glob)
1116 elapsed time: * seconds (glob)
1117 round-trips: 3
1117 round-trips: 3
1118 heads summary:
1118 heads summary:
1119 total common heads: 1
1119 total common heads: 1
1120 also local heads: 0
1120 also local heads: 0
1121 also remote heads: 0
1121 also remote heads: 0
1122 both: 0
1122 both: 0
1123 local heads: 1
1123 local heads: 1
1124 common: 0
1124 common: 0
1125 missing: 1
1125 missing: 1
1126 remote heads: 1
1126 remote heads: 1
1127 common: 0
1127 common: 0
1128 unknown: 1
1128 unknown: 1
1129 local changesets: 1050
1129 local changesets: 1050
1130 common: 1000
1130 common: 1000
1131 heads: 1
1131 heads: 1
1132 roots: 1
1132 roots: 1
1133 missing: 50
1133 missing: 50
1134 heads: 1
1134 heads: 1
1135 roots: 1
1135 roots: 1
1136 first undecided set: 1050
1136 first undecided set: 1050
1137 heads: 1
1137 heads: 1
1138 roots: 1
1138 roots: 1
1139 common: 1000
1139 common: 1000
1140 missing: 50
1140 missing: 50
1141 common heads: 7ead0cba2838
1141 common heads: 7ead0cba2838
1142
1142
1143 % -- a -> b set (tip only)
1143 % -- a -> b set (tip only)
1144 comparing with b
1144 comparing with b
1145 query 1; heads
1145 query 1; heads
1146 searching for changes
1146 searching for changes
1147 taking quick initial sample
1147 taking quick initial sample
1148 searching: 2 queries
1148 searching: 2 queries
1149 query 2; still undecided: 1049, sample size is: 11
1149 query 2; still undecided: 1049, sample size is: 11
1150 sampling from both directions
1150 sampling from both directions
1151 searching: 3 queries
1151 searching: 3 queries
1152 query 3; still undecided: 31, sample size is: 31
1152 query 3; still undecided: 31, sample size is: 31
1153 3 total queries in *.????s (glob)
1153 3 total queries in *.????s (glob)
1154 elapsed time: * seconds (glob)
1154 elapsed time: * seconds (glob)
1155 round-trips: 3
1155 round-trips: 3
1156 heads summary:
1156 heads summary:
1157 total common heads: 1
1157 total common heads: 1
1158 also local heads: 0
1158 also local heads: 0
1159 also remote heads: 0
1159 also remote heads: 0
1160 both: 0
1160 both: 0
1161 local heads: 1
1161 local heads: 1
1162 common: 0
1162 common: 0
1163 missing: 1
1163 missing: 1
1164 remote heads: 1
1164 remote heads: 1
1165 common: 0
1165 common: 0
1166 unknown: 1
1166 unknown: 1
1167 local changesets: 1050
1167 local changesets: 1050
1168 common: 1000
1168 common: 1000
1169 heads: 1
1169 heads: 1
1170 roots: 1
1170 roots: 1
1171 missing: 50
1171 missing: 50
1172 heads: 1
1172 heads: 1
1173 roots: 1
1173 roots: 1
1174 first undecided set: 1050
1174 first undecided set: 1050
1175 heads: 1
1175 heads: 1
1176 roots: 1
1176 roots: 1
1177 common: 1000
1177 common: 1000
1178 missing: 50
1178 missing: 50
1179 common heads: 7ead0cba2838
1179 common heads: 7ead0cba2838
1180
1180
1181 % -- b -> a tree
1181 % -- b -> a tree
1182 comparing with a
1182 comparing with a
1183 searching for changes
1183 searching for changes
1184 unpruned common: 7ead0cba2838
1184 unpruned common: 7ead0cba2838
1185 elapsed time: * seconds (glob)
1185 elapsed time: * seconds (glob)
1186 round-trips: 3
1186 round-trips: 3
1187 heads summary:
1187 heads summary:
1188 total common heads: 1
1188 total common heads: 1
1189 also local heads: 0
1189 also local heads: 0
1190 also remote heads: 0
1190 also remote heads: 0
1191 both: 0
1191 both: 0
1192 local heads: 1
1192 local heads: 1
1193 common: 0
1193 common: 0
1194 missing: 1
1194 missing: 1
1195 remote heads: 1
1195 remote heads: 1
1196 common: 0
1196 common: 0
1197 unknown: 1
1197 unknown: 1
1198 local changesets: 1030
1198 local changesets: 1030
1199 common: 1000
1199 common: 1000
1200 heads: 1
1200 heads: 1
1201 roots: 1
1201 roots: 1
1202 missing: 30
1202 missing: 30
1203 heads: 1
1203 heads: 1
1204 roots: 1
1204 roots: 1
1205 first undecided set: 1030
1205 first undecided set: 1030
1206 heads: 1
1206 heads: 1
1207 roots: 1
1207 roots: 1
1208 common: 1000
1208 common: 1000
1209 missing: 30
1209 missing: 30
1210 common heads: 7ead0cba2838
1210 common heads: 7ead0cba2838
1211
1211
1212 % -- b -> a set
1212 % -- b -> a set
1213 comparing with a
1213 comparing with a
1214 query 1; heads
1214 query 1; heads
1215 searching for changes
1215 searching for changes
1216 taking quick initial sample
1216 taking quick initial sample
1217 searching: 2 queries
1217 searching: 2 queries
1218 query 2; still undecided: 1029, sample size is: 11
1218 query 2; still undecided: 1029, sample size is: 11
1219 sampling from both directions
1219 sampling from both directions
1220 searching: 3 queries
1220 searching: 3 queries
1221 query 3; still undecided: 15, sample size is: 15
1221 query 3; still undecided: 15, sample size is: 15
1222 3 total queries in *.????s (glob)
1222 3 total queries in *.????s (glob)
1223 elapsed time: * seconds (glob)
1223 elapsed time: * seconds (glob)
1224 round-trips: 3
1224 round-trips: 3
1225 heads summary:
1225 heads summary:
1226 total common heads: 1
1226 total common heads: 1
1227 also local heads: 0
1227 also local heads: 0
1228 also remote heads: 0
1228 also remote heads: 0
1229 both: 0
1229 both: 0
1230 local heads: 1
1230 local heads: 1
1231 common: 0
1231 common: 0
1232 missing: 1
1232 missing: 1
1233 remote heads: 1
1233 remote heads: 1
1234 common: 0
1234 common: 0
1235 unknown: 1
1235 unknown: 1
1236 local changesets: 1030
1236 local changesets: 1030
1237 common: 1000
1237 common: 1000
1238 heads: 1
1238 heads: 1
1239 roots: 1
1239 roots: 1
1240 missing: 30
1240 missing: 30
1241 heads: 1
1241 heads: 1
1242 roots: 1
1242 roots: 1
1243 first undecided set: 1030
1243 first undecided set: 1030
1244 heads: 1
1244 heads: 1
1245 roots: 1
1245 roots: 1
1246 common: 1000
1246 common: 1000
1247 missing: 30
1247 missing: 30
1248 common heads: 7ead0cba2838
1248 common heads: 7ead0cba2838
1249
1249
1250 % -- b -> a set (tip only)
1250 % -- b -> a set (tip only)
1251 comparing with a
1251 comparing with a
1252 query 1; heads
1252 query 1; heads
1253 searching for changes
1253 searching for changes
1254 taking quick initial sample
1254 taking quick initial sample
1255 searching: 2 queries
1255 searching: 2 queries
1256 query 2; still undecided: 1029, sample size is: 11
1256 query 2; still undecided: 1029, sample size is: 11
1257 sampling from both directions
1257 sampling from both directions
1258 searching: 3 queries
1258 searching: 3 queries
1259 query 3; still undecided: 15, sample size is: 15
1259 query 3; still undecided: 15, sample size is: 15
1260 3 total queries in *.????s (glob)
1260 3 total queries in *.????s (glob)
1261 elapsed time: * seconds (glob)
1261 elapsed time: * seconds (glob)
1262 round-trips: 3
1262 round-trips: 3
1263 heads summary:
1263 heads summary:
1264 total common heads: 1
1264 total common heads: 1
1265 also local heads: 0
1265 also local heads: 0
1266 also remote heads: 0
1266 also remote heads: 0
1267 both: 0
1267 both: 0
1268 local heads: 1
1268 local heads: 1
1269 common: 0
1269 common: 0
1270 missing: 1
1270 missing: 1
1271 remote heads: 1
1271 remote heads: 1
1272 common: 0
1272 common: 0
1273 unknown: 1
1273 unknown: 1
1274 local changesets: 1030
1274 local changesets: 1030
1275 common: 1000
1275 common: 1000
1276 heads: 1
1276 heads: 1
1277 roots: 1
1277 roots: 1
1278 missing: 30
1278 missing: 30
1279 heads: 1
1279 heads: 1
1280 roots: 1
1280 roots: 1
1281 first undecided set: 1030
1281 first undecided set: 1030
1282 heads: 1
1282 heads: 1
1283 roots: 1
1283 roots: 1
1284 common: 1000
1284 common: 1000
1285 missing: 30
1285 missing: 30
1286 common heads: 7ead0cba2838
1286 common heads: 7ead0cba2838
1287
1287
1288
1288
1289 One with >200 heads. We now switch to send them all in the initial roundtrip, but still do sampling for the later request.
1289 One with >200 heads. We now switch to send them all in the initial roundtrip, but still do sampling for the later request.
1290
1290
1291 $ hg init manyheads
1291 $ hg init manyheads
1292 $ cd manyheads
1292 $ cd manyheads
1293 $ echo "+300:r @a" >dagdesc
1293 $ echo "+300:r @a" >dagdesc
1294 $ 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
1294 $ 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
1295 $ 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
1295 $ 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
1296 $ 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
1296 $ 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
1297 $ 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
1297 $ 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
1298 $ 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
1298 $ 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
1299 $ 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
1299 $ 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
1300 $ 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
1300 $ 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
1301 $ 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
1301 $ 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
1302 $ 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
1302 $ 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
1303 $ 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
1303 $ 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
1304 $ 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
1304 $ 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
1305 $ 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
1305 $ 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
1306 $ 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
1306 $ 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
1307 $ echo "@b *r+3" >>dagdesc # one more head
1307 $ echo "@b *r+3" >>dagdesc # one more head
1308 $ hg debugbuilddag <dagdesc
1308 $ hg debugbuilddag <dagdesc
1309 reading DAG from stdin
1309 reading DAG from stdin
1310
1310
1311 $ hg heads -t --template . | wc -c
1311 $ hg heads -t --template . | wc -c
1312 \s*261 (re)
1312 \s*261 (re)
1313
1313
1314 $ hg clone -b a . a
1314 $ hg clone -b a . a
1315 adding changesets
1315 adding changesets
1316 adding manifests
1316 adding manifests
1317 adding file changes
1317 adding file changes
1318 added 1340 changesets with 0 changes to 0 files (+259 heads)
1318 added 1340 changesets with 0 changes to 0 files (+259 heads)
1319 new changesets 1ea73414a91b:1c51e2c80832
1319 new changesets 1ea73414a91b:1c51e2c80832
1320 updating to branch a
1320 updating to branch a
1321 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1321 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1322 $ hg clone -b b . b
1322 $ hg clone -b b . b
1323 adding changesets
1323 adding changesets
1324 adding manifests
1324 adding manifests
1325 adding file changes
1325 adding file changes
1326 added 304 changesets with 0 changes to 0 files
1326 added 304 changesets with 0 changes to 0 files
1327 new changesets 1ea73414a91b:513314ca8b3a
1327 new changesets 1ea73414a91b:513314ca8b3a
1328 updating to branch b
1328 updating to branch b
1329 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1329 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1330
1330
1331 $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true --config devel.discovery.randomize=false
1331 $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true --config devel.discovery.randomize=false --config devel.discovery.sample-size.initial=50
1332 comparing with b
1332 comparing with b
1333 query 1; heads
1333 query 1; heads
1334 searching for changes
1334 searching for changes
1335 taking quick initial sample
1335 taking quick initial sample
1336 searching: 2 queries
1336 searching: 2 queries
1337 query 2; still undecided: 1080, sample size is: 100
1337 query 2; still undecided: 1080, sample size is: 50
1338 sampling from both directions
1338 sampling from both directions
1339 searching: 3 queries
1339 searching: 3 queries
1340 query 3; still undecided: 980, sample size is: 200
1340 query 3; still undecided: 1030, sample size is: 200
1341 sampling from both directions
1341 sampling from both directions
1342 searching: 4 queries
1342 searching: 4 queries
1343 query 4; still undecided: 497, sample size is: 210
1343 query 4; still undecided: 547, sample size is: 210
1344 sampling from both directions
1344 sampling from both directions
1345 searching: 5 queries
1345 searching: 5 queries
1346 query 5; still undecided: 285, sample size is: 220
1346 query 5; still undecided: 336, sample size is: 220
1347 sampling from both directions
1347 sampling from both directions
1348 searching: 6 queries
1348 searching: 6 queries
1349 query 6; still undecided: 63, sample size is: 63
1349 query 6; still undecided: 114, sample size is: 114
1350 6 total queries in *.????s (glob)
1350 6 total queries in *.????s (glob)
1351 elapsed time: * seconds (glob)
1351 elapsed time: * seconds (glob)
1352 round-trips: 6
1352 round-trips: 6
1353 heads summary:
1353 heads summary:
1354 total common heads: 1
1354 total common heads: 1
1355 also local heads: 0
1355 also local heads: 0
1356 also remote heads: 0
1356 also remote heads: 0
1357 both: 0
1357 both: 0
1358 local heads: 260
1358 local heads: 260
1359 common: 0
1359 common: 0
1360 missing: 260
1360 missing: 260
1361 remote heads: 1
1361 remote heads: 1
1362 common: 0
1362 common: 0
1363 unknown: 1
1363 unknown: 1
1364 local changesets: 1340
1364 local changesets: 1340
1365 common: 300
1365 common: 300
1366 heads: 1
1366 heads: 1
1367 roots: 1
1367 roots: 1
1368 missing: 1040
1368 missing: 1040
1369 heads: 260
1369 heads: 260
1370 roots: 260
1370 roots: 260
1371 first undecided set: 1340
1371 first undecided set: 1340
1372 heads: 260
1372 heads: 260
1373 roots: 1
1373 roots: 1
1374 common: 300
1374 common: 300
1375 missing: 1040
1375 missing: 1040
1376 common heads: 3ee37d65064a
1376 common heads: 3ee37d65064a
1377 $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true --rev tip
1377 $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true --rev tip
1378 comparing with b
1378 comparing with b
1379 query 1; heads
1379 query 1; heads
1380 searching for changes
1380 searching for changes
1381 taking quick initial sample
1381 taking quick initial sample
1382 searching: 2 queries
1382 searching: 2 queries
1383 query 2; still undecided: 303, sample size is: 9
1383 query 2; still undecided: 303, sample size is: 9
1384 sampling from both directions
1384 sampling from both directions
1385 searching: 3 queries
1385 searching: 3 queries
1386 query 3; still undecided: 3, sample size is: 3
1386 query 3; still undecided: 3, sample size is: 3
1387 3 total queries in *.????s (glob)
1387 3 total queries in *.????s (glob)
1388 elapsed time: * seconds (glob)
1388 elapsed time: * seconds (glob)
1389 round-trips: 3
1389 round-trips: 3
1390 heads summary:
1390 heads summary:
1391 total common heads: 1
1391 total common heads: 1
1392 also local heads: 0
1392 also local heads: 0
1393 also remote heads: 0
1393 also remote heads: 0
1394 both: 0
1394 both: 0
1395 local heads: 260
1395 local heads: 260
1396 common: 0
1396 common: 0
1397 missing: 260
1397 missing: 260
1398 remote heads: 1
1398 remote heads: 1
1399 common: 0
1399 common: 0
1400 unknown: 1
1400 unknown: 1
1401 local changesets: 1340
1401 local changesets: 1340
1402 common: 300
1402 common: 300
1403 heads: 1
1403 heads: 1
1404 roots: 1
1404 roots: 1
1405 missing: 1040
1405 missing: 1040
1406 heads: 260
1406 heads: 260
1407 roots: 260
1407 roots: 260
1408 first undecided set: 1340
1408 first undecided set: 1340
1409 heads: 260
1409 heads: 260
1410 roots: 1
1410 roots: 1
1411 common: 300
1411 common: 300
1412 missing: 1040
1412 missing: 1040
1413 common heads: 3ee37d65064a
1413 common heads: 3ee37d65064a
1414
1414
1415 $ hg -R a debugdiscovery b --debug --config devel.discovery.exchange-heads=false --config devel.discovery.randomize=false --config devel.discovery.grow-sample.rate=1.01
1415 $ hg -R a debugdiscovery b --debug --config devel.discovery.exchange-heads=false --config devel.discovery.randomize=false --config devel.discovery.grow-sample.rate=1.20 --config devel.discovery.sample-size=50
1416 comparing with b
1416 comparing with b
1417 searching for changes
1417 searching for changes
1418 sampling from both directions
1418 sampling from both directions
1419 query 1; still undecided: 1340, sample size is: 200
1419 query 1; still undecided: 1340, sample size is: 50
1420 sampling from both directions
1421 query 2; still undecided: 995, sample size is: 60
1420 sampling from both directions
1422 sampling from both directions
1421 query 2; still undecided: 795, sample size is: 202
1423 query 3; still undecided: 913, sample size is: 72
1422 sampling from both directions
1424 sampling from both directions
1423 query 3; still undecided: 525, sample size is: 204
1425 query 4; still undecided: 816, sample size is: 204
1426 sampling from both directions
1427 query 5; still undecided: 612, sample size is: 153
1424 sampling from both directions
1428 sampling from both directions
1425 query 4; still undecided: 252, sample size is: 206
1429 query 6; still undecided: 456, sample size is: 123
1430 sampling from both directions
1431 query 7; still undecided: 332, sample size is: 147
1426 sampling from both directions
1432 sampling from both directions
1427 query 5; still undecided: 44, sample size is: 44
1433 query 8; still undecided: 184, sample size is: 176
1428 5 total queries in *s (glob)
1434 sampling from both directions
1429 elapsed time: * seconds (glob)
1435 query 9; still undecided: 8, sample size is: 8
1430 round-trips: 5
1436 9 total queries in *s (glob)
1437 elapsed time: * seconds (glob)
1438 round-trips: 9
1431 heads summary:
1439 heads summary:
1432 total common heads: 1
1440 total common heads: 1
1433 also local heads: 0
1441 also local heads: 0
1434 also remote heads: 0
1442 also remote heads: 0
1435 both: 0
1443 both: 0
1436 local heads: 260
1444 local heads: 260
1437 common: 0
1445 common: 0
1438 missing: 260
1446 missing: 260
1439 remote heads: 1
1447 remote heads: 1
1440 common: 0
1448 common: 0
1441 unknown: 1
1449 unknown: 1
1442 local changesets: 1340
1450 local changesets: 1340
1443 common: 300
1451 common: 300
1444 heads: 1
1452 heads: 1
1445 roots: 1
1453 roots: 1
1446 missing: 1040
1454 missing: 1040
1447 heads: 260
1455 heads: 260
1448 roots: 260
1456 roots: 260
1449 first undecided set: 1340
1457 first undecided set: 1340
1450 heads: 260
1458 heads: 260
1451 roots: 1
1459 roots: 1
1452 common: 300
1460 common: 300
1453 missing: 1040
1461 missing: 1040
1454 common heads: 3ee37d65064a
1462 common heads: 3ee37d65064a
1455
1463
1456 Test actual protocol when pulling one new head in addition to common heads
1464 Test actual protocol when pulling one new head in addition to common heads
1457
1465
1458 $ hg clone -U b c
1466 $ hg clone -U b c
1459 $ hg -R c id -ir tip
1467 $ hg -R c id -ir tip
1460 513314ca8b3a
1468 513314ca8b3a
1461 $ hg -R c up -qr default
1469 $ hg -R c up -qr default
1462 $ touch c/f
1470 $ touch c/f
1463 $ hg -R c ci -Aqm "extra head"
1471 $ hg -R c ci -Aqm "extra head"
1464 $ hg -R c id -i
1472 $ hg -R c id -i
1465 e64a39e7da8b
1473 e64a39e7da8b
1466
1474
1467 $ hg serve -R c -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1475 $ hg serve -R c -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1468 $ cat hg.pid >> $DAEMON_PIDS
1476 $ cat hg.pid >> $DAEMON_PIDS
1469
1477
1470 $ hg -R b incoming http://localhost:$HGPORT/ -T '{node|short}\n'
1478 $ hg -R b incoming http://localhost:$HGPORT/ -T '{node|short}\n'
1471 comparing with http://localhost:$HGPORT/
1479 comparing with http://localhost:$HGPORT/
1472 searching for changes
1480 searching for changes
1473 e64a39e7da8b
1481 e64a39e7da8b
1474
1482
1475 $ killdaemons.py
1483 $ killdaemons.py
1476 $ cut -d' ' -f6- access.log | grep -v cmd=known # cmd=known uses random sampling
1484 $ cut -d' ' -f6- access.log | grep -v cmd=known # cmd=known uses random sampling
1477 "GET /?cmd=capabilities HTTP/1.1" 200 -
1485 "GET /?cmd=capabilities HTTP/1.1" 200 -
1478 "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$ partial-pull
1486 "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$ partial-pull
1479 "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$ partial-pull
1487 "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$ partial-pull
1480 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
1488 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
1481 $ cat errors.log
1489 $ cat errors.log
1482
1490
1483 $ cd ..
1491 $ cd ..
1484
1492
1485
1493
1486 Issue 4438 - test coverage for 3ef893520a85 issues.
1494 Issue 4438 - test coverage for 3ef893520a85 issues.
1487
1495
1488 $ mkdir issue4438
1496 $ mkdir issue4438
1489 $ cd issue4438
1497 $ cd issue4438
1490 #if false
1498 #if false
1491 generate new bundles:
1499 generate new bundles:
1492 $ hg init r1
1500 $ hg init r1
1493 $ 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
1501 $ 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
1494 $ hg clone -q r1 r2
1502 $ hg clone -q r1 r2
1495 $ 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
1503 $ 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
1496 $ hg -R r2 branch -q r2change && hg -R r2 ci -qmr2change
1504 $ hg -R r2 branch -q r2change && hg -R r2 ci -qmr2change
1497 $ hg -R r1 bundle -qa $TESTDIR/bundles/issue4438-r1.hg
1505 $ hg -R r1 bundle -qa $TESTDIR/bundles/issue4438-r1.hg
1498 $ hg -R r2 bundle -qa $TESTDIR/bundles/issue4438-r2.hg
1506 $ hg -R r2 bundle -qa $TESTDIR/bundles/issue4438-r2.hg
1499 #else
1507 #else
1500 use existing bundles:
1508 use existing bundles:
1501 $ hg init r1
1509 $ hg init r1
1502 $ hg -R r1 -q unbundle $TESTDIR/bundles/issue4438-r1.hg
1510 $ hg -R r1 -q unbundle $TESTDIR/bundles/issue4438-r1.hg
1503 $ hg -R r1 -q up
1511 $ hg -R r1 -q up
1504 $ hg init r2
1512 $ hg init r2
1505 $ hg -R r2 -q unbundle $TESTDIR/bundles/issue4438-r2.hg
1513 $ hg -R r2 -q unbundle $TESTDIR/bundles/issue4438-r2.hg
1506 $ hg -R r2 -q up
1514 $ hg -R r2 -q up
1507 #endif
1515 #endif
1508
1516
1509 Set iteration order could cause wrong and unstable results - fixed in 73cfaa348650:
1517 Set iteration order could cause wrong and unstable results - fixed in 73cfaa348650:
1510
1518
1511 $ hg -R r1 outgoing r2 -T'{rev} '
1519 $ hg -R r1 outgoing r2 -T'{rev} '
1512 comparing with r2
1520 comparing with r2
1513 searching for changes
1521 searching for changes
1514 101 102 103 104 105 106 107 108 109 110 (no-eol)
1522 101 102 103 104 105 106 107 108 109 110 (no-eol)
1515
1523
1516 The case where all the 'initialsamplesize' samples already were common would
1524 The case where all the 'initialsamplesize' samples already were common would
1517 give 'all remote heads known locally' without checking the remaining heads -
1525 give 'all remote heads known locally' without checking the remaining heads -
1518 fixed in 86c35b7ae300:
1526 fixed in 86c35b7ae300:
1519
1527
1520 $ cat >> r1/.hg/hgrc << EOF
1528 $ cat >> r1/.hg/hgrc << EOF
1521 > [devel]
1529 > [devel]
1522 > discovery.randomize = False
1530 > discovery.randomize = False
1523 > EOF
1531 > EOF
1524
1532
1525 $ hg -R r1 outgoing r2 -T'{rev} ' --config extensions.blackbox= \
1533 $ hg -R r1 outgoing r2 -T'{rev} ' --config extensions.blackbox= \
1526 > --config blackbox.track='command commandfinish discovery'
1534 > --config blackbox.track='command commandfinish discovery'
1527 comparing with r2
1535 comparing with r2
1528 searching for changes
1536 searching for changes
1529 101 102 103 104 105 106 107 108 109 110 (no-eol)
1537 101 102 103 104 105 106 107 108 109 110 (no-eol)
1530 $ hg -R r1 --config extensions.blackbox= blackbox --config blackbox.track=
1538 $ hg -R r1 --config extensions.blackbox= blackbox --config blackbox.track=
1531 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> serve --cmdserver chgunix * (glob) (chg !)
1539 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> serve --cmdserver chgunix * (glob) (chg !)
1532 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* (glob)
1540 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* (glob)
1533 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> found 101 common and 1 unknown server heads, 1 roundtrips in *.????s (glob)
1541 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> found 101 common and 1 unknown server heads, 1 roundtrips in *.????s (glob)
1534 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* exited 0 after *.?? seconds (glob)
1542 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* exited 0 after *.?? seconds (glob)
1535 $ cd ..
1543 $ cd ..
1536
1544
1537 Even if the set of revs to discover is restricted, unrelated revs may be
1545 Even if the set of revs to discover is restricted, unrelated revs may be
1538 returned as common heads.
1546 returned as common heads.
1539
1547
1540 $ mkdir ancestorsof
1548 $ mkdir ancestorsof
1541 $ cd ancestorsof
1549 $ cd ancestorsof
1542 $ hg init a
1550 $ hg init a
1543 $ hg clone a b -q
1551 $ hg clone a b -q
1544 $ cd b
1552 $ cd b
1545 $ hg debugbuilddag '.:root *root *root'
1553 $ hg debugbuilddag '.:root *root *root'
1546 $ hg log -G -T '{node|short}'
1554 $ hg log -G -T '{node|short}'
1547 o fa942426a6fd
1555 o fa942426a6fd
1548 |
1556 |
1549 | o 66f7d451a68b
1557 | o 66f7d451a68b
1550 |/
1558 |/
1551 o 1ea73414a91b
1559 o 1ea73414a91b
1552
1560
1553 $ hg push -r 66f7d451a68b -q
1561 $ hg push -r 66f7d451a68b -q
1554 $ hg debugdiscovery --verbose --rev fa942426a6fd
1562 $ hg debugdiscovery --verbose --rev fa942426a6fd
1555 comparing with $TESTTMP/ancestorsof/a
1563 comparing with $TESTTMP/ancestorsof/a
1556 searching for changes
1564 searching for changes
1557 elapsed time: * seconds (glob)
1565 elapsed time: * seconds (glob)
1558 round-trips: 1
1566 round-trips: 1
1559 heads summary:
1567 heads summary:
1560 total common heads: 1
1568 total common heads: 1
1561 also local heads: 1
1569 also local heads: 1
1562 also remote heads: 1
1570 also remote heads: 1
1563 both: 1
1571 both: 1
1564 local heads: 2
1572 local heads: 2
1565 common: 1
1573 common: 1
1566 missing: 1
1574 missing: 1
1567 remote heads: 1
1575 remote heads: 1
1568 common: 1
1576 common: 1
1569 unknown: 0
1577 unknown: 0
1570 local changesets: 3
1578 local changesets: 3
1571 common: 2
1579 common: 2
1572 heads: 1
1580 heads: 1
1573 roots: 1
1581 roots: 1
1574 missing: 1
1582 missing: 1
1575 heads: 1
1583 heads: 1
1576 roots: 1
1584 roots: 1
1577 first undecided set: 1
1585 first undecided set: 1
1578 heads: 1
1586 heads: 1
1579 roots: 1
1587 roots: 1
1580 common: 0
1588 common: 0
1581 missing: 1
1589 missing: 1
1582 common heads: 66f7d451a68b
1590 common heads: 66f7d451a68b
General Comments 0
You need to be logged in to leave comments. Login now