##// END OF EJS Templates
discovery: new devel.discovery.randomize option...
Georges Racinet -
r42969:334c1ea5 default
parent child Browse files
Show More
@@ -1,1502 +1,1505 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 def loadconfigtable(ui, extname, configtable):
18 def loadconfigtable(ui, extname, configtable):
19 """update config item known to the ui with the extension ones"""
19 """update config item known to the ui with the extension ones"""
20 for section, items in sorted(configtable.items()):
20 for section, items in sorted(configtable.items()):
21 knownitems = ui._knownconfig.setdefault(section, itemregister())
21 knownitems = ui._knownconfig.setdefault(section, itemregister())
22 knownkeys = set(knownitems)
22 knownkeys = set(knownitems)
23 newkeys = set(items)
23 newkeys = set(items)
24 for key in sorted(knownkeys & newkeys):
24 for key in sorted(knownkeys & newkeys):
25 msg = "extension '%s' overwrite config item '%s.%s'"
25 msg = "extension '%s' overwrite config item '%s.%s'"
26 msg %= (extname, section, key)
26 msg %= (extname, section, key)
27 ui.develwarn(msg, config='warn-config')
27 ui.develwarn(msg, config='warn-config')
28
28
29 knownitems.update(items)
29 knownitems.update(items)
30
30
31 class configitem(object):
31 class configitem(object):
32 """represent a known config item
32 """represent a known config item
33
33
34 :section: the official config section where to find this item,
34 :section: the official config section where to find this item,
35 :name: the official name within the section,
35 :name: the official name within the section,
36 :default: default value for this item,
36 :default: default value for this item,
37 :alias: optional list of tuples as alternatives,
37 :alias: optional list of tuples as alternatives,
38 :generic: this is a generic definition, match name using regular expression.
38 :generic: this is a generic definition, match name using regular expression.
39 """
39 """
40
40
41 def __init__(self, section, name, default=None, alias=(),
41 def __init__(self, section, name, default=None, alias=(),
42 generic=False, priority=0):
42 generic=False, priority=0):
43 self.section = section
43 self.section = section
44 self.name = name
44 self.name = name
45 self.default = default
45 self.default = default
46 self.alias = list(alias)
46 self.alias = list(alias)
47 self.generic = generic
47 self.generic = generic
48 self.priority = priority
48 self.priority = priority
49 self._re = None
49 self._re = None
50 if generic:
50 if generic:
51 self._re = re.compile(self.name)
51 self._re = re.compile(self.name)
52
52
53 class itemregister(dict):
53 class itemregister(dict):
54 """A specialized dictionary that can handle wild-card selection"""
54 """A specialized dictionary that can handle wild-card selection"""
55
55
56 def __init__(self):
56 def __init__(self):
57 super(itemregister, self).__init__()
57 super(itemregister, self).__init__()
58 self._generics = set()
58 self._generics = set()
59
59
60 def update(self, other):
60 def update(self, other):
61 super(itemregister, self).update(other)
61 super(itemregister, self).update(other)
62 self._generics.update(other._generics)
62 self._generics.update(other._generics)
63
63
64 def __setitem__(self, key, item):
64 def __setitem__(self, key, item):
65 super(itemregister, self).__setitem__(key, item)
65 super(itemregister, self).__setitem__(key, item)
66 if item.generic:
66 if item.generic:
67 self._generics.add(item)
67 self._generics.add(item)
68
68
69 def get(self, key):
69 def get(self, key):
70 baseitem = super(itemregister, self).get(key)
70 baseitem = super(itemregister, self).get(key)
71 if baseitem is not None and not baseitem.generic:
71 if baseitem is not None and not baseitem.generic:
72 return baseitem
72 return baseitem
73
73
74 # search for a matching generic item
74 # search for a matching generic item
75 generics = sorted(self._generics, key=(lambda x: (x.priority, x.name)))
75 generics = sorted(self._generics, key=(lambda x: (x.priority, x.name)))
76 for item in generics:
76 for item in generics:
77 # we use 'match' instead of 'search' to make the matching simpler
77 # we use 'match' instead of 'search' to make the matching simpler
78 # for people unfamiliar with regular expression. Having the match
78 # for people unfamiliar with regular expression. Having the match
79 # rooted to the start of the string will produce less surprising
79 # rooted to the start of the string will produce less surprising
80 # result for user writing simple regex for sub-attribute.
80 # result for user writing simple regex for sub-attribute.
81 #
81 #
82 # For example using "color\..*" match produces an unsurprising
82 # For example using "color\..*" match produces an unsurprising
83 # result, while using search could suddenly match apparently
83 # result, while using search could suddenly match apparently
84 # unrelated configuration that happens to contains "color."
84 # unrelated configuration that happens to contains "color."
85 # anywhere. This is a tradeoff where we favor requiring ".*" on
85 # anywhere. This is a tradeoff where we favor requiring ".*" on
86 # some match to avoid the need to prefix most pattern with "^".
86 # some match to avoid the need to prefix most pattern with "^".
87 # The "^" seems more error prone.
87 # The "^" seems more error prone.
88 if item._re.match(key):
88 if item._re.match(key):
89 return item
89 return item
90
90
91 return None
91 return None
92
92
93 coreitems = {}
93 coreitems = {}
94
94
95 def _register(configtable, *args, **kwargs):
95 def _register(configtable, *args, **kwargs):
96 item = configitem(*args, **kwargs)
96 item = configitem(*args, **kwargs)
97 section = configtable.setdefault(item.section, itemregister())
97 section = configtable.setdefault(item.section, itemregister())
98 if item.name in section:
98 if item.name in section:
99 msg = "duplicated config item registration for '%s.%s'"
99 msg = "duplicated config item registration for '%s.%s'"
100 raise error.ProgrammingError(msg % (item.section, item.name))
100 raise error.ProgrammingError(msg % (item.section, item.name))
101 section[item.name] = item
101 section[item.name] = item
102
102
103 # special value for case where the default is derived from other values
103 # special value for case where the default is derived from other values
104 dynamicdefault = object()
104 dynamicdefault = object()
105
105
106 # Registering actual config items
106 # Registering actual config items
107
107
108 def getitemregister(configtable):
108 def getitemregister(configtable):
109 f = functools.partial(_register, configtable)
109 f = functools.partial(_register, configtable)
110 # export pseudo enum as configitem.*
110 # export pseudo enum as configitem.*
111 f.dynamicdefault = dynamicdefault
111 f.dynamicdefault = dynamicdefault
112 return f
112 return f
113
113
114 coreconfigitem = getitemregister(coreitems)
114 coreconfigitem = getitemregister(coreitems)
115
115
116 def _registerdiffopts(section, configprefix=''):
116 def _registerdiffopts(section, configprefix=''):
117 coreconfigitem(section, configprefix + 'nodates',
117 coreconfigitem(section, configprefix + 'nodates',
118 default=False,
118 default=False,
119 )
119 )
120 coreconfigitem(section, configprefix + 'showfunc',
120 coreconfigitem(section, configprefix + 'showfunc',
121 default=False,
121 default=False,
122 )
122 )
123 coreconfigitem(section, configprefix + 'unified',
123 coreconfigitem(section, configprefix + 'unified',
124 default=None,
124 default=None,
125 )
125 )
126 coreconfigitem(section, configprefix + 'git',
126 coreconfigitem(section, configprefix + 'git',
127 default=False,
127 default=False,
128 )
128 )
129 coreconfigitem(section, configprefix + 'ignorews',
129 coreconfigitem(section, configprefix + 'ignorews',
130 default=False,
130 default=False,
131 )
131 )
132 coreconfigitem(section, configprefix + 'ignorewsamount',
132 coreconfigitem(section, configprefix + 'ignorewsamount',
133 default=False,
133 default=False,
134 )
134 )
135 coreconfigitem(section, configprefix + 'ignoreblanklines',
135 coreconfigitem(section, configprefix + 'ignoreblanklines',
136 default=False,
136 default=False,
137 )
137 )
138 coreconfigitem(section, configprefix + 'ignorewseol',
138 coreconfigitem(section, configprefix + 'ignorewseol',
139 default=False,
139 default=False,
140 )
140 )
141 coreconfigitem(section, configprefix + 'nobinary',
141 coreconfigitem(section, configprefix + 'nobinary',
142 default=False,
142 default=False,
143 )
143 )
144 coreconfigitem(section, configprefix + 'noprefix',
144 coreconfigitem(section, configprefix + 'noprefix',
145 default=False,
145 default=False,
146 )
146 )
147 coreconfigitem(section, configprefix + 'word-diff',
147 coreconfigitem(section, configprefix + 'word-diff',
148 default=False,
148 default=False,
149 )
149 )
150
150
151 coreconfigitem('alias', '.*',
151 coreconfigitem('alias', '.*',
152 default=dynamicdefault,
152 default=dynamicdefault,
153 generic=True,
153 generic=True,
154 )
154 )
155 coreconfigitem('auth', 'cookiefile',
155 coreconfigitem('auth', 'cookiefile',
156 default=None,
156 default=None,
157 )
157 )
158 _registerdiffopts(section='annotate')
158 _registerdiffopts(section='annotate')
159 # bookmarks.pushing: internal hack for discovery
159 # bookmarks.pushing: internal hack for discovery
160 coreconfigitem('bookmarks', 'pushing',
160 coreconfigitem('bookmarks', 'pushing',
161 default=list,
161 default=list,
162 )
162 )
163 # bundle.mainreporoot: internal hack for bundlerepo
163 # bundle.mainreporoot: internal hack for bundlerepo
164 coreconfigitem('bundle', 'mainreporoot',
164 coreconfigitem('bundle', 'mainreporoot',
165 default='',
165 default='',
166 )
166 )
167 coreconfigitem('censor', 'policy',
167 coreconfigitem('censor', 'policy',
168 default='abort',
168 default='abort',
169 )
169 )
170 coreconfigitem('chgserver', 'idletimeout',
170 coreconfigitem('chgserver', 'idletimeout',
171 default=3600,
171 default=3600,
172 )
172 )
173 coreconfigitem('chgserver', 'skiphash',
173 coreconfigitem('chgserver', 'skiphash',
174 default=False,
174 default=False,
175 )
175 )
176 coreconfigitem('cmdserver', 'log',
176 coreconfigitem('cmdserver', 'log',
177 default=None,
177 default=None,
178 )
178 )
179 coreconfigitem('cmdserver', 'max-log-files',
179 coreconfigitem('cmdserver', 'max-log-files',
180 default=7,
180 default=7,
181 )
181 )
182 coreconfigitem('cmdserver', 'max-log-size',
182 coreconfigitem('cmdserver', 'max-log-size',
183 default='1 MB',
183 default='1 MB',
184 )
184 )
185 coreconfigitem('cmdserver', 'max-repo-cache',
185 coreconfigitem('cmdserver', 'max-repo-cache',
186 default=0,
186 default=0,
187 )
187 )
188 coreconfigitem('cmdserver', 'message-encodings',
188 coreconfigitem('cmdserver', 'message-encodings',
189 default=list,
189 default=list,
190 )
190 )
191 coreconfigitem('cmdserver', 'track-log',
191 coreconfigitem('cmdserver', 'track-log',
192 default=lambda: ['chgserver', 'cmdserver', 'repocache'],
192 default=lambda: ['chgserver', 'cmdserver', 'repocache'],
193 )
193 )
194 coreconfigitem('color', '.*',
194 coreconfigitem('color', '.*',
195 default=None,
195 default=None,
196 generic=True,
196 generic=True,
197 )
197 )
198 coreconfigitem('color', 'mode',
198 coreconfigitem('color', 'mode',
199 default='auto',
199 default='auto',
200 )
200 )
201 coreconfigitem('color', 'pagermode',
201 coreconfigitem('color', 'pagermode',
202 default=dynamicdefault,
202 default=dynamicdefault,
203 )
203 )
204 _registerdiffopts(section='commands', configprefix='commit.interactive.')
204 _registerdiffopts(section='commands', configprefix='commit.interactive.')
205 coreconfigitem('commands', 'commit.post-status',
205 coreconfigitem('commands', 'commit.post-status',
206 default=False,
206 default=False,
207 )
207 )
208 coreconfigitem('commands', 'grep.all-files',
208 coreconfigitem('commands', 'grep.all-files',
209 default=False,
209 default=False,
210 )
210 )
211 coreconfigitem('commands', 'resolve.confirm',
211 coreconfigitem('commands', 'resolve.confirm',
212 default=False,
212 default=False,
213 )
213 )
214 coreconfigitem('commands', 'resolve.explicit-re-merge',
214 coreconfigitem('commands', 'resolve.explicit-re-merge',
215 default=False,
215 default=False,
216 )
216 )
217 coreconfigitem('commands', 'resolve.mark-check',
217 coreconfigitem('commands', 'resolve.mark-check',
218 default='none',
218 default='none',
219 )
219 )
220 _registerdiffopts(section='commands', configprefix='revert.interactive.')
220 _registerdiffopts(section='commands', configprefix='revert.interactive.')
221 coreconfigitem('commands', 'show.aliasprefix',
221 coreconfigitem('commands', 'show.aliasprefix',
222 default=list,
222 default=list,
223 )
223 )
224 coreconfigitem('commands', 'status.relative',
224 coreconfigitem('commands', 'status.relative',
225 default=False,
225 default=False,
226 )
226 )
227 coreconfigitem('commands', 'status.skipstates',
227 coreconfigitem('commands', 'status.skipstates',
228 default=[],
228 default=[],
229 )
229 )
230 coreconfigitem('commands', 'status.terse',
230 coreconfigitem('commands', 'status.terse',
231 default='',
231 default='',
232 )
232 )
233 coreconfigitem('commands', 'status.verbose',
233 coreconfigitem('commands', 'status.verbose',
234 default=False,
234 default=False,
235 )
235 )
236 coreconfigitem('commands', 'update.check',
236 coreconfigitem('commands', 'update.check',
237 default=None,
237 default=None,
238 )
238 )
239 coreconfigitem('commands', 'update.requiredest',
239 coreconfigitem('commands', 'update.requiredest',
240 default=False,
240 default=False,
241 )
241 )
242 coreconfigitem('committemplate', '.*',
242 coreconfigitem('committemplate', '.*',
243 default=None,
243 default=None,
244 generic=True,
244 generic=True,
245 )
245 )
246 coreconfigitem('convert', 'bzr.saverev',
246 coreconfigitem('convert', 'bzr.saverev',
247 default=True,
247 default=True,
248 )
248 )
249 coreconfigitem('convert', 'cvsps.cache',
249 coreconfigitem('convert', 'cvsps.cache',
250 default=True,
250 default=True,
251 )
251 )
252 coreconfigitem('convert', 'cvsps.fuzz',
252 coreconfigitem('convert', 'cvsps.fuzz',
253 default=60,
253 default=60,
254 )
254 )
255 coreconfigitem('convert', 'cvsps.logencoding',
255 coreconfigitem('convert', 'cvsps.logencoding',
256 default=None,
256 default=None,
257 )
257 )
258 coreconfigitem('convert', 'cvsps.mergefrom',
258 coreconfigitem('convert', 'cvsps.mergefrom',
259 default=None,
259 default=None,
260 )
260 )
261 coreconfigitem('convert', 'cvsps.mergeto',
261 coreconfigitem('convert', 'cvsps.mergeto',
262 default=None,
262 default=None,
263 )
263 )
264 coreconfigitem('convert', 'git.committeractions',
264 coreconfigitem('convert', 'git.committeractions',
265 default=lambda: ['messagedifferent'],
265 default=lambda: ['messagedifferent'],
266 )
266 )
267 coreconfigitem('convert', 'git.extrakeys',
267 coreconfigitem('convert', 'git.extrakeys',
268 default=list,
268 default=list,
269 )
269 )
270 coreconfigitem('convert', 'git.findcopiesharder',
270 coreconfigitem('convert', 'git.findcopiesharder',
271 default=False,
271 default=False,
272 )
272 )
273 coreconfigitem('convert', 'git.remoteprefix',
273 coreconfigitem('convert', 'git.remoteprefix',
274 default='remote',
274 default='remote',
275 )
275 )
276 coreconfigitem('convert', 'git.renamelimit',
276 coreconfigitem('convert', 'git.renamelimit',
277 default=400,
277 default=400,
278 )
278 )
279 coreconfigitem('convert', 'git.saverev',
279 coreconfigitem('convert', 'git.saverev',
280 default=True,
280 default=True,
281 )
281 )
282 coreconfigitem('convert', 'git.similarity',
282 coreconfigitem('convert', 'git.similarity',
283 default=50,
283 default=50,
284 )
284 )
285 coreconfigitem('convert', 'git.skipsubmodules',
285 coreconfigitem('convert', 'git.skipsubmodules',
286 default=False,
286 default=False,
287 )
287 )
288 coreconfigitem('convert', 'hg.clonebranches',
288 coreconfigitem('convert', 'hg.clonebranches',
289 default=False,
289 default=False,
290 )
290 )
291 coreconfigitem('convert', 'hg.ignoreerrors',
291 coreconfigitem('convert', 'hg.ignoreerrors',
292 default=False,
292 default=False,
293 )
293 )
294 coreconfigitem('convert', 'hg.preserve-hash',
294 coreconfigitem('convert', 'hg.preserve-hash',
295 default=False,
295 default=False,
296 )
296 )
297 coreconfigitem('convert', 'hg.revs',
297 coreconfigitem('convert', 'hg.revs',
298 default=None,
298 default=None,
299 )
299 )
300 coreconfigitem('convert', 'hg.saverev',
300 coreconfigitem('convert', 'hg.saverev',
301 default=False,
301 default=False,
302 )
302 )
303 coreconfigitem('convert', 'hg.sourcename',
303 coreconfigitem('convert', 'hg.sourcename',
304 default=None,
304 default=None,
305 )
305 )
306 coreconfigitem('convert', 'hg.startrev',
306 coreconfigitem('convert', 'hg.startrev',
307 default=None,
307 default=None,
308 )
308 )
309 coreconfigitem('convert', 'hg.tagsbranch',
309 coreconfigitem('convert', 'hg.tagsbranch',
310 default='default',
310 default='default',
311 )
311 )
312 coreconfigitem('convert', 'hg.usebranchnames',
312 coreconfigitem('convert', 'hg.usebranchnames',
313 default=True,
313 default=True,
314 )
314 )
315 coreconfigitem('convert', 'ignoreancestorcheck',
315 coreconfigitem('convert', 'ignoreancestorcheck',
316 default=False,
316 default=False,
317 )
317 )
318 coreconfigitem('convert', 'localtimezone',
318 coreconfigitem('convert', 'localtimezone',
319 default=False,
319 default=False,
320 )
320 )
321 coreconfigitem('convert', 'p4.encoding',
321 coreconfigitem('convert', 'p4.encoding',
322 default=dynamicdefault,
322 default=dynamicdefault,
323 )
323 )
324 coreconfigitem('convert', 'p4.startrev',
324 coreconfigitem('convert', 'p4.startrev',
325 default=0,
325 default=0,
326 )
326 )
327 coreconfigitem('convert', 'skiptags',
327 coreconfigitem('convert', 'skiptags',
328 default=False,
328 default=False,
329 )
329 )
330 coreconfigitem('convert', 'svn.debugsvnlog',
330 coreconfigitem('convert', 'svn.debugsvnlog',
331 default=True,
331 default=True,
332 )
332 )
333 coreconfigitem('convert', 'svn.trunk',
333 coreconfigitem('convert', 'svn.trunk',
334 default=None,
334 default=None,
335 )
335 )
336 coreconfigitem('convert', 'svn.tags',
336 coreconfigitem('convert', 'svn.tags',
337 default=None,
337 default=None,
338 )
338 )
339 coreconfigitem('convert', 'svn.branches',
339 coreconfigitem('convert', 'svn.branches',
340 default=None,
340 default=None,
341 )
341 )
342 coreconfigitem('convert', 'svn.startrev',
342 coreconfigitem('convert', 'svn.startrev',
343 default=0,
343 default=0,
344 )
344 )
345 coreconfigitem('debug', 'dirstate.delaywrite',
345 coreconfigitem('debug', 'dirstate.delaywrite',
346 default=0,
346 default=0,
347 )
347 )
348 coreconfigitem('defaults', '.*',
348 coreconfigitem('defaults', '.*',
349 default=None,
349 default=None,
350 generic=True,
350 generic=True,
351 )
351 )
352 coreconfigitem('devel', 'all-warnings',
352 coreconfigitem('devel', 'all-warnings',
353 default=False,
353 default=False,
354 )
354 )
355 coreconfigitem('devel', 'bundle2.debug',
355 coreconfigitem('devel', 'bundle2.debug',
356 default=False,
356 default=False,
357 )
357 )
358 coreconfigitem('devel', 'bundle.delta',
358 coreconfigitem('devel', 'bundle.delta',
359 default='',
359 default='',
360 )
360 )
361 coreconfigitem('devel', 'cache-vfs',
361 coreconfigitem('devel', 'cache-vfs',
362 default=None,
362 default=None,
363 )
363 )
364 coreconfigitem('devel', 'check-locks',
364 coreconfigitem('devel', 'check-locks',
365 default=False,
365 default=False,
366 )
366 )
367 coreconfigitem('devel', 'check-relroot',
367 coreconfigitem('devel', 'check-relroot',
368 default=False,
368 default=False,
369 )
369 )
370 coreconfigitem('devel', 'default-date',
370 coreconfigitem('devel', 'default-date',
371 default=None,
371 default=None,
372 )
372 )
373 coreconfigitem('devel', 'deprec-warn',
373 coreconfigitem('devel', 'deprec-warn',
374 default=False,
374 default=False,
375 )
375 )
376 coreconfigitem('devel', 'disableloaddefaultcerts',
376 coreconfigitem('devel', 'disableloaddefaultcerts',
377 default=False,
377 default=False,
378 )
378 )
379 coreconfigitem('devel', 'warn-empty-changegroup',
379 coreconfigitem('devel', 'warn-empty-changegroup',
380 default=False,
380 default=False,
381 )
381 )
382 coreconfigitem('devel', 'legacy.exchange',
382 coreconfigitem('devel', 'legacy.exchange',
383 default=list,
383 default=list,
384 )
384 )
385 coreconfigitem('devel', 'servercafile',
385 coreconfigitem('devel', 'servercafile',
386 default='',
386 default='',
387 )
387 )
388 coreconfigitem('devel', 'serverexactprotocol',
388 coreconfigitem('devel', 'serverexactprotocol',
389 default='',
389 default='',
390 )
390 )
391 coreconfigitem('devel', 'serverrequirecert',
391 coreconfigitem('devel', 'serverrequirecert',
392 default=False,
392 default=False,
393 )
393 )
394 coreconfigitem('devel', 'strip-obsmarkers',
394 coreconfigitem('devel', 'strip-obsmarkers',
395 default=True,
395 default=True,
396 )
396 )
397 coreconfigitem('devel', 'warn-config',
397 coreconfigitem('devel', 'warn-config',
398 default=None,
398 default=None,
399 )
399 )
400 coreconfigitem('devel', 'warn-config-default',
400 coreconfigitem('devel', 'warn-config-default',
401 default=None,
401 default=None,
402 )
402 )
403 coreconfigitem('devel', 'user.obsmarker',
403 coreconfigitem('devel', 'user.obsmarker',
404 default=None,
404 default=None,
405 )
405 )
406 coreconfigitem('devel', 'warn-config-unknown',
406 coreconfigitem('devel', 'warn-config-unknown',
407 default=None,
407 default=None,
408 )
408 )
409 coreconfigitem('devel', 'debug.copies',
409 coreconfigitem('devel', 'debug.copies',
410 default=False,
410 default=False,
411 )
411 )
412 coreconfigitem('devel', 'debug.extensions',
412 coreconfigitem('devel', 'debug.extensions',
413 default=False,
413 default=False,
414 )
414 )
415 coreconfigitem('devel', 'debug.peer-request',
415 coreconfigitem('devel', 'debug.peer-request',
416 default=False,
416 default=False,
417 )
417 )
418 coreconfigitem('devel', 'discovery.randomize',
419 default=True,
420 )
418 _registerdiffopts(section='diff')
421 _registerdiffopts(section='diff')
419 coreconfigitem('email', 'bcc',
422 coreconfigitem('email', 'bcc',
420 default=None,
423 default=None,
421 )
424 )
422 coreconfigitem('email', 'cc',
425 coreconfigitem('email', 'cc',
423 default=None,
426 default=None,
424 )
427 )
425 coreconfigitem('email', 'charsets',
428 coreconfigitem('email', 'charsets',
426 default=list,
429 default=list,
427 )
430 )
428 coreconfigitem('email', 'from',
431 coreconfigitem('email', 'from',
429 default=None,
432 default=None,
430 )
433 )
431 coreconfigitem('email', 'method',
434 coreconfigitem('email', 'method',
432 default='smtp',
435 default='smtp',
433 )
436 )
434 coreconfigitem('email', 'reply-to',
437 coreconfigitem('email', 'reply-to',
435 default=None,
438 default=None,
436 )
439 )
437 coreconfigitem('email', 'to',
440 coreconfigitem('email', 'to',
438 default=None,
441 default=None,
439 )
442 )
440 coreconfigitem('experimental', 'archivemetatemplate',
443 coreconfigitem('experimental', 'archivemetatemplate',
441 default=dynamicdefault,
444 default=dynamicdefault,
442 )
445 )
443 coreconfigitem('experimental', 'auto-publish',
446 coreconfigitem('experimental', 'auto-publish',
444 default='publish',
447 default='publish',
445 )
448 )
446 coreconfigitem('experimental', 'bundle-phases',
449 coreconfigitem('experimental', 'bundle-phases',
447 default=False,
450 default=False,
448 )
451 )
449 coreconfigitem('experimental', 'bundle2-advertise',
452 coreconfigitem('experimental', 'bundle2-advertise',
450 default=True,
453 default=True,
451 )
454 )
452 coreconfigitem('experimental', 'bundle2-output-capture',
455 coreconfigitem('experimental', 'bundle2-output-capture',
453 default=False,
456 default=False,
454 )
457 )
455 coreconfigitem('experimental', 'bundle2.pushback',
458 coreconfigitem('experimental', 'bundle2.pushback',
456 default=False,
459 default=False,
457 )
460 )
458 coreconfigitem('experimental', 'bundle2lazylocking',
461 coreconfigitem('experimental', 'bundle2lazylocking',
459 default=False,
462 default=False,
460 )
463 )
461 coreconfigitem('experimental', 'bundlecomplevel',
464 coreconfigitem('experimental', 'bundlecomplevel',
462 default=None,
465 default=None,
463 )
466 )
464 coreconfigitem('experimental', 'bundlecomplevel.bzip2',
467 coreconfigitem('experimental', 'bundlecomplevel.bzip2',
465 default=None,
468 default=None,
466 )
469 )
467 coreconfigitem('experimental', 'bundlecomplevel.gzip',
470 coreconfigitem('experimental', 'bundlecomplevel.gzip',
468 default=None,
471 default=None,
469 )
472 )
470 coreconfigitem('experimental', 'bundlecomplevel.none',
473 coreconfigitem('experimental', 'bundlecomplevel.none',
471 default=None,
474 default=None,
472 )
475 )
473 coreconfigitem('experimental', 'bundlecomplevel.zstd',
476 coreconfigitem('experimental', 'bundlecomplevel.zstd',
474 default=None,
477 default=None,
475 )
478 )
476 coreconfigitem('experimental', 'changegroup3',
479 coreconfigitem('experimental', 'changegroup3',
477 default=False,
480 default=False,
478 )
481 )
479 coreconfigitem('experimental', 'cleanup-as-archived',
482 coreconfigitem('experimental', 'cleanup-as-archived',
480 default=False,
483 default=False,
481 )
484 )
482 coreconfigitem('experimental', 'clientcompressionengines',
485 coreconfigitem('experimental', 'clientcompressionengines',
483 default=list,
486 default=list,
484 )
487 )
485 coreconfigitem('experimental', 'copytrace',
488 coreconfigitem('experimental', 'copytrace',
486 default='on',
489 default='on',
487 )
490 )
488 coreconfigitem('experimental', 'copytrace.movecandidateslimit',
491 coreconfigitem('experimental', 'copytrace.movecandidateslimit',
489 default=100,
492 default=100,
490 )
493 )
491 coreconfigitem('experimental', 'copytrace.sourcecommitlimit',
494 coreconfigitem('experimental', 'copytrace.sourcecommitlimit',
492 default=100,
495 default=100,
493 )
496 )
494 coreconfigitem('experimental', 'copies.read-from',
497 coreconfigitem('experimental', 'copies.read-from',
495 default="filelog-only",
498 default="filelog-only",
496 )
499 )
497 coreconfigitem('experimental', 'copies.write-to',
500 coreconfigitem('experimental', 'copies.write-to',
498 default='filelog-only',
501 default='filelog-only',
499 )
502 )
500 coreconfigitem('experimental', 'crecordtest',
503 coreconfigitem('experimental', 'crecordtest',
501 default=None,
504 default=None,
502 )
505 )
503 coreconfigitem('experimental', 'directaccess',
506 coreconfigitem('experimental', 'directaccess',
504 default=False,
507 default=False,
505 )
508 )
506 coreconfigitem('experimental', 'directaccess.revnums',
509 coreconfigitem('experimental', 'directaccess.revnums',
507 default=False,
510 default=False,
508 )
511 )
509 coreconfigitem('experimental', 'editortmpinhg',
512 coreconfigitem('experimental', 'editortmpinhg',
510 default=False,
513 default=False,
511 )
514 )
512 coreconfigitem('experimental', 'evolution',
515 coreconfigitem('experimental', 'evolution',
513 default=list,
516 default=list,
514 )
517 )
515 coreconfigitem('experimental', 'evolution.allowdivergence',
518 coreconfigitem('experimental', 'evolution.allowdivergence',
516 default=False,
519 default=False,
517 alias=[('experimental', 'allowdivergence')]
520 alias=[('experimental', 'allowdivergence')]
518 )
521 )
519 coreconfigitem('experimental', 'evolution.allowunstable',
522 coreconfigitem('experimental', 'evolution.allowunstable',
520 default=None,
523 default=None,
521 )
524 )
522 coreconfigitem('experimental', 'evolution.createmarkers',
525 coreconfigitem('experimental', 'evolution.createmarkers',
523 default=None,
526 default=None,
524 )
527 )
525 coreconfigitem('experimental', 'evolution.effect-flags',
528 coreconfigitem('experimental', 'evolution.effect-flags',
526 default=True,
529 default=True,
527 alias=[('experimental', 'effect-flags')]
530 alias=[('experimental', 'effect-flags')]
528 )
531 )
529 coreconfigitem('experimental', 'evolution.exchange',
532 coreconfigitem('experimental', 'evolution.exchange',
530 default=None,
533 default=None,
531 )
534 )
532 coreconfigitem('experimental', 'evolution.bundle-obsmarker',
535 coreconfigitem('experimental', 'evolution.bundle-obsmarker',
533 default=False,
536 default=False,
534 )
537 )
535 coreconfigitem('experimental', 'log.topo',
538 coreconfigitem('experimental', 'log.topo',
536 default=False,
539 default=False,
537 )
540 )
538 coreconfigitem('experimental', 'evolution.report-instabilities',
541 coreconfigitem('experimental', 'evolution.report-instabilities',
539 default=True,
542 default=True,
540 )
543 )
541 coreconfigitem('experimental', 'evolution.track-operation',
544 coreconfigitem('experimental', 'evolution.track-operation',
542 default=True,
545 default=True,
543 )
546 )
544 # repo-level config to exclude a revset visibility
547 # repo-level config to exclude a revset visibility
545 #
548 #
546 # The target use case is to use `share` to expose different subset of the same
549 # The target use case is to use `share` to expose different subset of the same
547 # repository, especially server side. See also `server.view`.
550 # repository, especially server side. See also `server.view`.
548 coreconfigitem('experimental', 'extra-filter-revs',
551 coreconfigitem('experimental', 'extra-filter-revs',
549 default=None,
552 default=None,
550 )
553 )
551 coreconfigitem('experimental', 'maxdeltachainspan',
554 coreconfigitem('experimental', 'maxdeltachainspan',
552 default=-1,
555 default=-1,
553 )
556 )
554 coreconfigitem('experimental', 'mergetempdirprefix',
557 coreconfigitem('experimental', 'mergetempdirprefix',
555 default=None,
558 default=None,
556 )
559 )
557 coreconfigitem('experimental', 'mmapindexthreshold',
560 coreconfigitem('experimental', 'mmapindexthreshold',
558 default=None,
561 default=None,
559 )
562 )
560 coreconfigitem('experimental', 'narrow',
563 coreconfigitem('experimental', 'narrow',
561 default=False,
564 default=False,
562 )
565 )
563 coreconfigitem('experimental', 'nonnormalparanoidcheck',
566 coreconfigitem('experimental', 'nonnormalparanoidcheck',
564 default=False,
567 default=False,
565 )
568 )
566 coreconfigitem('experimental', 'exportableenviron',
569 coreconfigitem('experimental', 'exportableenviron',
567 default=list,
570 default=list,
568 )
571 )
569 coreconfigitem('experimental', 'extendedheader.index',
572 coreconfigitem('experimental', 'extendedheader.index',
570 default=None,
573 default=None,
571 )
574 )
572 coreconfigitem('experimental', 'extendedheader.similarity',
575 coreconfigitem('experimental', 'extendedheader.similarity',
573 default=False,
576 default=False,
574 )
577 )
575 coreconfigitem('experimental', 'graphshorten',
578 coreconfigitem('experimental', 'graphshorten',
576 default=False,
579 default=False,
577 )
580 )
578 coreconfigitem('experimental', 'graphstyle.parent',
581 coreconfigitem('experimental', 'graphstyle.parent',
579 default=dynamicdefault,
582 default=dynamicdefault,
580 )
583 )
581 coreconfigitem('experimental', 'graphstyle.missing',
584 coreconfigitem('experimental', 'graphstyle.missing',
582 default=dynamicdefault,
585 default=dynamicdefault,
583 )
586 )
584 coreconfigitem('experimental', 'graphstyle.grandparent',
587 coreconfigitem('experimental', 'graphstyle.grandparent',
585 default=dynamicdefault,
588 default=dynamicdefault,
586 )
589 )
587 coreconfigitem('experimental', 'hook-track-tags',
590 coreconfigitem('experimental', 'hook-track-tags',
588 default=False,
591 default=False,
589 )
592 )
590 coreconfigitem('experimental', 'httppeer.advertise-v2',
593 coreconfigitem('experimental', 'httppeer.advertise-v2',
591 default=False,
594 default=False,
592 )
595 )
593 coreconfigitem('experimental', 'httppeer.v2-encoder-order',
596 coreconfigitem('experimental', 'httppeer.v2-encoder-order',
594 default=None,
597 default=None,
595 )
598 )
596 coreconfigitem('experimental', 'httppostargs',
599 coreconfigitem('experimental', 'httppostargs',
597 default=False,
600 default=False,
598 )
601 )
599 coreconfigitem('experimental', 'mergedriver',
602 coreconfigitem('experimental', 'mergedriver',
600 default=None,
603 default=None,
601 )
604 )
602 coreconfigitem('experimental', 'nointerrupt', default=False)
605 coreconfigitem('experimental', 'nointerrupt', default=False)
603 coreconfigitem('experimental', 'nointerrupt-interactiveonly', default=True)
606 coreconfigitem('experimental', 'nointerrupt-interactiveonly', default=True)
604
607
605 coreconfigitem('experimental', 'obsmarkers-exchange-debug',
608 coreconfigitem('experimental', 'obsmarkers-exchange-debug',
606 default=False,
609 default=False,
607 )
610 )
608 coreconfigitem('experimental', 'remotenames',
611 coreconfigitem('experimental', 'remotenames',
609 default=False,
612 default=False,
610 )
613 )
611 coreconfigitem('experimental', 'removeemptydirs',
614 coreconfigitem('experimental', 'removeemptydirs',
612 default=True,
615 default=True,
613 )
616 )
614 coreconfigitem('experimental', 'revert.interactive.select-to-keep',
617 coreconfigitem('experimental', 'revert.interactive.select-to-keep',
615 default=False,
618 default=False,
616 )
619 )
617 coreconfigitem('experimental', 'revisions.prefixhexnode',
620 coreconfigitem('experimental', 'revisions.prefixhexnode',
618 default=False,
621 default=False,
619 )
622 )
620 coreconfigitem('experimental', 'revlogv2',
623 coreconfigitem('experimental', 'revlogv2',
621 default=None,
624 default=None,
622 )
625 )
623 coreconfigitem('experimental', 'revisions.disambiguatewithin',
626 coreconfigitem('experimental', 'revisions.disambiguatewithin',
624 default=None,
627 default=None,
625 )
628 )
626 coreconfigitem('experimental', 'server.filesdata.recommended-batch-size',
629 coreconfigitem('experimental', 'server.filesdata.recommended-batch-size',
627 default=50000,
630 default=50000,
628 )
631 )
629 coreconfigitem('experimental', 'server.manifestdata.recommended-batch-size',
632 coreconfigitem('experimental', 'server.manifestdata.recommended-batch-size',
630 default=100000,
633 default=100000,
631 )
634 )
632 coreconfigitem('experimental', 'server.stream-narrow-clones',
635 coreconfigitem('experimental', 'server.stream-narrow-clones',
633 default=False,
636 default=False,
634 )
637 )
635 coreconfigitem('experimental', 'single-head-per-branch',
638 coreconfigitem('experimental', 'single-head-per-branch',
636 default=False,
639 default=False,
637 )
640 )
638 coreconfigitem('experimental', 'sshserver.support-v2',
641 coreconfigitem('experimental', 'sshserver.support-v2',
639 default=False,
642 default=False,
640 )
643 )
641 coreconfigitem('experimental', 'sparse-read',
644 coreconfigitem('experimental', 'sparse-read',
642 default=False,
645 default=False,
643 )
646 )
644 coreconfigitem('experimental', 'sparse-read.density-threshold',
647 coreconfigitem('experimental', 'sparse-read.density-threshold',
645 default=0.50,
648 default=0.50,
646 )
649 )
647 coreconfigitem('experimental', 'sparse-read.min-gap-size',
650 coreconfigitem('experimental', 'sparse-read.min-gap-size',
648 default='65K',
651 default='65K',
649 )
652 )
650 coreconfigitem('experimental', 'treemanifest',
653 coreconfigitem('experimental', 'treemanifest',
651 default=False,
654 default=False,
652 )
655 )
653 coreconfigitem('experimental', 'update.atomic-file',
656 coreconfigitem('experimental', 'update.atomic-file',
654 default=False,
657 default=False,
655 )
658 )
656 coreconfigitem('experimental', 'sshpeer.advertise-v2',
659 coreconfigitem('experimental', 'sshpeer.advertise-v2',
657 default=False,
660 default=False,
658 )
661 )
659 coreconfigitem('experimental', 'web.apiserver',
662 coreconfigitem('experimental', 'web.apiserver',
660 default=False,
663 default=False,
661 )
664 )
662 coreconfigitem('experimental', 'web.api.http-v2',
665 coreconfigitem('experimental', 'web.api.http-v2',
663 default=False,
666 default=False,
664 )
667 )
665 coreconfigitem('experimental', 'web.api.debugreflect',
668 coreconfigitem('experimental', 'web.api.debugreflect',
666 default=False,
669 default=False,
667 )
670 )
668 coreconfigitem('experimental', 'worker.wdir-get-thread-safe',
671 coreconfigitem('experimental', 'worker.wdir-get-thread-safe',
669 default=False,
672 default=False,
670 )
673 )
671 coreconfigitem('experimental', 'xdiff',
674 coreconfigitem('experimental', 'xdiff',
672 default=False,
675 default=False,
673 )
676 )
674 coreconfigitem('extensions', '.*',
677 coreconfigitem('extensions', '.*',
675 default=None,
678 default=None,
676 generic=True,
679 generic=True,
677 )
680 )
678 coreconfigitem('extdata', '.*',
681 coreconfigitem('extdata', '.*',
679 default=None,
682 default=None,
680 generic=True,
683 generic=True,
681 )
684 )
682 coreconfigitem('format', 'bookmarks-in-store',
685 coreconfigitem('format', 'bookmarks-in-store',
683 default=False,
686 default=False,
684 )
687 )
685 coreconfigitem('format', 'chunkcachesize',
688 coreconfigitem('format', 'chunkcachesize',
686 default=None,
689 default=None,
687 )
690 )
688 coreconfigitem('format', 'dotencode',
691 coreconfigitem('format', 'dotencode',
689 default=True,
692 default=True,
690 )
693 )
691 coreconfigitem('format', 'generaldelta',
694 coreconfigitem('format', 'generaldelta',
692 default=False,
695 default=False,
693 )
696 )
694 coreconfigitem('format', 'manifestcachesize',
697 coreconfigitem('format', 'manifestcachesize',
695 default=None,
698 default=None,
696 )
699 )
697 coreconfigitem('format', 'maxchainlen',
700 coreconfigitem('format', 'maxchainlen',
698 default=dynamicdefault,
701 default=dynamicdefault,
699 )
702 )
700 coreconfigitem('format', 'obsstore-version',
703 coreconfigitem('format', 'obsstore-version',
701 default=None,
704 default=None,
702 )
705 )
703 coreconfigitem('format', 'sparse-revlog',
706 coreconfigitem('format', 'sparse-revlog',
704 default=True,
707 default=True,
705 )
708 )
706 coreconfigitem('format', 'revlog-compression',
709 coreconfigitem('format', 'revlog-compression',
707 default='zlib',
710 default='zlib',
708 alias=[('experimental', 'format.compression')]
711 alias=[('experimental', 'format.compression')]
709 )
712 )
710 coreconfigitem('format', 'usefncache',
713 coreconfigitem('format', 'usefncache',
711 default=True,
714 default=True,
712 )
715 )
713 coreconfigitem('format', 'usegeneraldelta',
716 coreconfigitem('format', 'usegeneraldelta',
714 default=True,
717 default=True,
715 )
718 )
716 coreconfigitem('format', 'usestore',
719 coreconfigitem('format', 'usestore',
717 default=True,
720 default=True,
718 )
721 )
719 coreconfigitem('format', 'internal-phase',
722 coreconfigitem('format', 'internal-phase',
720 default=False,
723 default=False,
721 )
724 )
722 coreconfigitem('fsmonitor', 'warn_when_unused',
725 coreconfigitem('fsmonitor', 'warn_when_unused',
723 default=True,
726 default=True,
724 )
727 )
725 coreconfigitem('fsmonitor', 'warn_update_file_count',
728 coreconfigitem('fsmonitor', 'warn_update_file_count',
726 default=50000,
729 default=50000,
727 )
730 )
728 coreconfigitem('help', br'hidden-command\..*',
731 coreconfigitem('help', br'hidden-command\..*',
729 default=False,
732 default=False,
730 generic=True,
733 generic=True,
731 )
734 )
732 coreconfigitem('help', br'hidden-topic\..*',
735 coreconfigitem('help', br'hidden-topic\..*',
733 default=False,
736 default=False,
734 generic=True,
737 generic=True,
735 )
738 )
736 coreconfigitem('hooks', '.*',
739 coreconfigitem('hooks', '.*',
737 default=dynamicdefault,
740 default=dynamicdefault,
738 generic=True,
741 generic=True,
739 )
742 )
740 coreconfigitem('hgweb-paths', '.*',
743 coreconfigitem('hgweb-paths', '.*',
741 default=list,
744 default=list,
742 generic=True,
745 generic=True,
743 )
746 )
744 coreconfigitem('hostfingerprints', '.*',
747 coreconfigitem('hostfingerprints', '.*',
745 default=list,
748 default=list,
746 generic=True,
749 generic=True,
747 )
750 )
748 coreconfigitem('hostsecurity', 'ciphers',
751 coreconfigitem('hostsecurity', 'ciphers',
749 default=None,
752 default=None,
750 )
753 )
751 coreconfigitem('hostsecurity', 'disabletls10warning',
754 coreconfigitem('hostsecurity', 'disabletls10warning',
752 default=False,
755 default=False,
753 )
756 )
754 coreconfigitem('hostsecurity', 'minimumprotocol',
757 coreconfigitem('hostsecurity', 'minimumprotocol',
755 default=dynamicdefault,
758 default=dynamicdefault,
756 )
759 )
757 coreconfigitem('hostsecurity', '.*:minimumprotocol$',
760 coreconfigitem('hostsecurity', '.*:minimumprotocol$',
758 default=dynamicdefault,
761 default=dynamicdefault,
759 generic=True,
762 generic=True,
760 )
763 )
761 coreconfigitem('hostsecurity', '.*:ciphers$',
764 coreconfigitem('hostsecurity', '.*:ciphers$',
762 default=dynamicdefault,
765 default=dynamicdefault,
763 generic=True,
766 generic=True,
764 )
767 )
765 coreconfigitem('hostsecurity', '.*:fingerprints$',
768 coreconfigitem('hostsecurity', '.*:fingerprints$',
766 default=list,
769 default=list,
767 generic=True,
770 generic=True,
768 )
771 )
769 coreconfigitem('hostsecurity', '.*:verifycertsfile$',
772 coreconfigitem('hostsecurity', '.*:verifycertsfile$',
770 default=None,
773 default=None,
771 generic=True,
774 generic=True,
772 )
775 )
773
776
774 coreconfigitem('http_proxy', 'always',
777 coreconfigitem('http_proxy', 'always',
775 default=False,
778 default=False,
776 )
779 )
777 coreconfigitem('http_proxy', 'host',
780 coreconfigitem('http_proxy', 'host',
778 default=None,
781 default=None,
779 )
782 )
780 coreconfigitem('http_proxy', 'no',
783 coreconfigitem('http_proxy', 'no',
781 default=list,
784 default=list,
782 )
785 )
783 coreconfigitem('http_proxy', 'passwd',
786 coreconfigitem('http_proxy', 'passwd',
784 default=None,
787 default=None,
785 )
788 )
786 coreconfigitem('http_proxy', 'user',
789 coreconfigitem('http_proxy', 'user',
787 default=None,
790 default=None,
788 )
791 )
789
792
790 coreconfigitem('http', 'timeout',
793 coreconfigitem('http', 'timeout',
791 default=None,
794 default=None,
792 )
795 )
793
796
794 coreconfigitem('logtoprocess', 'commandexception',
797 coreconfigitem('logtoprocess', 'commandexception',
795 default=None,
798 default=None,
796 )
799 )
797 coreconfigitem('logtoprocess', 'commandfinish',
800 coreconfigitem('logtoprocess', 'commandfinish',
798 default=None,
801 default=None,
799 )
802 )
800 coreconfigitem('logtoprocess', 'command',
803 coreconfigitem('logtoprocess', 'command',
801 default=None,
804 default=None,
802 )
805 )
803 coreconfigitem('logtoprocess', 'develwarn',
806 coreconfigitem('logtoprocess', 'develwarn',
804 default=None,
807 default=None,
805 )
808 )
806 coreconfigitem('logtoprocess', 'uiblocked',
809 coreconfigitem('logtoprocess', 'uiblocked',
807 default=None,
810 default=None,
808 )
811 )
809 coreconfigitem('merge', 'checkunknown',
812 coreconfigitem('merge', 'checkunknown',
810 default='abort',
813 default='abort',
811 )
814 )
812 coreconfigitem('merge', 'checkignored',
815 coreconfigitem('merge', 'checkignored',
813 default='abort',
816 default='abort',
814 )
817 )
815 coreconfigitem('experimental', 'merge.checkpathconflicts',
818 coreconfigitem('experimental', 'merge.checkpathconflicts',
816 default=False,
819 default=False,
817 )
820 )
818 coreconfigitem('merge', 'followcopies',
821 coreconfigitem('merge', 'followcopies',
819 default=True,
822 default=True,
820 )
823 )
821 coreconfigitem('merge', 'on-failure',
824 coreconfigitem('merge', 'on-failure',
822 default='continue',
825 default='continue',
823 )
826 )
824 coreconfigitem('merge', 'preferancestor',
827 coreconfigitem('merge', 'preferancestor',
825 default=lambda: ['*'],
828 default=lambda: ['*'],
826 )
829 )
827 coreconfigitem('merge', 'strict-capability-check',
830 coreconfigitem('merge', 'strict-capability-check',
828 default=False,
831 default=False,
829 )
832 )
830 coreconfigitem('merge-tools', '.*',
833 coreconfigitem('merge-tools', '.*',
831 default=None,
834 default=None,
832 generic=True,
835 generic=True,
833 )
836 )
834 coreconfigitem('merge-tools', br'.*\.args$',
837 coreconfigitem('merge-tools', br'.*\.args$',
835 default="$local $base $other",
838 default="$local $base $other",
836 generic=True,
839 generic=True,
837 priority=-1,
840 priority=-1,
838 )
841 )
839 coreconfigitem('merge-tools', br'.*\.binary$',
842 coreconfigitem('merge-tools', br'.*\.binary$',
840 default=False,
843 default=False,
841 generic=True,
844 generic=True,
842 priority=-1,
845 priority=-1,
843 )
846 )
844 coreconfigitem('merge-tools', br'.*\.check$',
847 coreconfigitem('merge-tools', br'.*\.check$',
845 default=list,
848 default=list,
846 generic=True,
849 generic=True,
847 priority=-1,
850 priority=-1,
848 )
851 )
849 coreconfigitem('merge-tools', br'.*\.checkchanged$',
852 coreconfigitem('merge-tools', br'.*\.checkchanged$',
850 default=False,
853 default=False,
851 generic=True,
854 generic=True,
852 priority=-1,
855 priority=-1,
853 )
856 )
854 coreconfigitem('merge-tools', br'.*\.executable$',
857 coreconfigitem('merge-tools', br'.*\.executable$',
855 default=dynamicdefault,
858 default=dynamicdefault,
856 generic=True,
859 generic=True,
857 priority=-1,
860 priority=-1,
858 )
861 )
859 coreconfigitem('merge-tools', br'.*\.fixeol$',
862 coreconfigitem('merge-tools', br'.*\.fixeol$',
860 default=False,
863 default=False,
861 generic=True,
864 generic=True,
862 priority=-1,
865 priority=-1,
863 )
866 )
864 coreconfigitem('merge-tools', br'.*\.gui$',
867 coreconfigitem('merge-tools', br'.*\.gui$',
865 default=False,
868 default=False,
866 generic=True,
869 generic=True,
867 priority=-1,
870 priority=-1,
868 )
871 )
869 coreconfigitem('merge-tools', br'.*\.mergemarkers$',
872 coreconfigitem('merge-tools', br'.*\.mergemarkers$',
870 default='basic',
873 default='basic',
871 generic=True,
874 generic=True,
872 priority=-1,
875 priority=-1,
873 )
876 )
874 coreconfigitem('merge-tools', br'.*\.mergemarkertemplate$',
877 coreconfigitem('merge-tools', br'.*\.mergemarkertemplate$',
875 default=dynamicdefault, # take from ui.mergemarkertemplate
878 default=dynamicdefault, # take from ui.mergemarkertemplate
876 generic=True,
879 generic=True,
877 priority=-1,
880 priority=-1,
878 )
881 )
879 coreconfigitem('merge-tools', br'.*\.priority$',
882 coreconfigitem('merge-tools', br'.*\.priority$',
880 default=0,
883 default=0,
881 generic=True,
884 generic=True,
882 priority=-1,
885 priority=-1,
883 )
886 )
884 coreconfigitem('merge-tools', br'.*\.premerge$',
887 coreconfigitem('merge-tools', br'.*\.premerge$',
885 default=dynamicdefault,
888 default=dynamicdefault,
886 generic=True,
889 generic=True,
887 priority=-1,
890 priority=-1,
888 )
891 )
889 coreconfigitem('merge-tools', br'.*\.symlink$',
892 coreconfigitem('merge-tools', br'.*\.symlink$',
890 default=False,
893 default=False,
891 generic=True,
894 generic=True,
892 priority=-1,
895 priority=-1,
893 )
896 )
894 coreconfigitem('pager', 'attend-.*',
897 coreconfigitem('pager', 'attend-.*',
895 default=dynamicdefault,
898 default=dynamicdefault,
896 generic=True,
899 generic=True,
897 )
900 )
898 coreconfigitem('pager', 'ignore',
901 coreconfigitem('pager', 'ignore',
899 default=list,
902 default=list,
900 )
903 )
901 coreconfigitem('pager', 'pager',
904 coreconfigitem('pager', 'pager',
902 default=dynamicdefault,
905 default=dynamicdefault,
903 )
906 )
904 coreconfigitem('patch', 'eol',
907 coreconfigitem('patch', 'eol',
905 default='strict',
908 default='strict',
906 )
909 )
907 coreconfigitem('patch', 'fuzz',
910 coreconfigitem('patch', 'fuzz',
908 default=2,
911 default=2,
909 )
912 )
910 coreconfigitem('paths', 'default',
913 coreconfigitem('paths', 'default',
911 default=None,
914 default=None,
912 )
915 )
913 coreconfigitem('paths', 'default-push',
916 coreconfigitem('paths', 'default-push',
914 default=None,
917 default=None,
915 )
918 )
916 coreconfigitem('paths', '.*',
919 coreconfigitem('paths', '.*',
917 default=None,
920 default=None,
918 generic=True,
921 generic=True,
919 )
922 )
920 coreconfigitem('phases', 'checksubrepos',
923 coreconfigitem('phases', 'checksubrepos',
921 default='follow',
924 default='follow',
922 )
925 )
923 coreconfigitem('phases', 'new-commit',
926 coreconfigitem('phases', 'new-commit',
924 default='draft',
927 default='draft',
925 )
928 )
926 coreconfigitem('phases', 'publish',
929 coreconfigitem('phases', 'publish',
927 default=True,
930 default=True,
928 )
931 )
929 coreconfigitem('profiling', 'enabled',
932 coreconfigitem('profiling', 'enabled',
930 default=False,
933 default=False,
931 )
934 )
932 coreconfigitem('profiling', 'format',
935 coreconfigitem('profiling', 'format',
933 default='text',
936 default='text',
934 )
937 )
935 coreconfigitem('profiling', 'freq',
938 coreconfigitem('profiling', 'freq',
936 default=1000,
939 default=1000,
937 )
940 )
938 coreconfigitem('profiling', 'limit',
941 coreconfigitem('profiling', 'limit',
939 default=30,
942 default=30,
940 )
943 )
941 coreconfigitem('profiling', 'nested',
944 coreconfigitem('profiling', 'nested',
942 default=0,
945 default=0,
943 )
946 )
944 coreconfigitem('profiling', 'output',
947 coreconfigitem('profiling', 'output',
945 default=None,
948 default=None,
946 )
949 )
947 coreconfigitem('profiling', 'showmax',
950 coreconfigitem('profiling', 'showmax',
948 default=0.999,
951 default=0.999,
949 )
952 )
950 coreconfigitem('profiling', 'showmin',
953 coreconfigitem('profiling', 'showmin',
951 default=dynamicdefault,
954 default=dynamicdefault,
952 )
955 )
953 coreconfigitem('profiling', 'showtime',
956 coreconfigitem('profiling', 'showtime',
954 default=True,
957 default=True,
955 )
958 )
956 coreconfigitem('profiling', 'sort',
959 coreconfigitem('profiling', 'sort',
957 default='inlinetime',
960 default='inlinetime',
958 )
961 )
959 coreconfigitem('profiling', 'statformat',
962 coreconfigitem('profiling', 'statformat',
960 default='hotpath',
963 default='hotpath',
961 )
964 )
962 coreconfigitem('profiling', 'time-track',
965 coreconfigitem('profiling', 'time-track',
963 default=dynamicdefault,
966 default=dynamicdefault,
964 )
967 )
965 coreconfigitem('profiling', 'type',
968 coreconfigitem('profiling', 'type',
966 default='stat',
969 default='stat',
967 )
970 )
968 coreconfigitem('progress', 'assume-tty',
971 coreconfigitem('progress', 'assume-tty',
969 default=False,
972 default=False,
970 )
973 )
971 coreconfigitem('progress', 'changedelay',
974 coreconfigitem('progress', 'changedelay',
972 default=1,
975 default=1,
973 )
976 )
974 coreconfigitem('progress', 'clear-complete',
977 coreconfigitem('progress', 'clear-complete',
975 default=True,
978 default=True,
976 )
979 )
977 coreconfigitem('progress', 'debug',
980 coreconfigitem('progress', 'debug',
978 default=False,
981 default=False,
979 )
982 )
980 coreconfigitem('progress', 'delay',
983 coreconfigitem('progress', 'delay',
981 default=3,
984 default=3,
982 )
985 )
983 coreconfigitem('progress', 'disable',
986 coreconfigitem('progress', 'disable',
984 default=False,
987 default=False,
985 )
988 )
986 coreconfigitem('progress', 'estimateinterval',
989 coreconfigitem('progress', 'estimateinterval',
987 default=60.0,
990 default=60.0,
988 )
991 )
989 coreconfigitem('progress', 'format',
992 coreconfigitem('progress', 'format',
990 default=lambda: ['topic', 'bar', 'number', 'estimate'],
993 default=lambda: ['topic', 'bar', 'number', 'estimate'],
991 )
994 )
992 coreconfigitem('progress', 'refresh',
995 coreconfigitem('progress', 'refresh',
993 default=0.1,
996 default=0.1,
994 )
997 )
995 coreconfigitem('progress', 'width',
998 coreconfigitem('progress', 'width',
996 default=dynamicdefault,
999 default=dynamicdefault,
997 )
1000 )
998 coreconfigitem('push', 'pushvars.server',
1001 coreconfigitem('push', 'pushvars.server',
999 default=False,
1002 default=False,
1000 )
1003 )
1001 coreconfigitem('rewrite', 'backup-bundle',
1004 coreconfigitem('rewrite', 'backup-bundle',
1002 default=True,
1005 default=True,
1003 alias=[('ui', 'history-editing-backup')],
1006 alias=[('ui', 'history-editing-backup')],
1004 )
1007 )
1005 coreconfigitem('rewrite', 'update-timestamp',
1008 coreconfigitem('rewrite', 'update-timestamp',
1006 default=False,
1009 default=False,
1007 )
1010 )
1008 coreconfigitem('storage', 'new-repo-backend',
1011 coreconfigitem('storage', 'new-repo-backend',
1009 default='revlogv1',
1012 default='revlogv1',
1010 )
1013 )
1011 coreconfigitem('storage', 'revlog.optimize-delta-parent-choice',
1014 coreconfigitem('storage', 'revlog.optimize-delta-parent-choice',
1012 default=True,
1015 default=True,
1013 alias=[('format', 'aggressivemergedeltas')],
1016 alias=[('format', 'aggressivemergedeltas')],
1014 )
1017 )
1015 coreconfigitem('storage', 'revlog.reuse-external-delta',
1018 coreconfigitem('storage', 'revlog.reuse-external-delta',
1016 default=True,
1019 default=True,
1017 )
1020 )
1018 coreconfigitem('storage', 'revlog.reuse-external-delta-parent',
1021 coreconfigitem('storage', 'revlog.reuse-external-delta-parent',
1019 default=None,
1022 default=None,
1020 )
1023 )
1021 coreconfigitem('storage', 'revlog.zlib.level',
1024 coreconfigitem('storage', 'revlog.zlib.level',
1022 default=None,
1025 default=None,
1023 )
1026 )
1024 coreconfigitem('storage', 'revlog.zstd.level',
1027 coreconfigitem('storage', 'revlog.zstd.level',
1025 default=None,
1028 default=None,
1026 )
1029 )
1027 coreconfigitem('server', 'bookmarks-pushkey-compat',
1030 coreconfigitem('server', 'bookmarks-pushkey-compat',
1028 default=True,
1031 default=True,
1029 )
1032 )
1030 coreconfigitem('server', 'bundle1',
1033 coreconfigitem('server', 'bundle1',
1031 default=True,
1034 default=True,
1032 )
1035 )
1033 coreconfigitem('server', 'bundle1gd',
1036 coreconfigitem('server', 'bundle1gd',
1034 default=None,
1037 default=None,
1035 )
1038 )
1036 coreconfigitem('server', 'bundle1.pull',
1039 coreconfigitem('server', 'bundle1.pull',
1037 default=None,
1040 default=None,
1038 )
1041 )
1039 coreconfigitem('server', 'bundle1gd.pull',
1042 coreconfigitem('server', 'bundle1gd.pull',
1040 default=None,
1043 default=None,
1041 )
1044 )
1042 coreconfigitem('server', 'bundle1.push',
1045 coreconfigitem('server', 'bundle1.push',
1043 default=None,
1046 default=None,
1044 )
1047 )
1045 coreconfigitem('server', 'bundle1gd.push',
1048 coreconfigitem('server', 'bundle1gd.push',
1046 default=None,
1049 default=None,
1047 )
1050 )
1048 coreconfigitem('server', 'bundle2.stream',
1051 coreconfigitem('server', 'bundle2.stream',
1049 default=True,
1052 default=True,
1050 alias=[('experimental', 'bundle2.stream')]
1053 alias=[('experimental', 'bundle2.stream')]
1051 )
1054 )
1052 coreconfigitem('server', 'compressionengines',
1055 coreconfigitem('server', 'compressionengines',
1053 default=list,
1056 default=list,
1054 )
1057 )
1055 coreconfigitem('server', 'concurrent-push-mode',
1058 coreconfigitem('server', 'concurrent-push-mode',
1056 default='strict',
1059 default='strict',
1057 )
1060 )
1058 coreconfigitem('server', 'disablefullbundle',
1061 coreconfigitem('server', 'disablefullbundle',
1059 default=False,
1062 default=False,
1060 )
1063 )
1061 coreconfigitem('server', 'maxhttpheaderlen',
1064 coreconfigitem('server', 'maxhttpheaderlen',
1062 default=1024,
1065 default=1024,
1063 )
1066 )
1064 coreconfigitem('server', 'pullbundle',
1067 coreconfigitem('server', 'pullbundle',
1065 default=False,
1068 default=False,
1066 )
1069 )
1067 coreconfigitem('server', 'preferuncompressed',
1070 coreconfigitem('server', 'preferuncompressed',
1068 default=False,
1071 default=False,
1069 )
1072 )
1070 coreconfigitem('server', 'streamunbundle',
1073 coreconfigitem('server', 'streamunbundle',
1071 default=False,
1074 default=False,
1072 )
1075 )
1073 coreconfigitem('server', 'uncompressed',
1076 coreconfigitem('server', 'uncompressed',
1074 default=True,
1077 default=True,
1075 )
1078 )
1076 coreconfigitem('server', 'uncompressedallowsecret',
1079 coreconfigitem('server', 'uncompressedallowsecret',
1077 default=False,
1080 default=False,
1078 )
1081 )
1079 coreconfigitem('server', 'view',
1082 coreconfigitem('server', 'view',
1080 default='served',
1083 default='served',
1081 )
1084 )
1082 coreconfigitem('server', 'validate',
1085 coreconfigitem('server', 'validate',
1083 default=False,
1086 default=False,
1084 )
1087 )
1085 coreconfigitem('server', 'zliblevel',
1088 coreconfigitem('server', 'zliblevel',
1086 default=-1,
1089 default=-1,
1087 )
1090 )
1088 coreconfigitem('server', 'zstdlevel',
1091 coreconfigitem('server', 'zstdlevel',
1089 default=3,
1092 default=3,
1090 )
1093 )
1091 coreconfigitem('share', 'pool',
1094 coreconfigitem('share', 'pool',
1092 default=None,
1095 default=None,
1093 )
1096 )
1094 coreconfigitem('share', 'poolnaming',
1097 coreconfigitem('share', 'poolnaming',
1095 default='identity',
1098 default='identity',
1096 )
1099 )
1097 coreconfigitem('shelve','maxbackups',
1100 coreconfigitem('shelve','maxbackups',
1098 default=10,
1101 default=10,
1099 )
1102 )
1100 coreconfigitem('smtp', 'host',
1103 coreconfigitem('smtp', 'host',
1101 default=None,
1104 default=None,
1102 )
1105 )
1103 coreconfigitem('smtp', 'local_hostname',
1106 coreconfigitem('smtp', 'local_hostname',
1104 default=None,
1107 default=None,
1105 )
1108 )
1106 coreconfigitem('smtp', 'password',
1109 coreconfigitem('smtp', 'password',
1107 default=None,
1110 default=None,
1108 )
1111 )
1109 coreconfigitem('smtp', 'port',
1112 coreconfigitem('smtp', 'port',
1110 default=dynamicdefault,
1113 default=dynamicdefault,
1111 )
1114 )
1112 coreconfigitem('smtp', 'tls',
1115 coreconfigitem('smtp', 'tls',
1113 default='none',
1116 default='none',
1114 )
1117 )
1115 coreconfigitem('smtp', 'username',
1118 coreconfigitem('smtp', 'username',
1116 default=None,
1119 default=None,
1117 )
1120 )
1118 coreconfigitem('sparse', 'missingwarning',
1121 coreconfigitem('sparse', 'missingwarning',
1119 default=True,
1122 default=True,
1120 )
1123 )
1121 coreconfigitem('subrepos', 'allowed',
1124 coreconfigitem('subrepos', 'allowed',
1122 default=dynamicdefault, # to make backporting simpler
1125 default=dynamicdefault, # to make backporting simpler
1123 )
1126 )
1124 coreconfigitem('subrepos', 'hg:allowed',
1127 coreconfigitem('subrepos', 'hg:allowed',
1125 default=dynamicdefault,
1128 default=dynamicdefault,
1126 )
1129 )
1127 coreconfigitem('subrepos', 'git:allowed',
1130 coreconfigitem('subrepos', 'git:allowed',
1128 default=dynamicdefault,
1131 default=dynamicdefault,
1129 )
1132 )
1130 coreconfigitem('subrepos', 'svn:allowed',
1133 coreconfigitem('subrepos', 'svn:allowed',
1131 default=dynamicdefault,
1134 default=dynamicdefault,
1132 )
1135 )
1133 coreconfigitem('templates', '.*',
1136 coreconfigitem('templates', '.*',
1134 default=None,
1137 default=None,
1135 generic=True,
1138 generic=True,
1136 )
1139 )
1137 coreconfigitem('templateconfig', '.*',
1140 coreconfigitem('templateconfig', '.*',
1138 default=dynamicdefault,
1141 default=dynamicdefault,
1139 generic=True,
1142 generic=True,
1140 )
1143 )
1141 coreconfigitem('trusted', 'groups',
1144 coreconfigitem('trusted', 'groups',
1142 default=list,
1145 default=list,
1143 )
1146 )
1144 coreconfigitem('trusted', 'users',
1147 coreconfigitem('trusted', 'users',
1145 default=list,
1148 default=list,
1146 )
1149 )
1147 coreconfigitem('ui', '_usedassubrepo',
1150 coreconfigitem('ui', '_usedassubrepo',
1148 default=False,
1151 default=False,
1149 )
1152 )
1150 coreconfigitem('ui', 'allowemptycommit',
1153 coreconfigitem('ui', 'allowemptycommit',
1151 default=False,
1154 default=False,
1152 )
1155 )
1153 coreconfigitem('ui', 'archivemeta',
1156 coreconfigitem('ui', 'archivemeta',
1154 default=True,
1157 default=True,
1155 )
1158 )
1156 coreconfigitem('ui', 'askusername',
1159 coreconfigitem('ui', 'askusername',
1157 default=False,
1160 default=False,
1158 )
1161 )
1159 coreconfigitem('ui', 'clonebundlefallback',
1162 coreconfigitem('ui', 'clonebundlefallback',
1160 default=False,
1163 default=False,
1161 )
1164 )
1162 coreconfigitem('ui', 'clonebundleprefers',
1165 coreconfigitem('ui', 'clonebundleprefers',
1163 default=list,
1166 default=list,
1164 )
1167 )
1165 coreconfigitem('ui', 'clonebundles',
1168 coreconfigitem('ui', 'clonebundles',
1166 default=True,
1169 default=True,
1167 )
1170 )
1168 coreconfigitem('ui', 'color',
1171 coreconfigitem('ui', 'color',
1169 default='auto',
1172 default='auto',
1170 )
1173 )
1171 coreconfigitem('ui', 'commitsubrepos',
1174 coreconfigitem('ui', 'commitsubrepos',
1172 default=False,
1175 default=False,
1173 )
1176 )
1174 coreconfigitem('ui', 'debug',
1177 coreconfigitem('ui', 'debug',
1175 default=False,
1178 default=False,
1176 )
1179 )
1177 coreconfigitem('ui', 'debugger',
1180 coreconfigitem('ui', 'debugger',
1178 default=None,
1181 default=None,
1179 )
1182 )
1180 coreconfigitem('ui', 'editor',
1183 coreconfigitem('ui', 'editor',
1181 default=dynamicdefault,
1184 default=dynamicdefault,
1182 )
1185 )
1183 coreconfigitem('ui', 'fallbackencoding',
1186 coreconfigitem('ui', 'fallbackencoding',
1184 default=None,
1187 default=None,
1185 )
1188 )
1186 coreconfigitem('ui', 'forcecwd',
1189 coreconfigitem('ui', 'forcecwd',
1187 default=None,
1190 default=None,
1188 )
1191 )
1189 coreconfigitem('ui', 'forcemerge',
1192 coreconfigitem('ui', 'forcemerge',
1190 default=None,
1193 default=None,
1191 )
1194 )
1192 coreconfigitem('ui', 'formatdebug',
1195 coreconfigitem('ui', 'formatdebug',
1193 default=False,
1196 default=False,
1194 )
1197 )
1195 coreconfigitem('ui', 'formatjson',
1198 coreconfigitem('ui', 'formatjson',
1196 default=False,
1199 default=False,
1197 )
1200 )
1198 coreconfigitem('ui', 'formatted',
1201 coreconfigitem('ui', 'formatted',
1199 default=None,
1202 default=None,
1200 )
1203 )
1201 coreconfigitem('ui', 'graphnodetemplate',
1204 coreconfigitem('ui', 'graphnodetemplate',
1202 default=None,
1205 default=None,
1203 )
1206 )
1204 coreconfigitem('ui', 'interactive',
1207 coreconfigitem('ui', 'interactive',
1205 default=None,
1208 default=None,
1206 )
1209 )
1207 coreconfigitem('ui', 'interface',
1210 coreconfigitem('ui', 'interface',
1208 default=None,
1211 default=None,
1209 )
1212 )
1210 coreconfigitem('ui', 'interface.chunkselector',
1213 coreconfigitem('ui', 'interface.chunkselector',
1211 default=None,
1214 default=None,
1212 )
1215 )
1213 coreconfigitem('ui', 'large-file-limit',
1216 coreconfigitem('ui', 'large-file-limit',
1214 default=10000000,
1217 default=10000000,
1215 )
1218 )
1216 coreconfigitem('ui', 'logblockedtimes',
1219 coreconfigitem('ui', 'logblockedtimes',
1217 default=False,
1220 default=False,
1218 )
1221 )
1219 coreconfigitem('ui', 'logtemplate',
1222 coreconfigitem('ui', 'logtemplate',
1220 default=None,
1223 default=None,
1221 )
1224 )
1222 coreconfigitem('ui', 'merge',
1225 coreconfigitem('ui', 'merge',
1223 default=None,
1226 default=None,
1224 )
1227 )
1225 coreconfigitem('ui', 'mergemarkers',
1228 coreconfigitem('ui', 'mergemarkers',
1226 default='basic',
1229 default='basic',
1227 )
1230 )
1228 coreconfigitem('ui', 'mergemarkertemplate',
1231 coreconfigitem('ui', 'mergemarkertemplate',
1229 default=('{node|short} '
1232 default=('{node|short} '
1230 '{ifeq(tags, "tip", "", '
1233 '{ifeq(tags, "tip", "", '
1231 'ifeq(tags, "", "", "{tags} "))}'
1234 'ifeq(tags, "", "", "{tags} "))}'
1232 '{if(bookmarks, "{bookmarks} ")}'
1235 '{if(bookmarks, "{bookmarks} ")}'
1233 '{ifeq(branch, "default", "", "{branch} ")}'
1236 '{ifeq(branch, "default", "", "{branch} ")}'
1234 '- {author|user}: {desc|firstline}')
1237 '- {author|user}: {desc|firstline}')
1235 )
1238 )
1236 coreconfigitem('ui', 'message-output',
1239 coreconfigitem('ui', 'message-output',
1237 default='stdio',
1240 default='stdio',
1238 )
1241 )
1239 coreconfigitem('ui', 'nontty',
1242 coreconfigitem('ui', 'nontty',
1240 default=False,
1243 default=False,
1241 )
1244 )
1242 coreconfigitem('ui', 'origbackuppath',
1245 coreconfigitem('ui', 'origbackuppath',
1243 default=None,
1246 default=None,
1244 )
1247 )
1245 coreconfigitem('ui', 'paginate',
1248 coreconfigitem('ui', 'paginate',
1246 default=True,
1249 default=True,
1247 )
1250 )
1248 coreconfigitem('ui', 'patch',
1251 coreconfigitem('ui', 'patch',
1249 default=None,
1252 default=None,
1250 )
1253 )
1251 coreconfigitem('ui', 'pre-merge-tool-output-template',
1254 coreconfigitem('ui', 'pre-merge-tool-output-template',
1252 default=None,
1255 default=None,
1253 )
1256 )
1254 coreconfigitem('ui', 'portablefilenames',
1257 coreconfigitem('ui', 'portablefilenames',
1255 default='warn',
1258 default='warn',
1256 )
1259 )
1257 coreconfigitem('ui', 'promptecho',
1260 coreconfigitem('ui', 'promptecho',
1258 default=False,
1261 default=False,
1259 )
1262 )
1260 coreconfigitem('ui', 'quiet',
1263 coreconfigitem('ui', 'quiet',
1261 default=False,
1264 default=False,
1262 )
1265 )
1263 coreconfigitem('ui', 'quietbookmarkmove',
1266 coreconfigitem('ui', 'quietbookmarkmove',
1264 default=False,
1267 default=False,
1265 )
1268 )
1266 coreconfigitem('ui', 'relative-paths',
1269 coreconfigitem('ui', 'relative-paths',
1267 default='legacy',
1270 default='legacy',
1268 )
1271 )
1269 coreconfigitem('ui', 'remotecmd',
1272 coreconfigitem('ui', 'remotecmd',
1270 default='hg',
1273 default='hg',
1271 )
1274 )
1272 coreconfigitem('ui', 'report_untrusted',
1275 coreconfigitem('ui', 'report_untrusted',
1273 default=True,
1276 default=True,
1274 )
1277 )
1275 coreconfigitem('ui', 'rollback',
1278 coreconfigitem('ui', 'rollback',
1276 default=True,
1279 default=True,
1277 )
1280 )
1278 coreconfigitem('ui', 'signal-safe-lock',
1281 coreconfigitem('ui', 'signal-safe-lock',
1279 default=True,
1282 default=True,
1280 )
1283 )
1281 coreconfigitem('ui', 'slash',
1284 coreconfigitem('ui', 'slash',
1282 default=False,
1285 default=False,
1283 )
1286 )
1284 coreconfigitem('ui', 'ssh',
1287 coreconfigitem('ui', 'ssh',
1285 default='ssh',
1288 default='ssh',
1286 )
1289 )
1287 coreconfigitem('ui', 'ssherrorhint',
1290 coreconfigitem('ui', 'ssherrorhint',
1288 default=None,
1291 default=None,
1289 )
1292 )
1290 coreconfigitem('ui', 'statuscopies',
1293 coreconfigitem('ui', 'statuscopies',
1291 default=False,
1294 default=False,
1292 )
1295 )
1293 coreconfigitem('ui', 'strict',
1296 coreconfigitem('ui', 'strict',
1294 default=False,
1297 default=False,
1295 )
1298 )
1296 coreconfigitem('ui', 'style',
1299 coreconfigitem('ui', 'style',
1297 default='',
1300 default='',
1298 )
1301 )
1299 coreconfigitem('ui', 'supportcontact',
1302 coreconfigitem('ui', 'supportcontact',
1300 default=None,
1303 default=None,
1301 )
1304 )
1302 coreconfigitem('ui', 'textwidth',
1305 coreconfigitem('ui', 'textwidth',
1303 default=78,
1306 default=78,
1304 )
1307 )
1305 coreconfigitem('ui', 'timeout',
1308 coreconfigitem('ui', 'timeout',
1306 default='600',
1309 default='600',
1307 )
1310 )
1308 coreconfigitem('ui', 'timeout.warn',
1311 coreconfigitem('ui', 'timeout.warn',
1309 default=0,
1312 default=0,
1310 )
1313 )
1311 coreconfigitem('ui', 'traceback',
1314 coreconfigitem('ui', 'traceback',
1312 default=False,
1315 default=False,
1313 )
1316 )
1314 coreconfigitem('ui', 'tweakdefaults',
1317 coreconfigitem('ui', 'tweakdefaults',
1315 default=False,
1318 default=False,
1316 )
1319 )
1317 coreconfigitem('ui', 'username',
1320 coreconfigitem('ui', 'username',
1318 alias=[('ui', 'user')]
1321 alias=[('ui', 'user')]
1319 )
1322 )
1320 coreconfigitem('ui', 'verbose',
1323 coreconfigitem('ui', 'verbose',
1321 default=False,
1324 default=False,
1322 )
1325 )
1323 coreconfigitem('verify', 'skipflags',
1326 coreconfigitem('verify', 'skipflags',
1324 default=None,
1327 default=None,
1325 )
1328 )
1326 coreconfigitem('web', 'allowbz2',
1329 coreconfigitem('web', 'allowbz2',
1327 default=False,
1330 default=False,
1328 )
1331 )
1329 coreconfigitem('web', 'allowgz',
1332 coreconfigitem('web', 'allowgz',
1330 default=False,
1333 default=False,
1331 )
1334 )
1332 coreconfigitem('web', 'allow-pull',
1335 coreconfigitem('web', 'allow-pull',
1333 alias=[('web', 'allowpull')],
1336 alias=[('web', 'allowpull')],
1334 default=True,
1337 default=True,
1335 )
1338 )
1336 coreconfigitem('web', 'allow-push',
1339 coreconfigitem('web', 'allow-push',
1337 alias=[('web', 'allow_push')],
1340 alias=[('web', 'allow_push')],
1338 default=list,
1341 default=list,
1339 )
1342 )
1340 coreconfigitem('web', 'allowzip',
1343 coreconfigitem('web', 'allowzip',
1341 default=False,
1344 default=False,
1342 )
1345 )
1343 coreconfigitem('web', 'archivesubrepos',
1346 coreconfigitem('web', 'archivesubrepos',
1344 default=False,
1347 default=False,
1345 )
1348 )
1346 coreconfigitem('web', 'cache',
1349 coreconfigitem('web', 'cache',
1347 default=True,
1350 default=True,
1348 )
1351 )
1349 coreconfigitem('web', 'comparisoncontext',
1352 coreconfigitem('web', 'comparisoncontext',
1350 default=5,
1353 default=5,
1351 )
1354 )
1352 coreconfigitem('web', 'contact',
1355 coreconfigitem('web', 'contact',
1353 default=None,
1356 default=None,
1354 )
1357 )
1355 coreconfigitem('web', 'deny_push',
1358 coreconfigitem('web', 'deny_push',
1356 default=list,
1359 default=list,
1357 )
1360 )
1358 coreconfigitem('web', 'guessmime',
1361 coreconfigitem('web', 'guessmime',
1359 default=False,
1362 default=False,
1360 )
1363 )
1361 coreconfigitem('web', 'hidden',
1364 coreconfigitem('web', 'hidden',
1362 default=False,
1365 default=False,
1363 )
1366 )
1364 coreconfigitem('web', 'labels',
1367 coreconfigitem('web', 'labels',
1365 default=list,
1368 default=list,
1366 )
1369 )
1367 coreconfigitem('web', 'logoimg',
1370 coreconfigitem('web', 'logoimg',
1368 default='hglogo.png',
1371 default='hglogo.png',
1369 )
1372 )
1370 coreconfigitem('web', 'logourl',
1373 coreconfigitem('web', 'logourl',
1371 default='https://mercurial-scm.org/',
1374 default='https://mercurial-scm.org/',
1372 )
1375 )
1373 coreconfigitem('web', 'accesslog',
1376 coreconfigitem('web', 'accesslog',
1374 default='-',
1377 default='-',
1375 )
1378 )
1376 coreconfigitem('web', 'address',
1379 coreconfigitem('web', 'address',
1377 default='',
1380 default='',
1378 )
1381 )
1379 coreconfigitem('web', 'allow-archive',
1382 coreconfigitem('web', 'allow-archive',
1380 alias=[('web', 'allow_archive')],
1383 alias=[('web', 'allow_archive')],
1381 default=list,
1384 default=list,
1382 )
1385 )
1383 coreconfigitem('web', 'allow_read',
1386 coreconfigitem('web', 'allow_read',
1384 default=list,
1387 default=list,
1385 )
1388 )
1386 coreconfigitem('web', 'baseurl',
1389 coreconfigitem('web', 'baseurl',
1387 default=None,
1390 default=None,
1388 )
1391 )
1389 coreconfigitem('web', 'cacerts',
1392 coreconfigitem('web', 'cacerts',
1390 default=None,
1393 default=None,
1391 )
1394 )
1392 coreconfigitem('web', 'certificate',
1395 coreconfigitem('web', 'certificate',
1393 default=None,
1396 default=None,
1394 )
1397 )
1395 coreconfigitem('web', 'collapse',
1398 coreconfigitem('web', 'collapse',
1396 default=False,
1399 default=False,
1397 )
1400 )
1398 coreconfigitem('web', 'csp',
1401 coreconfigitem('web', 'csp',
1399 default=None,
1402 default=None,
1400 )
1403 )
1401 coreconfigitem('web', 'deny_read',
1404 coreconfigitem('web', 'deny_read',
1402 default=list,
1405 default=list,
1403 )
1406 )
1404 coreconfigitem('web', 'descend',
1407 coreconfigitem('web', 'descend',
1405 default=True,
1408 default=True,
1406 )
1409 )
1407 coreconfigitem('web', 'description',
1410 coreconfigitem('web', 'description',
1408 default="",
1411 default="",
1409 )
1412 )
1410 coreconfigitem('web', 'encoding',
1413 coreconfigitem('web', 'encoding',
1411 default=lambda: encoding.encoding,
1414 default=lambda: encoding.encoding,
1412 )
1415 )
1413 coreconfigitem('web', 'errorlog',
1416 coreconfigitem('web', 'errorlog',
1414 default='-',
1417 default='-',
1415 )
1418 )
1416 coreconfigitem('web', 'ipv6',
1419 coreconfigitem('web', 'ipv6',
1417 default=False,
1420 default=False,
1418 )
1421 )
1419 coreconfigitem('web', 'maxchanges',
1422 coreconfigitem('web', 'maxchanges',
1420 default=10,
1423 default=10,
1421 )
1424 )
1422 coreconfigitem('web', 'maxfiles',
1425 coreconfigitem('web', 'maxfiles',
1423 default=10,
1426 default=10,
1424 )
1427 )
1425 coreconfigitem('web', 'maxshortchanges',
1428 coreconfigitem('web', 'maxshortchanges',
1426 default=60,
1429 default=60,
1427 )
1430 )
1428 coreconfigitem('web', 'motd',
1431 coreconfigitem('web', 'motd',
1429 default='',
1432 default='',
1430 )
1433 )
1431 coreconfigitem('web', 'name',
1434 coreconfigitem('web', 'name',
1432 default=dynamicdefault,
1435 default=dynamicdefault,
1433 )
1436 )
1434 coreconfigitem('web', 'port',
1437 coreconfigitem('web', 'port',
1435 default=8000,
1438 default=8000,
1436 )
1439 )
1437 coreconfigitem('web', 'prefix',
1440 coreconfigitem('web', 'prefix',
1438 default='',
1441 default='',
1439 )
1442 )
1440 coreconfigitem('web', 'push_ssl',
1443 coreconfigitem('web', 'push_ssl',
1441 default=True,
1444 default=True,
1442 )
1445 )
1443 coreconfigitem('web', 'refreshinterval',
1446 coreconfigitem('web', 'refreshinterval',
1444 default=20,
1447 default=20,
1445 )
1448 )
1446 coreconfigitem('web', 'server-header',
1449 coreconfigitem('web', 'server-header',
1447 default=None,
1450 default=None,
1448 )
1451 )
1449 coreconfigitem('web', 'static',
1452 coreconfigitem('web', 'static',
1450 default=None,
1453 default=None,
1451 )
1454 )
1452 coreconfigitem('web', 'staticurl',
1455 coreconfigitem('web', 'staticurl',
1453 default=None,
1456 default=None,
1454 )
1457 )
1455 coreconfigitem('web', 'stripes',
1458 coreconfigitem('web', 'stripes',
1456 default=1,
1459 default=1,
1457 )
1460 )
1458 coreconfigitem('web', 'style',
1461 coreconfigitem('web', 'style',
1459 default='paper',
1462 default='paper',
1460 )
1463 )
1461 coreconfigitem('web', 'templates',
1464 coreconfigitem('web', 'templates',
1462 default=None,
1465 default=None,
1463 )
1466 )
1464 coreconfigitem('web', 'view',
1467 coreconfigitem('web', 'view',
1465 default='served',
1468 default='served',
1466 )
1469 )
1467 coreconfigitem('worker', 'backgroundclose',
1470 coreconfigitem('worker', 'backgroundclose',
1468 default=dynamicdefault,
1471 default=dynamicdefault,
1469 )
1472 )
1470 # Windows defaults to a limit of 512 open files. A buffer of 128
1473 # Windows defaults to a limit of 512 open files. A buffer of 128
1471 # should give us enough headway.
1474 # should give us enough headway.
1472 coreconfigitem('worker', 'backgroundclosemaxqueue',
1475 coreconfigitem('worker', 'backgroundclosemaxqueue',
1473 default=384,
1476 default=384,
1474 )
1477 )
1475 coreconfigitem('worker', 'backgroundcloseminfilecount',
1478 coreconfigitem('worker', 'backgroundcloseminfilecount',
1476 default=2048,
1479 default=2048,
1477 )
1480 )
1478 coreconfigitem('worker', 'backgroundclosethreadcount',
1481 coreconfigitem('worker', 'backgroundclosethreadcount',
1479 default=4,
1482 default=4,
1480 )
1483 )
1481 coreconfigitem('worker', 'enabled',
1484 coreconfigitem('worker', 'enabled',
1482 default=True,
1485 default=True,
1483 )
1486 )
1484 coreconfigitem('worker', 'numcpus',
1487 coreconfigitem('worker', 'numcpus',
1485 default=None,
1488 default=None,
1486 )
1489 )
1487
1490
1488 # Rebase related configuration moved to core because other extension are doing
1491 # Rebase related configuration moved to core because other extension are doing
1489 # strange things. For example, shelve import the extensions to reuse some bit
1492 # strange things. For example, shelve import the extensions to reuse some bit
1490 # without formally loading it.
1493 # without formally loading it.
1491 coreconfigitem('commands', 'rebase.requiredest',
1494 coreconfigitem('commands', 'rebase.requiredest',
1492 default=False,
1495 default=False,
1493 )
1496 )
1494 coreconfigitem('experimental', 'rebaseskipobsolete',
1497 coreconfigitem('experimental', 'rebaseskipobsolete',
1495 default=True,
1498 default=True,
1496 )
1499 )
1497 coreconfigitem('rebase', 'singletransaction',
1500 coreconfigitem('rebase', 'singletransaction',
1498 default=False,
1501 default=False,
1499 )
1502 )
1500 coreconfigitem('rebase', 'experimental.inmemory',
1503 coreconfigitem('rebase', 'experimental.inmemory',
1501 default=False,
1504 default=False,
1502 )
1505 )
@@ -1,456 +1,458 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 util,
55 util,
56 )
56 )
57
57
58 def _updatesample(revs, heads, sample, parentfn, quicksamplesize=0):
58 def _updatesample(revs, heads, sample, parentfn, quicksamplesize=0):
59 """update an existing sample to match the expected size
59 """update an existing sample to match the expected size
60
60
61 The sample is updated with revs exponentially distant from each head of the
61 The sample is updated with revs exponentially distant from each head of the
62 <revs> set. (H~1, H~2, H~4, H~8, etc).
62 <revs> set. (H~1, H~2, H~4, H~8, etc).
63
63
64 If a target size is specified, the sampling will stop once this size is
64 If a target size is specified, the sampling will stop once this size is
65 reached. Otherwise sampling will happen until roots of the <revs> set are
65 reached. Otherwise sampling will happen until roots of the <revs> set are
66 reached.
66 reached.
67
67
68 :revs: set of revs we want to discover (if None, assume the whole dag)
68 :revs: set of revs we want to discover (if None, assume the whole dag)
69 :heads: set of DAG head revs
69 :heads: set of DAG head revs
70 :sample: a sample to update
70 :sample: a sample to update
71 :parentfn: a callable to resolve parents for a revision
71 :parentfn: a callable to resolve parents for a revision
72 :quicksamplesize: optional target size of the sample"""
72 :quicksamplesize: optional target size of the sample"""
73 dist = {}
73 dist = {}
74 visit = collections.deque(heads)
74 visit = collections.deque(heads)
75 seen = set()
75 seen = set()
76 factor = 1
76 factor = 1
77 while visit:
77 while visit:
78 curr = visit.popleft()
78 curr = visit.popleft()
79 if curr in seen:
79 if curr in seen:
80 continue
80 continue
81 d = dist.setdefault(curr, 1)
81 d = dist.setdefault(curr, 1)
82 if d > factor:
82 if d > factor:
83 factor *= 2
83 factor *= 2
84 if d == factor:
84 if d == factor:
85 sample.add(curr)
85 sample.add(curr)
86 if quicksamplesize and (len(sample) >= quicksamplesize):
86 if quicksamplesize and (len(sample) >= quicksamplesize):
87 return
87 return
88 seen.add(curr)
88 seen.add(curr)
89
89
90 for p in parentfn(curr):
90 for p in parentfn(curr):
91 if p != nullrev and (not revs or p in revs):
91 if p != nullrev and (not revs or p in revs):
92 dist.setdefault(p, d + 1)
92 dist.setdefault(p, d + 1)
93 visit.append(p)
93 visit.append(p)
94
94
95 def _limitsample(sample, desiredlen, randomize=True):
95 def _limitsample(sample, desiredlen, randomize=True):
96 """return a random subset of sample of at most desiredlen item.
96 """return a random subset of sample of at most desiredlen item.
97
97
98 If randomize is False, though, a deterministic subset is returned.
98 If randomize is False, though, a deterministic subset is returned.
99 This is meant for integration tests.
99 This is meant for integration tests.
100 """
100 """
101 if len(sample) <= desiredlen:
101 if len(sample) <= desiredlen:
102 return sample
102 return sample
103 if randomize:
103 if randomize:
104 return set(random.sample(sample, desiredlen))
104 return set(random.sample(sample, desiredlen))
105 sample = list(sample)
105 sample = list(sample)
106 sample.sort()
106 sample.sort()
107 return set(sample[:desiredlen])
107 return set(sample[:desiredlen])
108
108
109 class partialdiscovery(object):
109 class partialdiscovery(object):
110 """an object representing ongoing discovery
110 """an object representing ongoing discovery
111
111
112 Feed with data from the remote repository, this object keep track of the
112 Feed with data from the remote repository, this object keep track of the
113 current set of changeset in various states:
113 current set of changeset in various states:
114
114
115 - common: revs also known remotely
115 - common: revs also known remotely
116 - undecided: revs we don't have information on yet
116 - undecided: revs we don't have information on yet
117 - missing: revs missing remotely
117 - missing: revs missing remotely
118 (all tracked revisions are known locally)
118 (all tracked revisions are known locally)
119 """
119 """
120
120
121 def __init__(self, repo, targetheads, respectsize, randomize=True):
121 def __init__(self, repo, targetheads, respectsize, randomize=True):
122 self._repo = repo
122 self._repo = repo
123 self._targetheads = targetheads
123 self._targetheads = targetheads
124 self._common = repo.changelog.incrementalmissingrevs()
124 self._common = repo.changelog.incrementalmissingrevs()
125 self._undecided = None
125 self._undecided = None
126 self.missing = set()
126 self.missing = set()
127 self._childrenmap = None
127 self._childrenmap = None
128 self._respectsize = respectsize
128 self._respectsize = respectsize
129 self.randomize = randomize
129 self.randomize = randomize
130
130
131 def addcommons(self, commons):
131 def addcommons(self, commons):
132 """register nodes known as common"""
132 """register nodes known as common"""
133 self._common.addbases(commons)
133 self._common.addbases(commons)
134 if self._undecided is not None:
134 if self._undecided is not None:
135 self._common.removeancestorsfrom(self._undecided)
135 self._common.removeancestorsfrom(self._undecided)
136
136
137 def addmissings(self, missings):
137 def addmissings(self, missings):
138 """register some nodes as missing"""
138 """register some nodes as missing"""
139 newmissing = self._repo.revs('%ld::%ld', missings, self.undecided)
139 newmissing = self._repo.revs('%ld::%ld', missings, self.undecided)
140 if newmissing:
140 if newmissing:
141 self.missing.update(newmissing)
141 self.missing.update(newmissing)
142 self.undecided.difference_update(newmissing)
142 self.undecided.difference_update(newmissing)
143
143
144 def addinfo(self, sample):
144 def addinfo(self, sample):
145 """consume an iterable of (rev, known) tuples"""
145 """consume an iterable of (rev, known) tuples"""
146 common = set()
146 common = set()
147 missing = set()
147 missing = set()
148 for rev, known in sample:
148 for rev, known in sample:
149 if known:
149 if known:
150 common.add(rev)
150 common.add(rev)
151 else:
151 else:
152 missing.add(rev)
152 missing.add(rev)
153 if common:
153 if common:
154 self.addcommons(common)
154 self.addcommons(common)
155 if missing:
155 if missing:
156 self.addmissings(missing)
156 self.addmissings(missing)
157
157
158 def hasinfo(self):
158 def hasinfo(self):
159 """return True is we have any clue about the remote state"""
159 """return True is we have any clue about the remote state"""
160 return self._common.hasbases()
160 return self._common.hasbases()
161
161
162 def iscomplete(self):
162 def iscomplete(self):
163 """True if all the necessary data have been gathered"""
163 """True if all the necessary data have been gathered"""
164 return self._undecided is not None and not self._undecided
164 return self._undecided is not None and not self._undecided
165
165
166 @property
166 @property
167 def undecided(self):
167 def undecided(self):
168 if self._undecided is not None:
168 if self._undecided is not None:
169 return self._undecided
169 return self._undecided
170 self._undecided = set(self._common.missingancestors(self._targetheads))
170 self._undecided = set(self._common.missingancestors(self._targetheads))
171 return self._undecided
171 return self._undecided
172
172
173 def stats(self):
173 def stats(self):
174 return {
174 return {
175 'undecided': len(self.undecided),
175 'undecided': len(self.undecided),
176 }
176 }
177
177
178 def commonheads(self):
178 def commonheads(self):
179 """the heads of the known common set"""
179 """the heads of the known common set"""
180 # heads(common) == heads(common.bases) since common represents
180 # heads(common) == heads(common.bases) since common represents
181 # common.bases and all its ancestors
181 # common.bases and all its ancestors
182 return self._common.basesheads()
182 return self._common.basesheads()
183
183
184 def _parentsgetter(self):
184 def _parentsgetter(self):
185 getrev = self._repo.changelog.index.__getitem__
185 getrev = self._repo.changelog.index.__getitem__
186 def getparents(r):
186 def getparents(r):
187 return getrev(r)[5:7]
187 return getrev(r)[5:7]
188 return getparents
188 return getparents
189
189
190 def _childrengetter(self):
190 def _childrengetter(self):
191
191
192 if self._childrenmap is not None:
192 if self._childrenmap is not None:
193 # During discovery, the `undecided` set keep shrinking.
193 # During discovery, the `undecided` set keep shrinking.
194 # Therefore, the map computed for an iteration N will be
194 # Therefore, the map computed for an iteration N will be
195 # valid for iteration N+1. Instead of computing the same
195 # valid for iteration N+1. Instead of computing the same
196 # data over and over we cached it the first time.
196 # data over and over we cached it the first time.
197 return self._childrenmap.__getitem__
197 return self._childrenmap.__getitem__
198
198
199 # _updatesample() essentially does interaction over revisions to look
199 # _updatesample() essentially does interaction over revisions to look
200 # up their children. This lookup is expensive and doing it in a loop is
200 # up their children. This lookup is expensive and doing it in a loop is
201 # quadratic. We precompute the children for all relevant revisions and
201 # quadratic. We precompute the children for all relevant revisions and
202 # make the lookup in _updatesample() a simple dict lookup.
202 # make the lookup in _updatesample() a simple dict lookup.
203 self._childrenmap = children = {}
203 self._childrenmap = children = {}
204
204
205 parentrevs = self._parentsgetter()
205 parentrevs = self._parentsgetter()
206 revs = self.undecided
206 revs = self.undecided
207
207
208 for rev in sorted(revs):
208 for rev in sorted(revs):
209 # Always ensure revision has an entry so we don't need to worry
209 # Always ensure revision has an entry so we don't need to worry
210 # about missing keys.
210 # about missing keys.
211 children[rev] = []
211 children[rev] = []
212 for prev in parentrevs(rev):
212 for prev in parentrevs(rev):
213 if prev == nullrev:
213 if prev == nullrev:
214 continue
214 continue
215 c = children.get(prev)
215 c = children.get(prev)
216 if c is not None:
216 if c is not None:
217 c.append(rev)
217 c.append(rev)
218 return children.__getitem__
218 return children.__getitem__
219
219
220 def takequicksample(self, headrevs, size):
220 def takequicksample(self, headrevs, size):
221 """takes a quick sample of size <size>
221 """takes a quick sample of size <size>
222
222
223 It is meant for initial sampling and focuses on querying heads and close
223 It is meant for initial sampling and focuses on querying heads and close
224 ancestors of heads.
224 ancestors of heads.
225
225
226 :headrevs: set of head revisions in local DAG to consider
226 :headrevs: set of head revisions in local DAG to consider
227 :size: the maximum size of the sample"""
227 :size: the maximum size of the sample"""
228 revs = self.undecided
228 revs = self.undecided
229 if len(revs) <= size:
229 if len(revs) <= size:
230 return list(revs)
230 return list(revs)
231 sample = set(self._repo.revs('heads(%ld)', revs))
231 sample = set(self._repo.revs('heads(%ld)', revs))
232
232
233 if len(sample) >= size:
233 if len(sample) >= size:
234 return _limitsample(sample, size, randomize=self.randomize)
234 return _limitsample(sample, size, randomize=self.randomize)
235
235
236 _updatesample(None, headrevs, sample, self._parentsgetter(),
236 _updatesample(None, headrevs, sample, self._parentsgetter(),
237 quicksamplesize=size)
237 quicksamplesize=size)
238 return sample
238 return sample
239
239
240 def takefullsample(self, headrevs, size):
240 def takefullsample(self, headrevs, size):
241 revs = self.undecided
241 revs = self.undecided
242 if len(revs) <= size:
242 if len(revs) <= size:
243 return list(revs)
243 return list(revs)
244 repo = self._repo
244 repo = self._repo
245 sample = set(repo.revs('heads(%ld)', revs))
245 sample = set(repo.revs('heads(%ld)', revs))
246 parentrevs = self._parentsgetter()
246 parentrevs = self._parentsgetter()
247
247
248 # update from heads
248 # update from heads
249 revsheads = sample.copy()
249 revsheads = sample.copy()
250 _updatesample(revs, revsheads, sample, parentrevs)
250 _updatesample(revs, revsheads, sample, parentrevs)
251
251
252 # update from roots
252 # update from roots
253 revsroots = set(repo.revs('roots(%ld)', revs))
253 revsroots = set(repo.revs('roots(%ld)', revs))
254 childrenrevs = self._childrengetter()
254 childrenrevs = self._childrengetter()
255 _updatesample(revs, revsroots, sample, childrenrevs)
255 _updatesample(revs, revsroots, sample, childrenrevs)
256 assert sample
256 assert sample
257
257
258 if not self._respectsize:
258 if not self._respectsize:
259 size = max(size, min(len(revsroots), len(revsheads)))
259 size = max(size, min(len(revsroots), len(revsheads)))
260
260
261 sample = _limitsample(sample, size, randomize=self.randomize)
261 sample = _limitsample(sample, size, randomize=self.randomize)
262 if len(sample) < size:
262 if len(sample) < size:
263 more = size - len(sample)
263 more = size - len(sample)
264 takefrom = list(revs - sample)
264 takefrom = list(revs - sample)
265 if self.randomize:
265 if self.randomize:
266 sample.update(random.sample(takefrom, more))
266 sample.update(random.sample(takefrom, more))
267 else:
267 else:
268 takefrom.sort()
268 takefrom.sort()
269 sample.update(takefrom[:more])
269 sample.update(takefrom[:more])
270 return sample
270 return sample
271
271
272 def findcommonheads(ui, local, remote,
272 def findcommonheads(ui, local, remote,
273 initialsamplesize=100,
273 initialsamplesize=100,
274 fullsamplesize=200,
274 fullsamplesize=200,
275 abortwhenunrelated=True,
275 abortwhenunrelated=True,
276 ancestorsof=None,
276 ancestorsof=None,
277 samplegrowth=1.05):
277 samplegrowth=1.05):
278 '''Return a tuple (common, anyincoming, remoteheads) used to identify
278 '''Return a tuple (common, anyincoming, remoteheads) used to identify
279 missing nodes from or in remote.
279 missing nodes from or in remote.
280 '''
280 '''
281 start = util.timer()
281 start = util.timer()
282
282
283 roundtrips = 0
283 roundtrips = 0
284 cl = local.changelog
284 cl = local.changelog
285 clnode = cl.node
285 clnode = cl.node
286 clrev = cl.rev
286 clrev = cl.rev
287
287
288 if ancestorsof is not None:
288 if ancestorsof is not None:
289 ownheads = [clrev(n) for n in ancestorsof]
289 ownheads = [clrev(n) for n in ancestorsof]
290 else:
290 else:
291 ownheads = [rev for rev in cl.headrevs() if rev != nullrev]
291 ownheads = [rev for rev in cl.headrevs() if rev != nullrev]
292
292
293 # early exit if we know all the specified remote heads already
293 # early exit if we know all the specified remote heads already
294 ui.debug("query 1; heads\n")
294 ui.debug("query 1; heads\n")
295 roundtrips += 1
295 roundtrips += 1
296 # We also ask remote about all the local heads. That set can be arbitrarily
296 # We also ask remote about all the local heads. That set can be arbitrarily
297 # large, so we used to limit it size to `initialsamplesize`. We no longer
297 # large, so we used to limit it size to `initialsamplesize`. We no longer
298 # do as it proved counter productive. The skipped heads could lead to a
298 # do as it proved counter productive. The skipped heads could lead to a
299 # large "undecided" set, slower to be clarified than if we asked the
299 # large "undecided" set, slower to be clarified than if we asked the
300 # question for all heads right away.
300 # question for all heads right away.
301 #
301 #
302 # We are already fetching all server heads using the `heads` commands,
302 # We are already fetching all server heads using the `heads` commands,
303 # sending a equivalent number of heads the other way should not have a
303 # sending a equivalent number of heads the other way should not have a
304 # significant impact. In addition, it is very likely that we are going to
304 # significant impact. In addition, it is very likely that we are going to
305 # have to issue "known" request for an equivalent amount of revisions in
305 # have to issue "known" request for an equivalent amount of revisions in
306 # order to decide if theses heads are common or missing.
306 # order to decide if theses heads are common or missing.
307 #
307 #
308 # find a detailled analysis below.
308 # find a detailled analysis below.
309 #
309 #
310 # Case A: local and server both has few heads
310 # Case A: local and server both has few heads
311 #
311 #
312 # Ownheads is below initialsamplesize, limit would not have any effect.
312 # Ownheads is below initialsamplesize, limit would not have any effect.
313 #
313 #
314 # Case B: local has few heads and server has many
314 # Case B: local has few heads and server has many
315 #
315 #
316 # Ownheads is below initialsamplesize, limit would not have any effect.
316 # Ownheads is below initialsamplesize, limit would not have any effect.
317 #
317 #
318 # Case C: local and server both has many heads
318 # Case C: local and server both has many heads
319 #
319 #
320 # We now transfert some more data, but not significantly more than is
320 # We now transfert some more data, but not significantly more than is
321 # already transfered to carry the server heads.
321 # already transfered to carry the server heads.
322 #
322 #
323 # Case D: local has many heads, server has few
323 # Case D: local has many heads, server has few
324 #
324 #
325 # D.1 local heads are mostly known remotely
325 # D.1 local heads are mostly known remotely
326 #
326 #
327 # All the known head will have be part of a `known` request at some
327 # All the known head will have be part of a `known` request at some
328 # point for the discovery to finish. Sending them all earlier is
328 # point for the discovery to finish. Sending them all earlier is
329 # actually helping.
329 # actually helping.
330 #
330 #
331 # (This case is fairly unlikely, it requires the numerous heads to all
331 # (This case is fairly unlikely, it requires the numerous heads to all
332 # be merged server side in only a few heads)
332 # be merged server side in only a few heads)
333 #
333 #
334 # D.2 local heads are mostly missing remotely
334 # D.2 local heads are mostly missing remotely
335 #
335 #
336 # To determine that the heads are missing, we'll have to issue `known`
336 # To determine that the heads are missing, we'll have to issue `known`
337 # request for them or one of their ancestors. This amount of `known`
337 # request for them or one of their ancestors. This amount of `known`
338 # request will likely be in the same order of magnitude than the amount
338 # request will likely be in the same order of magnitude than the amount
339 # of local heads.
339 # of local heads.
340 #
340 #
341 # The only case where we can be more efficient using `known` request on
341 # The only case where we can be more efficient using `known` request on
342 # ancestors are case were all the "missing" local heads are based on a
342 # ancestors are case were all the "missing" local heads are based on a
343 # few changeset, also "missing". This means we would have a "complex"
343 # few changeset, also "missing". This means we would have a "complex"
344 # graph (with many heads) attached to, but very independant to a the
344 # graph (with many heads) attached to, but very independant to a the
345 # "simple" graph on the server. This is a fairly usual case and have
345 # "simple" graph on the server. This is a fairly usual case and have
346 # not been met in the wild so far.
346 # not been met in the wild so far.
347 if remote.limitedarguments:
347 if remote.limitedarguments:
348 sample = _limitsample(ownheads, initialsamplesize)
348 sample = _limitsample(ownheads, initialsamplesize)
349 # indices between sample and externalized version must match
349 # indices between sample and externalized version must match
350 sample = list(sample)
350 sample = list(sample)
351 else:
351 else:
352 sample = ownheads
352 sample = ownheads
353
353
354 with remote.commandexecutor() as e:
354 with remote.commandexecutor() as e:
355 fheads = e.callcommand('heads', {})
355 fheads = e.callcommand('heads', {})
356 fknown = e.callcommand('known', {
356 fknown = e.callcommand('known', {
357 'nodes': [clnode(r) for r in sample],
357 'nodes': [clnode(r) for r in sample],
358 })
358 })
359
359
360 srvheadhashes, yesno = fheads.result(), fknown.result()
360 srvheadhashes, yesno = fheads.result(), fknown.result()
361
361
362 if cl.tip() == nullid:
362 if cl.tip() == nullid:
363 if srvheadhashes != [nullid]:
363 if srvheadhashes != [nullid]:
364 return [nullid], True, srvheadhashes
364 return [nullid], True, srvheadhashes
365 return [nullid], False, []
365 return [nullid], False, []
366
366
367 # start actual discovery (we note this before the next "if" for
367 # start actual discovery (we note this before the next "if" for
368 # compatibility reasons)
368 # compatibility reasons)
369 ui.status(_("searching for changes\n"))
369 ui.status(_("searching for changes\n"))
370
370
371 knownsrvheads = [] # revnos of remote heads that are known locally
371 knownsrvheads = [] # revnos of remote heads that are known locally
372 for node in srvheadhashes:
372 for node in srvheadhashes:
373 if node == nullid:
373 if node == nullid:
374 continue
374 continue
375
375
376 try:
376 try:
377 knownsrvheads.append(clrev(node))
377 knownsrvheads.append(clrev(node))
378 # Catches unknown and filtered nodes.
378 # Catches unknown and filtered nodes.
379 except error.LookupError:
379 except error.LookupError:
380 continue
380 continue
381
381
382 if len(knownsrvheads) == len(srvheadhashes):
382 if len(knownsrvheads) == len(srvheadhashes):
383 ui.debug("all remote heads known locally\n")
383 ui.debug("all remote heads known locally\n")
384 return srvheadhashes, False, srvheadhashes
384 return srvheadhashes, False, srvheadhashes
385
385
386 if len(sample) == len(ownheads) and all(yesno):
386 if len(sample) == len(ownheads) and all(yesno):
387 ui.note(_("all local heads known remotely\n"))
387 ui.note(_("all local heads known remotely\n"))
388 ownheadhashes = [clnode(r) for r in ownheads]
388 ownheadhashes = [clnode(r) for r in ownheads]
389 return ownheadhashes, True, srvheadhashes
389 return ownheadhashes, True, srvheadhashes
390
390
391 # full blown discovery
391 # full blown discovery
392
392
393 disco = partialdiscovery(local, ownheads, remote.limitedarguments)
393 randomize = ui.configbool('devel', 'discovery.randomize')
394 disco = partialdiscovery(local, ownheads, remote.limitedarguments,
395 randomize=randomize)
394 # treat remote heads (and maybe own heads) as a first implicit sample
396 # treat remote heads (and maybe own heads) as a first implicit sample
395 # response
397 # response
396 disco.addcommons(knownsrvheads)
398 disco.addcommons(knownsrvheads)
397 disco.addinfo(zip(sample, yesno))
399 disco.addinfo(zip(sample, yesno))
398
400
399 full = False
401 full = False
400 progress = ui.makeprogress(_('searching'), unit=_('queries'))
402 progress = ui.makeprogress(_('searching'), unit=_('queries'))
401 while not disco.iscomplete():
403 while not disco.iscomplete():
402
404
403 if full or disco.hasinfo():
405 if full or disco.hasinfo():
404 if full:
406 if full:
405 ui.note(_("sampling from both directions\n"))
407 ui.note(_("sampling from both directions\n"))
406 else:
408 else:
407 ui.debug("taking initial sample\n")
409 ui.debug("taking initial sample\n")
408 samplefunc = disco.takefullsample
410 samplefunc = disco.takefullsample
409 targetsize = fullsamplesize
411 targetsize = fullsamplesize
410 if not remote.limitedarguments:
412 if not remote.limitedarguments:
411 fullsamplesize = int(fullsamplesize * samplegrowth)
413 fullsamplesize = int(fullsamplesize * samplegrowth)
412 else:
414 else:
413 # use even cheaper initial sample
415 # use even cheaper initial sample
414 ui.debug("taking quick initial sample\n")
416 ui.debug("taking quick initial sample\n")
415 samplefunc = disco.takequicksample
417 samplefunc = disco.takequicksample
416 targetsize = initialsamplesize
418 targetsize = initialsamplesize
417 sample = samplefunc(ownheads, targetsize)
419 sample = samplefunc(ownheads, targetsize)
418
420
419 roundtrips += 1
421 roundtrips += 1
420 progress.update(roundtrips)
422 progress.update(roundtrips)
421 stats = disco.stats()
423 stats = disco.stats()
422 ui.debug("query %i; still undecided: %i, sample size is: %i\n"
424 ui.debug("query %i; still undecided: %i, sample size is: %i\n"
423 % (roundtrips, stats['undecided'], len(sample)))
425 % (roundtrips, stats['undecided'], len(sample)))
424
426
425 # indices between sample and externalized version must match
427 # indices between sample and externalized version must match
426 sample = list(sample)
428 sample = list(sample)
427
429
428 with remote.commandexecutor() as e:
430 with remote.commandexecutor() as e:
429 yesno = e.callcommand('known', {
431 yesno = e.callcommand('known', {
430 'nodes': [clnode(r) for r in sample],
432 'nodes': [clnode(r) for r in sample],
431 }).result()
433 }).result()
432
434
433 full = True
435 full = True
434
436
435 disco.addinfo(zip(sample, yesno))
437 disco.addinfo(zip(sample, yesno))
436
438
437 result = disco.commonheads()
439 result = disco.commonheads()
438 elapsed = util.timer() - start
440 elapsed = util.timer() - start
439 progress.complete()
441 progress.complete()
440 ui.debug("%d total queries in %.4fs\n" % (roundtrips, elapsed))
442 ui.debug("%d total queries in %.4fs\n" % (roundtrips, elapsed))
441 msg = ('found %d common and %d unknown server heads,'
443 msg = ('found %d common and %d unknown server heads,'
442 ' %d roundtrips in %.4fs\n')
444 ' %d roundtrips in %.4fs\n')
443 missing = set(result) - set(knownsrvheads)
445 missing = set(result) - set(knownsrvheads)
444 ui.log('discovery', msg, len(result), len(missing), roundtrips,
446 ui.log('discovery', msg, len(result), len(missing), roundtrips,
445 elapsed)
447 elapsed)
446
448
447 if not result and srvheadhashes != [nullid]:
449 if not result and srvheadhashes != [nullid]:
448 if abortwhenunrelated:
450 if abortwhenunrelated:
449 raise error.Abort(_("repository is unrelated"))
451 raise error.Abort(_("repository is unrelated"))
450 else:
452 else:
451 ui.warn(_("warning: repository is unrelated\n"))
453 ui.warn(_("warning: repository is unrelated\n"))
452 return ({nullid}, True, srvheadhashes,)
454 return ({nullid}, True, srvheadhashes,)
453
455
454 anyincoming = (srvheadhashes != [nullid])
456 anyincoming = (srvheadhashes != [nullid])
455 result = {clnode(r) for r in result}
457 result = {clnode(r) for r in result}
456 return result, anyincoming, srvheadhashes
458 return result, anyincoming, srvheadhashes
@@ -1,1120 +1,1114 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 heads summary:
47 heads summary:
48 total common heads: 2
48 total common heads: 2
49 also local heads: 2
49 also local heads: 2
50 also remote heads: 1
50 also remote heads: 1
51 both: 1
51 both: 1
52 local heads: 2
52 local heads: 2
53 common: 2
53 common: 2
54 missing: 0
54 missing: 0
55 remote heads: 3
55 remote heads: 3
56 common: 1
56 common: 1
57 unknown: 2
57 unknown: 2
58 local changesets: 7
58 local changesets: 7
59 common: 7
59 common: 7
60 missing: 0
60 missing: 0
61 common heads: 01241442b3c2 b5714e113bc0
61 common heads: 01241442b3c2 b5714e113bc0
62
62
63 % -- a -> b set
63 % -- a -> b set
64 comparing with b
64 comparing with b
65 query 1; heads
65 query 1; heads
66 searching for changes
66 searching for changes
67 all local heads known remotely
67 all local heads known remotely
68 elapsed time: * seconds (glob)
68 elapsed time: * seconds (glob)
69 heads summary:
69 heads summary:
70 total common heads: 2
70 total common heads: 2
71 also local heads: 2
71 also local heads: 2
72 also remote heads: 1
72 also remote heads: 1
73 both: 1
73 both: 1
74 local heads: 2
74 local heads: 2
75 common: 2
75 common: 2
76 missing: 0
76 missing: 0
77 remote heads: 3
77 remote heads: 3
78 common: 1
78 common: 1
79 unknown: 2
79 unknown: 2
80 local changesets: 7
80 local changesets: 7
81 common: 7
81 common: 7
82 missing: 0
82 missing: 0
83 common heads: 01241442b3c2 b5714e113bc0
83 common heads: 01241442b3c2 b5714e113bc0
84
84
85 % -- a -> b set (tip only)
85 % -- a -> b set (tip only)
86 comparing with b
86 comparing with b
87 query 1; heads
87 query 1; heads
88 searching for changes
88 searching for changes
89 all local heads known remotely
89 all local heads known remotely
90 elapsed time: * seconds (glob)
90 elapsed time: * seconds (glob)
91 heads summary:
91 heads summary:
92 total common heads: 1
92 total common heads: 1
93 also local heads: 1
93 also local heads: 1
94 also remote heads: 0
94 also remote heads: 0
95 both: 0
95 both: 0
96 local heads: 2
96 local heads: 2
97 common: 1
97 common: 1
98 missing: 1
98 missing: 1
99 remote heads: 3
99 remote heads: 3
100 common: 0
100 common: 0
101 unknown: 3
101 unknown: 3
102 local changesets: 7
102 local changesets: 7
103 common: 6
103 common: 6
104 missing: 1
104 missing: 1
105 common heads: b5714e113bc0
105 common heads: b5714e113bc0
106
106
107 % -- b -> a tree
107 % -- b -> a tree
108 comparing with a
108 comparing with a
109 searching for changes
109 searching for changes
110 unpruned common: 01241442b3c2 b5714e113bc0
110 unpruned common: 01241442b3c2 b5714e113bc0
111 elapsed time: * seconds (glob)
111 elapsed time: * seconds (glob)
112 heads summary:
112 heads summary:
113 total common heads: 2
113 total common heads: 2
114 also local heads: 1
114 also local heads: 1
115 also remote heads: 2
115 also remote heads: 2
116 both: 1
116 both: 1
117 local heads: 3
117 local heads: 3
118 common: 1
118 common: 1
119 missing: 2
119 missing: 2
120 remote heads: 2
120 remote heads: 2
121 common: 2
121 common: 2
122 unknown: 0
122 unknown: 0
123 local changesets: 15
123 local changesets: 15
124 common: 7
124 common: 7
125 missing: 8
125 missing: 8
126 common heads: 01241442b3c2 b5714e113bc0
126 common heads: 01241442b3c2 b5714e113bc0
127
127
128 % -- b -> a set
128 % -- b -> a set
129 comparing with a
129 comparing with a
130 query 1; heads
130 query 1; heads
131 searching for changes
131 searching for changes
132 all remote heads known locally
132 all remote heads known locally
133 elapsed time: * seconds (glob)
133 elapsed time: * seconds (glob)
134 heads summary:
134 heads summary:
135 total common heads: 2
135 total common heads: 2
136 also local heads: 1
136 also local heads: 1
137 also remote heads: 2
137 also remote heads: 2
138 both: 1
138 both: 1
139 local heads: 3
139 local heads: 3
140 common: 1
140 common: 1
141 missing: 2
141 missing: 2
142 remote heads: 2
142 remote heads: 2
143 common: 2
143 common: 2
144 unknown: 0
144 unknown: 0
145 local changesets: 15
145 local changesets: 15
146 common: 7
146 common: 7
147 missing: 8
147 missing: 8
148 common heads: 01241442b3c2 b5714e113bc0
148 common heads: 01241442b3c2 b5714e113bc0
149
149
150 % -- b -> a set (tip only)
150 % -- b -> a set (tip only)
151 comparing with a
151 comparing with a
152 query 1; heads
152 query 1; heads
153 searching for changes
153 searching for changes
154 all remote heads known locally
154 all remote heads known locally
155 elapsed time: * seconds (glob)
155 elapsed time: * seconds (glob)
156 heads summary:
156 heads summary:
157 total common heads: 2
157 total common heads: 2
158 also local heads: 1
158 also local heads: 1
159 also remote heads: 2
159 also remote heads: 2
160 both: 1
160 both: 1
161 local heads: 3
161 local heads: 3
162 common: 1
162 common: 1
163 missing: 2
163 missing: 2
164 remote heads: 2
164 remote heads: 2
165 common: 2
165 common: 2
166 unknown: 0
166 unknown: 0
167 local changesets: 15
167 local changesets: 15
168 common: 7
168 common: 7
169 missing: 8
169 missing: 8
170 common heads: 01241442b3c2 b5714e113bc0
170 common heads: 01241442b3c2 b5714e113bc0
171
171
172
172
173 Many new:
173 Many new:
174
174
175 $ testdesc '-ra1 -ra2' '-rb' '
175 $ testdesc '-ra1 -ra2' '-rb' '
176 > +2:f +3:a1 +3:b
176 > +2:f +3:a1 +3:b
177 > <f +30 :a2'
177 > <f +30 :a2'
178
178
179 % -- a -> b tree
179 % -- a -> b tree
180 comparing with b
180 comparing with b
181 searching for changes
181 searching for changes
182 unpruned common: bebd167eb94d
182 unpruned common: bebd167eb94d
183 elapsed time: * seconds (glob)
183 elapsed time: * seconds (glob)
184 heads summary:
184 heads summary:
185 total common heads: 1
185 total common heads: 1
186 also local heads: 1
186 also local heads: 1
187 also remote heads: 0
187 also remote heads: 0
188 both: 0
188 both: 0
189 local heads: 2
189 local heads: 2
190 common: 1
190 common: 1
191 missing: 1
191 missing: 1
192 remote heads: 1
192 remote heads: 1
193 common: 0
193 common: 0
194 unknown: 1
194 unknown: 1
195 local changesets: 35
195 local changesets: 35
196 common: 5
196 common: 5
197 missing: 30
197 missing: 30
198 common heads: bebd167eb94d
198 common heads: bebd167eb94d
199
199
200 % -- a -> b set
200 % -- a -> b set
201 comparing with b
201 comparing with b
202 query 1; heads
202 query 1; heads
203 searching for changes
203 searching for changes
204 taking initial sample
204 taking initial sample
205 searching: 2 queries
205 searching: 2 queries
206 query 2; still undecided: 29, sample size is: 29
206 query 2; still undecided: 29, sample size is: 29
207 2 total queries in *.????s (glob)
207 2 total queries in *.????s (glob)
208 elapsed time: * seconds (glob)
208 elapsed time: * seconds (glob)
209 heads summary:
209 heads summary:
210 total common heads: 1
210 total common heads: 1
211 also local heads: 1
211 also local heads: 1
212 also remote heads: 0
212 also remote heads: 0
213 both: 0
213 both: 0
214 local heads: 2
214 local heads: 2
215 common: 1
215 common: 1
216 missing: 1
216 missing: 1
217 remote heads: 1
217 remote heads: 1
218 common: 0
218 common: 0
219 unknown: 1
219 unknown: 1
220 local changesets: 35
220 local changesets: 35
221 common: 5
221 common: 5
222 missing: 30
222 missing: 30
223 common heads: bebd167eb94d
223 common heads: bebd167eb94d
224
224
225 % -- a -> b set (tip only)
225 % -- a -> b set (tip only)
226 comparing with b
226 comparing with b
227 query 1; heads
227 query 1; heads
228 searching for changes
228 searching for changes
229 taking quick initial sample
229 taking quick initial sample
230 searching: 2 queries
230 searching: 2 queries
231 query 2; still undecided: 31, sample size is: 31
231 query 2; still undecided: 31, sample size is: 31
232 2 total queries in *.????s (glob)
232 2 total queries in *.????s (glob)
233 elapsed time: * seconds (glob)
233 elapsed time: * seconds (glob)
234 heads summary:
234 heads summary:
235 total common heads: 1
235 total common heads: 1
236 also local heads: 0
236 also local heads: 0
237 also remote heads: 0
237 also remote heads: 0
238 both: 0
238 both: 0
239 local heads: 2
239 local heads: 2
240 common: 0
240 common: 0
241 missing: 2
241 missing: 2
242 remote heads: 1
242 remote heads: 1
243 common: 0
243 common: 0
244 unknown: 1
244 unknown: 1
245 local changesets: 35
245 local changesets: 35
246 common: 2
246 common: 2
247 missing: 33
247 missing: 33
248 common heads: 66f7d451a68b
248 common heads: 66f7d451a68b
249
249
250 % -- b -> a tree
250 % -- b -> a tree
251 comparing with a
251 comparing with a
252 searching for changes
252 searching for changes
253 unpruned common: 66f7d451a68b bebd167eb94d
253 unpruned common: 66f7d451a68b bebd167eb94d
254 elapsed time: * seconds (glob)
254 elapsed time: * seconds (glob)
255 heads summary:
255 heads summary:
256 total common heads: 1
256 total common heads: 1
257 also local heads: 0
257 also local heads: 0
258 also remote heads: 1
258 also remote heads: 1
259 both: 0
259 both: 0
260 local heads: 1
260 local heads: 1
261 common: 0
261 common: 0
262 missing: 1
262 missing: 1
263 remote heads: 2
263 remote heads: 2
264 common: 1
264 common: 1
265 unknown: 1
265 unknown: 1
266 local changesets: 8
266 local changesets: 8
267 common: 5
267 common: 5
268 missing: 3
268 missing: 3
269 common heads: bebd167eb94d
269 common heads: bebd167eb94d
270
270
271 % -- b -> a set
271 % -- b -> a set
272 comparing with a
272 comparing with a
273 query 1; heads
273 query 1; heads
274 searching for changes
274 searching for changes
275 taking initial sample
275 taking initial sample
276 searching: 2 queries
276 searching: 2 queries
277 query 2; still undecided: 2, sample size is: 2
277 query 2; still undecided: 2, sample size is: 2
278 2 total queries in *.????s (glob)
278 2 total queries in *.????s (glob)
279 elapsed time: * seconds (glob)
279 elapsed time: * seconds (glob)
280 heads summary:
280 heads summary:
281 total common heads: 1
281 total common heads: 1
282 also local heads: 0
282 also local heads: 0
283 also remote heads: 1
283 also remote heads: 1
284 both: 0
284 both: 0
285 local heads: 1
285 local heads: 1
286 common: 0
286 common: 0
287 missing: 1
287 missing: 1
288 remote heads: 2
288 remote heads: 2
289 common: 1
289 common: 1
290 unknown: 1
290 unknown: 1
291 local changesets: 8
291 local changesets: 8
292 common: 5
292 common: 5
293 missing: 3
293 missing: 3
294 common heads: bebd167eb94d
294 common heads: bebd167eb94d
295
295
296 % -- b -> a set (tip only)
296 % -- b -> a set (tip only)
297 comparing with a
297 comparing with a
298 query 1; heads
298 query 1; heads
299 searching for changes
299 searching for changes
300 taking initial sample
300 taking initial sample
301 searching: 2 queries
301 searching: 2 queries
302 query 2; still undecided: 2, sample size is: 2
302 query 2; still undecided: 2, sample size is: 2
303 2 total queries in *.????s (glob)
303 2 total queries in *.????s (glob)
304 elapsed time: * seconds (glob)
304 elapsed time: * seconds (glob)
305 heads summary:
305 heads summary:
306 total common heads: 1
306 total common heads: 1
307 also local heads: 0
307 also local heads: 0
308 also remote heads: 1
308 also remote heads: 1
309 both: 0
309 both: 0
310 local heads: 1
310 local heads: 1
311 common: 0
311 common: 0
312 missing: 1
312 missing: 1
313 remote heads: 2
313 remote heads: 2
314 common: 1
314 common: 1
315 unknown: 1
315 unknown: 1
316 local changesets: 8
316 local changesets: 8
317 common: 5
317 common: 5
318 missing: 3
318 missing: 3
319 common heads: bebd167eb94d
319 common heads: bebd167eb94d
320
320
321 Both sides many new with stub:
321 Both sides many new with stub:
322
322
323 $ testdesc '-ra1 -ra2' '-rb' '
323 $ testdesc '-ra1 -ra2' '-rb' '
324 > +2:f +2:a1 +30 :b
324 > +2:f +2:a1 +30 :b
325 > <f +30 :a2'
325 > <f +30 :a2'
326
326
327 % -- a -> b tree
327 % -- a -> b tree
328 comparing with b
328 comparing with b
329 searching for changes
329 searching for changes
330 unpruned common: 2dc09a01254d
330 unpruned common: 2dc09a01254d
331 elapsed time: * seconds (glob)
331 elapsed time: * seconds (glob)
332 heads summary:
332 heads summary:
333 total common heads: 1
333 total common heads: 1
334 also local heads: 1
334 also local heads: 1
335 also remote heads: 0
335 also remote heads: 0
336 both: 0
336 both: 0
337 local heads: 2
337 local heads: 2
338 common: 1
338 common: 1
339 missing: 1
339 missing: 1
340 remote heads: 1
340 remote heads: 1
341 common: 0
341 common: 0
342 unknown: 1
342 unknown: 1
343 local changesets: 34
343 local changesets: 34
344 common: 4
344 common: 4
345 missing: 30
345 missing: 30
346 common heads: 2dc09a01254d
346 common heads: 2dc09a01254d
347
347
348 % -- a -> b set
348 % -- a -> b set
349 comparing with b
349 comparing with b
350 query 1; heads
350 query 1; heads
351 searching for changes
351 searching for changes
352 taking initial sample
352 taking initial sample
353 searching: 2 queries
353 searching: 2 queries
354 query 2; still undecided: 29, sample size is: 29
354 query 2; still undecided: 29, sample size is: 29
355 2 total queries in *.????s (glob)
355 2 total queries in *.????s (glob)
356 elapsed time: * seconds (glob)
356 elapsed time: * seconds (glob)
357 heads summary:
357 heads summary:
358 total common heads: 1
358 total common heads: 1
359 also local heads: 1
359 also local heads: 1
360 also remote heads: 0
360 also remote heads: 0
361 both: 0
361 both: 0
362 local heads: 2
362 local heads: 2
363 common: 1
363 common: 1
364 missing: 1
364 missing: 1
365 remote heads: 1
365 remote heads: 1
366 common: 0
366 common: 0
367 unknown: 1
367 unknown: 1
368 local changesets: 34
368 local changesets: 34
369 common: 4
369 common: 4
370 missing: 30
370 missing: 30
371 common heads: 2dc09a01254d
371 common heads: 2dc09a01254d
372
372
373 % -- a -> b set (tip only)
373 % -- a -> b set (tip only)
374 comparing with b
374 comparing with b
375 query 1; heads
375 query 1; heads
376 searching for changes
376 searching for changes
377 taking quick initial sample
377 taking quick initial sample
378 searching: 2 queries
378 searching: 2 queries
379 query 2; still undecided: 31, sample size is: 31
379 query 2; still undecided: 31, sample size is: 31
380 2 total queries in *.????s (glob)
380 2 total queries in *.????s (glob)
381 elapsed time: * seconds (glob)
381 elapsed time: * seconds (glob)
382 heads summary:
382 heads summary:
383 total common heads: 1
383 total common heads: 1
384 also local heads: 0
384 also local heads: 0
385 also remote heads: 0
385 also remote heads: 0
386 both: 0
386 both: 0
387 local heads: 2
387 local heads: 2
388 common: 0
388 common: 0
389 missing: 2
389 missing: 2
390 remote heads: 1
390 remote heads: 1
391 common: 0
391 common: 0
392 unknown: 1
392 unknown: 1
393 local changesets: 34
393 local changesets: 34
394 common: 2
394 common: 2
395 missing: 32
395 missing: 32
396 common heads: 66f7d451a68b
396 common heads: 66f7d451a68b
397
397
398 % -- b -> a tree
398 % -- b -> a tree
399 comparing with a
399 comparing with a
400 searching for changes
400 searching for changes
401 unpruned common: 2dc09a01254d 66f7d451a68b
401 unpruned common: 2dc09a01254d 66f7d451a68b
402 elapsed time: * seconds (glob)
402 elapsed time: * seconds (glob)
403 heads summary:
403 heads summary:
404 total common heads: 1
404 total common heads: 1
405 also local heads: 0
405 also local heads: 0
406 also remote heads: 1
406 also remote heads: 1
407 both: 0
407 both: 0
408 local heads: 1
408 local heads: 1
409 common: 0
409 common: 0
410 missing: 1
410 missing: 1
411 remote heads: 2
411 remote heads: 2
412 common: 1
412 common: 1
413 unknown: 1
413 unknown: 1
414 local changesets: 34
414 local changesets: 34
415 common: 4
415 common: 4
416 missing: 30
416 missing: 30
417 common heads: 2dc09a01254d
417 common heads: 2dc09a01254d
418
418
419 % -- b -> a set
419 % -- b -> a set
420 comparing with a
420 comparing with a
421 query 1; heads
421 query 1; heads
422 searching for changes
422 searching for changes
423 taking initial sample
423 taking initial sample
424 searching: 2 queries
424 searching: 2 queries
425 query 2; still undecided: 29, sample size is: 29
425 query 2; still undecided: 29, sample size is: 29
426 2 total queries in *.????s (glob)
426 2 total queries in *.????s (glob)
427 elapsed time: * seconds (glob)
427 elapsed time: * seconds (glob)
428 heads summary:
428 heads summary:
429 total common heads: 1
429 total common heads: 1
430 also local heads: 0
430 also local heads: 0
431 also remote heads: 1
431 also remote heads: 1
432 both: 0
432 both: 0
433 local heads: 1
433 local heads: 1
434 common: 0
434 common: 0
435 missing: 1
435 missing: 1
436 remote heads: 2
436 remote heads: 2
437 common: 1
437 common: 1
438 unknown: 1
438 unknown: 1
439 local changesets: 34
439 local changesets: 34
440 common: 4
440 common: 4
441 missing: 30
441 missing: 30
442 common heads: 2dc09a01254d
442 common heads: 2dc09a01254d
443
443
444 % -- b -> a set (tip only)
444 % -- b -> a set (tip only)
445 comparing with a
445 comparing with a
446 query 1; heads
446 query 1; heads
447 searching for changes
447 searching for changes
448 taking initial sample
448 taking initial sample
449 searching: 2 queries
449 searching: 2 queries
450 query 2; still undecided: 29, sample size is: 29
450 query 2; still undecided: 29, sample size is: 29
451 2 total queries in *.????s (glob)
451 2 total queries in *.????s (glob)
452 elapsed time: * seconds (glob)
452 elapsed time: * seconds (glob)
453 heads summary:
453 heads summary:
454 total common heads: 1
454 total common heads: 1
455 also local heads: 0
455 also local heads: 0
456 also remote heads: 1
456 also remote heads: 1
457 both: 0
457 both: 0
458 local heads: 1
458 local heads: 1
459 common: 0
459 common: 0
460 missing: 1
460 missing: 1
461 remote heads: 2
461 remote heads: 2
462 common: 1
462 common: 1
463 unknown: 1
463 unknown: 1
464 local changesets: 34
464 local changesets: 34
465 common: 4
465 common: 4
466 missing: 30
466 missing: 30
467 common heads: 2dc09a01254d
467 common heads: 2dc09a01254d
468
468
469
469
470 Both many new:
470 Both many new:
471
471
472 $ testdesc '-ra' '-rb' '
472 $ testdesc '-ra' '-rb' '
473 > +2:f +30 :b
473 > +2:f +30 :b
474 > <f +30 :a'
474 > <f +30 :a'
475
475
476 % -- a -> b tree
476 % -- a -> b tree
477 comparing with b
477 comparing with b
478 searching for changes
478 searching for changes
479 unpruned common: 66f7d451a68b
479 unpruned common: 66f7d451a68b
480 elapsed time: * seconds (glob)
480 elapsed time: * seconds (glob)
481 heads summary:
481 heads summary:
482 total common heads: 1
482 total common heads: 1
483 also local heads: 0
483 also local heads: 0
484 also remote heads: 0
484 also remote heads: 0
485 both: 0
485 both: 0
486 local heads: 1
486 local heads: 1
487 common: 0
487 common: 0
488 missing: 1
488 missing: 1
489 remote heads: 1
489 remote heads: 1
490 common: 0
490 common: 0
491 unknown: 1
491 unknown: 1
492 local changesets: 32
492 local changesets: 32
493 common: 2
493 common: 2
494 missing: 30
494 missing: 30
495 common heads: 66f7d451a68b
495 common heads: 66f7d451a68b
496
496
497 % -- a -> b set
497 % -- a -> b set
498 comparing with b
498 comparing with b
499 query 1; heads
499 query 1; heads
500 searching for changes
500 searching for changes
501 taking quick initial sample
501 taking quick initial sample
502 searching: 2 queries
502 searching: 2 queries
503 query 2; still undecided: 31, sample size is: 31
503 query 2; still undecided: 31, sample size is: 31
504 2 total queries in *.????s (glob)
504 2 total queries in *.????s (glob)
505 elapsed time: * seconds (glob)
505 elapsed time: * seconds (glob)
506 heads summary:
506 heads summary:
507 total common heads: 1
507 total common heads: 1
508 also local heads: 0
508 also local heads: 0
509 also remote heads: 0
509 also remote heads: 0
510 both: 0
510 both: 0
511 local heads: 1
511 local heads: 1
512 common: 0
512 common: 0
513 missing: 1
513 missing: 1
514 remote heads: 1
514 remote heads: 1
515 common: 0
515 common: 0
516 unknown: 1
516 unknown: 1
517 local changesets: 32
517 local changesets: 32
518 common: 2
518 common: 2
519 missing: 30
519 missing: 30
520 common heads: 66f7d451a68b
520 common heads: 66f7d451a68b
521
521
522 % -- a -> b set (tip only)
522 % -- a -> b set (tip only)
523 comparing with b
523 comparing with b
524 query 1; heads
524 query 1; heads
525 searching for changes
525 searching for changes
526 taking quick initial sample
526 taking quick initial sample
527 searching: 2 queries
527 searching: 2 queries
528 query 2; still undecided: 31, sample size is: 31
528 query 2; still undecided: 31, sample size is: 31
529 2 total queries in *.????s (glob)
529 2 total queries in *.????s (glob)
530 elapsed time: * seconds (glob)
530 elapsed time: * seconds (glob)
531 heads summary:
531 heads summary:
532 total common heads: 1
532 total common heads: 1
533 also local heads: 0
533 also local heads: 0
534 also remote heads: 0
534 also remote heads: 0
535 both: 0
535 both: 0
536 local heads: 1
536 local heads: 1
537 common: 0
537 common: 0
538 missing: 1
538 missing: 1
539 remote heads: 1
539 remote heads: 1
540 common: 0
540 common: 0
541 unknown: 1
541 unknown: 1
542 local changesets: 32
542 local changesets: 32
543 common: 2
543 common: 2
544 missing: 30
544 missing: 30
545 common heads: 66f7d451a68b
545 common heads: 66f7d451a68b
546
546
547 % -- b -> a tree
547 % -- b -> a tree
548 comparing with a
548 comparing with a
549 searching for changes
549 searching for changes
550 unpruned common: 66f7d451a68b
550 unpruned common: 66f7d451a68b
551 elapsed time: * seconds (glob)
551 elapsed time: * seconds (glob)
552 heads summary:
552 heads summary:
553 total common heads: 1
553 total common heads: 1
554 also local heads: 0
554 also local heads: 0
555 also remote heads: 0
555 also remote heads: 0
556 both: 0
556 both: 0
557 local heads: 1
557 local heads: 1
558 common: 0
558 common: 0
559 missing: 1
559 missing: 1
560 remote heads: 1
560 remote heads: 1
561 common: 0
561 common: 0
562 unknown: 1
562 unknown: 1
563 local changesets: 32
563 local changesets: 32
564 common: 2
564 common: 2
565 missing: 30
565 missing: 30
566 common heads: 66f7d451a68b
566 common heads: 66f7d451a68b
567
567
568 % -- b -> a set
568 % -- b -> a set
569 comparing with a
569 comparing with a
570 query 1; heads
570 query 1; heads
571 searching for changes
571 searching for changes
572 taking quick initial sample
572 taking quick initial sample
573 searching: 2 queries
573 searching: 2 queries
574 query 2; still undecided: 31, sample size is: 31
574 query 2; still undecided: 31, sample size is: 31
575 2 total queries in *.????s (glob)
575 2 total queries in *.????s (glob)
576 elapsed time: * seconds (glob)
576 elapsed time: * seconds (glob)
577 heads summary:
577 heads summary:
578 total common heads: 1
578 total common heads: 1
579 also local heads: 0
579 also local heads: 0
580 also remote heads: 0
580 also remote heads: 0
581 both: 0
581 both: 0
582 local heads: 1
582 local heads: 1
583 common: 0
583 common: 0
584 missing: 1
584 missing: 1
585 remote heads: 1
585 remote heads: 1
586 common: 0
586 common: 0
587 unknown: 1
587 unknown: 1
588 local changesets: 32
588 local changesets: 32
589 common: 2
589 common: 2
590 missing: 30
590 missing: 30
591 common heads: 66f7d451a68b
591 common heads: 66f7d451a68b
592
592
593 % -- b -> a set (tip only)
593 % -- b -> a set (tip only)
594 comparing with a
594 comparing with a
595 query 1; heads
595 query 1; heads
596 searching for changes
596 searching for changes
597 taking quick initial sample
597 taking quick initial sample
598 searching: 2 queries
598 searching: 2 queries
599 query 2; still undecided: 31, sample size is: 31
599 query 2; still undecided: 31, sample size is: 31
600 2 total queries in *.????s (glob)
600 2 total queries in *.????s (glob)
601 elapsed time: * seconds (glob)
601 elapsed time: * seconds (glob)
602 heads summary:
602 heads summary:
603 total common heads: 1
603 total common heads: 1
604 also local heads: 0
604 also local heads: 0
605 also remote heads: 0
605 also remote heads: 0
606 both: 0
606 both: 0
607 local heads: 1
607 local heads: 1
608 common: 0
608 common: 0
609 missing: 1
609 missing: 1
610 remote heads: 1
610 remote heads: 1
611 common: 0
611 common: 0
612 unknown: 1
612 unknown: 1
613 local changesets: 32
613 local changesets: 32
614 common: 2
614 common: 2
615 missing: 30
615 missing: 30
616 common heads: 66f7d451a68b
616 common heads: 66f7d451a68b
617
617
618
618
619 Both many new skewed:
619 Both many new skewed:
620
620
621 $ testdesc '-ra' '-rb' '
621 $ testdesc '-ra' '-rb' '
622 > +2:f +30 :b
622 > +2:f +30 :b
623 > <f +50 :a'
623 > <f +50 :a'
624
624
625 % -- a -> b tree
625 % -- a -> b tree
626 comparing with b
626 comparing with b
627 searching for changes
627 searching for changes
628 unpruned common: 66f7d451a68b
628 unpruned common: 66f7d451a68b
629 elapsed time: * seconds (glob)
629 elapsed time: * seconds (glob)
630 heads summary:
630 heads summary:
631 total common heads: 1
631 total common heads: 1
632 also local heads: 0
632 also local heads: 0
633 also remote heads: 0
633 also remote heads: 0
634 both: 0
634 both: 0
635 local heads: 1
635 local heads: 1
636 common: 0
636 common: 0
637 missing: 1
637 missing: 1
638 remote heads: 1
638 remote heads: 1
639 common: 0
639 common: 0
640 unknown: 1
640 unknown: 1
641 local changesets: 52
641 local changesets: 52
642 common: 2
642 common: 2
643 missing: 50
643 missing: 50
644 common heads: 66f7d451a68b
644 common heads: 66f7d451a68b
645
645
646 % -- a -> b set
646 % -- a -> b set
647 comparing with b
647 comparing with b
648 query 1; heads
648 query 1; heads
649 searching for changes
649 searching for changes
650 taking quick initial sample
650 taking quick initial sample
651 searching: 2 queries
651 searching: 2 queries
652 query 2; still undecided: 51, sample size is: 51
652 query 2; still undecided: 51, sample size is: 51
653 2 total queries in *.????s (glob)
653 2 total queries in *.????s (glob)
654 elapsed time: * seconds (glob)
654 elapsed time: * seconds (glob)
655 heads summary:
655 heads summary:
656 total common heads: 1
656 total common heads: 1
657 also local heads: 0
657 also local heads: 0
658 also remote heads: 0
658 also remote heads: 0
659 both: 0
659 both: 0
660 local heads: 1
660 local heads: 1
661 common: 0
661 common: 0
662 missing: 1
662 missing: 1
663 remote heads: 1
663 remote heads: 1
664 common: 0
664 common: 0
665 unknown: 1
665 unknown: 1
666 local changesets: 52
666 local changesets: 52
667 common: 2
667 common: 2
668 missing: 50
668 missing: 50
669 common heads: 66f7d451a68b
669 common heads: 66f7d451a68b
670
670
671 % -- a -> b set (tip only)
671 % -- a -> b set (tip only)
672 comparing with b
672 comparing with b
673 query 1; heads
673 query 1; heads
674 searching for changes
674 searching for changes
675 taking quick initial sample
675 taking quick initial sample
676 searching: 2 queries
676 searching: 2 queries
677 query 2; still undecided: 51, sample size is: 51
677 query 2; still undecided: 51, sample size is: 51
678 2 total queries in *.????s (glob)
678 2 total queries in *.????s (glob)
679 elapsed time: * seconds (glob)
679 elapsed time: * seconds (glob)
680 heads summary:
680 heads summary:
681 total common heads: 1
681 total common heads: 1
682 also local heads: 0
682 also local heads: 0
683 also remote heads: 0
683 also remote heads: 0
684 both: 0
684 both: 0
685 local heads: 1
685 local heads: 1
686 common: 0
686 common: 0
687 missing: 1
687 missing: 1
688 remote heads: 1
688 remote heads: 1
689 common: 0
689 common: 0
690 unknown: 1
690 unknown: 1
691 local changesets: 52
691 local changesets: 52
692 common: 2
692 common: 2
693 missing: 50
693 missing: 50
694 common heads: 66f7d451a68b
694 common heads: 66f7d451a68b
695
695
696 % -- b -> a tree
696 % -- b -> a tree
697 comparing with a
697 comparing with a
698 searching for changes
698 searching for changes
699 unpruned common: 66f7d451a68b
699 unpruned common: 66f7d451a68b
700 elapsed time: * seconds (glob)
700 elapsed time: * seconds (glob)
701 heads summary:
701 heads summary:
702 total common heads: 1
702 total common heads: 1
703 also local heads: 0
703 also local heads: 0
704 also remote heads: 0
704 also remote heads: 0
705 both: 0
705 both: 0
706 local heads: 1
706 local heads: 1
707 common: 0
707 common: 0
708 missing: 1
708 missing: 1
709 remote heads: 1
709 remote heads: 1
710 common: 0
710 common: 0
711 unknown: 1
711 unknown: 1
712 local changesets: 32
712 local changesets: 32
713 common: 2
713 common: 2
714 missing: 30
714 missing: 30
715 common heads: 66f7d451a68b
715 common heads: 66f7d451a68b
716
716
717 % -- b -> a set
717 % -- b -> a set
718 comparing with a
718 comparing with a
719 query 1; heads
719 query 1; heads
720 searching for changes
720 searching for changes
721 taking quick initial sample
721 taking quick initial sample
722 searching: 2 queries
722 searching: 2 queries
723 query 2; still undecided: 31, sample size is: 31
723 query 2; still undecided: 31, sample size is: 31
724 2 total queries in *.????s (glob)
724 2 total queries in *.????s (glob)
725 elapsed time: * seconds (glob)
725 elapsed time: * seconds (glob)
726 heads summary:
726 heads summary:
727 total common heads: 1
727 total common heads: 1
728 also local heads: 0
728 also local heads: 0
729 also remote heads: 0
729 also remote heads: 0
730 both: 0
730 both: 0
731 local heads: 1
731 local heads: 1
732 common: 0
732 common: 0
733 missing: 1
733 missing: 1
734 remote heads: 1
734 remote heads: 1
735 common: 0
735 common: 0
736 unknown: 1
736 unknown: 1
737 local changesets: 32
737 local changesets: 32
738 common: 2
738 common: 2
739 missing: 30
739 missing: 30
740 common heads: 66f7d451a68b
740 common heads: 66f7d451a68b
741
741
742 % -- b -> a set (tip only)
742 % -- b -> a set (tip only)
743 comparing with a
743 comparing with a
744 query 1; heads
744 query 1; heads
745 searching for changes
745 searching for changes
746 taking quick initial sample
746 taking quick initial sample
747 searching: 2 queries
747 searching: 2 queries
748 query 2; still undecided: 31, sample size is: 31
748 query 2; still undecided: 31, sample size is: 31
749 2 total queries in *.????s (glob)
749 2 total queries in *.????s (glob)
750 elapsed time: * seconds (glob)
750 elapsed time: * seconds (glob)
751 heads summary:
751 heads summary:
752 total common heads: 1
752 total common heads: 1
753 also local heads: 0
753 also local heads: 0
754 also remote heads: 0
754 also remote heads: 0
755 both: 0
755 both: 0
756 local heads: 1
756 local heads: 1
757 common: 0
757 common: 0
758 missing: 1
758 missing: 1
759 remote heads: 1
759 remote heads: 1
760 common: 0
760 common: 0
761 unknown: 1
761 unknown: 1
762 local changesets: 32
762 local changesets: 32
763 common: 2
763 common: 2
764 missing: 30
764 missing: 30
765 common heads: 66f7d451a68b
765 common heads: 66f7d451a68b
766
766
767
767
768 Both many new on top of long history:
768 Both many new on top of long history:
769
769
770 $ testdesc '-ra' '-rb' '
770 $ testdesc '-ra' '-rb' '
771 > +1000:f +30 :b
771 > +1000:f +30 :b
772 > <f +50 :a'
772 > <f +50 :a'
773
773
774 % -- a -> b tree
774 % -- a -> b tree
775 comparing with b
775 comparing with b
776 searching for changes
776 searching for changes
777 unpruned common: 7ead0cba2838
777 unpruned common: 7ead0cba2838
778 elapsed time: * seconds (glob)
778 elapsed time: * seconds (glob)
779 heads summary:
779 heads summary:
780 total common heads: 1
780 total common heads: 1
781 also local heads: 0
781 also local heads: 0
782 also remote heads: 0
782 also remote heads: 0
783 both: 0
783 both: 0
784 local heads: 1
784 local heads: 1
785 common: 0
785 common: 0
786 missing: 1
786 missing: 1
787 remote heads: 1
787 remote heads: 1
788 common: 0
788 common: 0
789 unknown: 1
789 unknown: 1
790 local changesets: 1050
790 local changesets: 1050
791 common: 1000
791 common: 1000
792 missing: 50
792 missing: 50
793 common heads: 7ead0cba2838
793 common heads: 7ead0cba2838
794
794
795 % -- a -> b set
795 % -- a -> b set
796 comparing with b
796 comparing with b
797 query 1; heads
797 query 1; heads
798 searching for changes
798 searching for changes
799 taking quick initial sample
799 taking quick initial sample
800 searching: 2 queries
800 searching: 2 queries
801 query 2; still undecided: 1049, sample size is: 11
801 query 2; still undecided: 1049, sample size is: 11
802 sampling from both directions
802 sampling from both directions
803 searching: 3 queries
803 searching: 3 queries
804 query 3; still undecided: 31, sample size is: 31
804 query 3; still undecided: 31, sample size is: 31
805 3 total queries in *.????s (glob)
805 3 total queries in *.????s (glob)
806 elapsed time: * seconds (glob)
806 elapsed time: * seconds (glob)
807 heads summary:
807 heads summary:
808 total common heads: 1
808 total common heads: 1
809 also local heads: 0
809 also local heads: 0
810 also remote heads: 0
810 also remote heads: 0
811 both: 0
811 both: 0
812 local heads: 1
812 local heads: 1
813 common: 0
813 common: 0
814 missing: 1
814 missing: 1
815 remote heads: 1
815 remote heads: 1
816 common: 0
816 common: 0
817 unknown: 1
817 unknown: 1
818 local changesets: 1050
818 local changesets: 1050
819 common: 1000
819 common: 1000
820 missing: 50
820 missing: 50
821 common heads: 7ead0cba2838
821 common heads: 7ead0cba2838
822
822
823 % -- a -> b set (tip only)
823 % -- a -> b set (tip only)
824 comparing with b
824 comparing with b
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: 1049, sample size is: 11
829 query 2; still undecided: 1049, sample size is: 11
830 sampling from both directions
830 sampling from both directions
831 searching: 3 queries
831 searching: 3 queries
832 query 3; still undecided: 31, sample size is: 31
832 query 3; still undecided: 31, sample size is: 31
833 3 total queries in *.????s (glob)
833 3 total queries in *.????s (glob)
834 elapsed time: * seconds (glob)
834 elapsed time: * seconds (glob)
835 heads summary:
835 heads summary:
836 total common heads: 1
836 total common heads: 1
837 also local heads: 0
837 also local heads: 0
838 also remote heads: 0
838 also remote heads: 0
839 both: 0
839 both: 0
840 local heads: 1
840 local heads: 1
841 common: 0
841 common: 0
842 missing: 1
842 missing: 1
843 remote heads: 1
843 remote heads: 1
844 common: 0
844 common: 0
845 unknown: 1
845 unknown: 1
846 local changesets: 1050
846 local changesets: 1050
847 common: 1000
847 common: 1000
848 missing: 50
848 missing: 50
849 common heads: 7ead0cba2838
849 common heads: 7ead0cba2838
850
850
851 % -- b -> a tree
851 % -- b -> a tree
852 comparing with a
852 comparing with a
853 searching for changes
853 searching for changes
854 unpruned common: 7ead0cba2838
854 unpruned common: 7ead0cba2838
855 elapsed time: * seconds (glob)
855 elapsed time: * seconds (glob)
856 heads summary:
856 heads summary:
857 total common heads: 1
857 total common heads: 1
858 also local heads: 0
858 also local heads: 0
859 also remote heads: 0
859 also remote heads: 0
860 both: 0
860 both: 0
861 local heads: 1
861 local heads: 1
862 common: 0
862 common: 0
863 missing: 1
863 missing: 1
864 remote heads: 1
864 remote heads: 1
865 common: 0
865 common: 0
866 unknown: 1
866 unknown: 1
867 local changesets: 1030
867 local changesets: 1030
868 common: 1000
868 common: 1000
869 missing: 30
869 missing: 30
870 common heads: 7ead0cba2838
870 common heads: 7ead0cba2838
871
871
872 % -- b -> a set
872 % -- b -> a set
873 comparing with a
873 comparing with a
874 query 1; heads
874 query 1; heads
875 searching for changes
875 searching for changes
876 taking quick initial sample
876 taking quick initial sample
877 searching: 2 queries
877 searching: 2 queries
878 query 2; still undecided: 1029, sample size is: 11
878 query 2; still undecided: 1029, sample size is: 11
879 sampling from both directions
879 sampling from both directions
880 searching: 3 queries
880 searching: 3 queries
881 query 3; still undecided: 15, sample size is: 15
881 query 3; still undecided: 15, sample size is: 15
882 3 total queries in *.????s (glob)
882 3 total queries in *.????s (glob)
883 elapsed time: * seconds (glob)
883 elapsed time: * seconds (glob)
884 heads summary:
884 heads summary:
885 total common heads: 1
885 total common heads: 1
886 also local heads: 0
886 also local heads: 0
887 also remote heads: 0
887 also remote heads: 0
888 both: 0
888 both: 0
889 local heads: 1
889 local heads: 1
890 common: 0
890 common: 0
891 missing: 1
891 missing: 1
892 remote heads: 1
892 remote heads: 1
893 common: 0
893 common: 0
894 unknown: 1
894 unknown: 1
895 local changesets: 1030
895 local changesets: 1030
896 common: 1000
896 common: 1000
897 missing: 30
897 missing: 30
898 common heads: 7ead0cba2838
898 common heads: 7ead0cba2838
899
899
900 % -- b -> a set (tip only)
900 % -- b -> a set (tip only)
901 comparing with a
901 comparing with a
902 query 1; heads
902 query 1; heads
903 searching for changes
903 searching for changes
904 taking quick initial sample
904 taking quick initial sample
905 searching: 2 queries
905 searching: 2 queries
906 query 2; still undecided: 1029, sample size is: 11
906 query 2; still undecided: 1029, sample size is: 11
907 sampling from both directions
907 sampling from both directions
908 searching: 3 queries
908 searching: 3 queries
909 query 3; still undecided: 15, sample size is: 15
909 query 3; still undecided: 15, sample size is: 15
910 3 total queries in *.????s (glob)
910 3 total queries in *.????s (glob)
911 elapsed time: * seconds (glob)
911 elapsed time: * seconds (glob)
912 heads summary:
912 heads summary:
913 total common heads: 1
913 total common heads: 1
914 also local heads: 0
914 also local heads: 0
915 also remote heads: 0
915 also remote heads: 0
916 both: 0
916 both: 0
917 local heads: 1
917 local heads: 1
918 common: 0
918 common: 0
919 missing: 1
919 missing: 1
920 remote heads: 1
920 remote heads: 1
921 common: 0
921 common: 0
922 unknown: 1
922 unknown: 1
923 local changesets: 1030
923 local changesets: 1030
924 common: 1000
924 common: 1000
925 missing: 30
925 missing: 30
926 common heads: 7ead0cba2838
926 common heads: 7ead0cba2838
927
927
928
928
929 One with >200 heads. We now switch to send them all in the initial roundtrip, but still do sampling for the later request.
929 One with >200 heads. We now switch to send them all in the initial roundtrip, but still do sampling for the later request.
930
930
931 $ hg init manyheads
931 $ hg init manyheads
932 $ cd manyheads
932 $ cd manyheads
933 $ echo "+300:r @a" >dagdesc
933 $ echo "+300:r @a" >dagdesc
934 $ 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
934 $ 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
935 $ 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
935 $ 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
936 $ 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
936 $ 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
937 $ 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
937 $ 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
938 $ 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
938 $ 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
939 $ 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
939 $ 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
940 $ 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
940 $ 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
941 $ 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
941 $ 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
942 $ 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
942 $ 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
943 $ 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
943 $ 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
944 $ 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
944 $ 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
945 $ 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
945 $ 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
946 $ 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
946 $ 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
947 $ echo "@b *r+3" >>dagdesc # one more head
947 $ echo "@b *r+3" >>dagdesc # one more head
948 $ hg debugbuilddag <dagdesc
948 $ hg debugbuilddag <dagdesc
949 reading DAG from stdin
949 reading DAG from stdin
950
950
951 $ hg heads -t --template . | wc -c
951 $ hg heads -t --template . | wc -c
952 \s*261 (re)
952 \s*261 (re)
953
953
954 $ hg clone -b a . a
954 $ hg clone -b a . a
955 adding changesets
955 adding changesets
956 adding manifests
956 adding manifests
957 adding file changes
957 adding file changes
958 added 1340 changesets with 0 changes to 0 files (+259 heads)
958 added 1340 changesets with 0 changes to 0 files (+259 heads)
959 new changesets 1ea73414a91b:1c51e2c80832
959 new changesets 1ea73414a91b:1c51e2c80832
960 updating to branch a
960 updating to branch a
961 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
961 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
962 $ hg clone -b b . b
962 $ hg clone -b b . b
963 adding changesets
963 adding changesets
964 adding manifests
964 adding manifests
965 adding file changes
965 adding file changes
966 added 304 changesets with 0 changes to 0 files
966 added 304 changesets with 0 changes to 0 files
967 new changesets 1ea73414a91b:513314ca8b3a
967 new changesets 1ea73414a91b:513314ca8b3a
968 updating to branch b
968 updating to branch b
969 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
969 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
970
970
971 $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true
971 $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true --config devel.discovery.randomize=false
972 comparing with b
972 comparing with b
973 query 1; heads
973 query 1; heads
974 searching for changes
974 searching for changes
975 taking quick initial sample
975 taking quick initial sample
976 searching: 2 queries
976 searching: 2 queries
977 query 2; still undecided: 1080, sample size is: 100
977 query 2; still undecided: 1080, sample size is: 100
978 sampling from both directions
978 sampling from both directions
979 searching: 3 queries
979 searching: 3 queries
980 query 3; still undecided: 980, sample size is: 200
980 query 3; still undecided: 980, sample size is: 200
981 sampling from both directions
981 sampling from both directions
982 searching: 4 queries
982 searching: 4 queries
983 query 4; still undecided: 435, sample size is: 210 (no-py3 !)
983 query 4; still undecided: 497, sample size is: 210
984 query 4; still undecided: 430, sample size is: 210 (py3 !)
985 sampling from both directions
984 sampling from both directions
986 searching: 5 queries
985 searching: 5 queries
987 query 5; still undecided: 185, sample size is: 185 (no-py3 !)
986 query 5; still undecided: 285, sample size is: 220
988 query 5; still undecided: 187, sample size is: 187 (py3 !)
987 sampling from both directions
989 5 total queries in *.????s (glob)
988 searching: 6 queries
989 query 6; still undecided: 63, sample size is: 63
990 6 total queries in *.????s (glob)
990 elapsed time: * seconds (glob)
991 elapsed time: * seconds (glob)
991 heads summary:
992 heads summary:
992 total common heads: 1
993 total common heads: 1
993 also local heads: 0
994 also local heads: 0
994 also remote heads: 0
995 also remote heads: 0
995 both: 0
996 both: 0
996 local heads: 260
997 local heads: 260
997 common: 0
998 common: 0
998 missing: 260
999 missing: 260
999 remote heads: 1
1000 remote heads: 1
1000 common: 0
1001 common: 0
1001 unknown: 1
1002 unknown: 1
1002 local changesets: 1340
1003 local changesets: 1340
1003 common: 300
1004 common: 300
1004 missing: 1040
1005 missing: 1040
1005 common heads: 3ee37d65064a
1006 common heads: 3ee37d65064a
1006 $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true --rev tip
1007 $ hg -R a debugdiscovery b --debug --verbose --config progress.debug=true --rev tip
1007 comparing with b
1008 comparing with b
1008 query 1; heads
1009 query 1; heads
1009 searching for changes
1010 searching for changes
1010 taking quick initial sample
1011 taking quick initial sample
1011 searching: 2 queries
1012 searching: 2 queries
1012 query 2; still undecided: 303, sample size is: 9
1013 query 2; still undecided: 303, sample size is: 9
1013 sampling from both directions
1014 sampling from both directions
1014 searching: 3 queries
1015 searching: 3 queries
1015 query 3; still undecided: 3, sample size is: 3
1016 query 3; still undecided: 3, sample size is: 3
1016 3 total queries in *.????s (glob)
1017 3 total queries in *.????s (glob)
1017 elapsed time: * seconds (glob)
1018 elapsed time: * seconds (glob)
1018 heads summary:
1019 heads summary:
1019 total common heads: 1
1020 total common heads: 1
1020 also local heads: 0
1021 also local heads: 0
1021 also remote heads: 0
1022 also remote heads: 0
1022 both: 0
1023 both: 0
1023 local heads: 260
1024 local heads: 260
1024 common: 0
1025 common: 0
1025 missing: 260
1026 missing: 260
1026 remote heads: 1
1027 remote heads: 1
1027 common: 0
1028 common: 0
1028 unknown: 1
1029 unknown: 1
1029 local changesets: 1340
1030 local changesets: 1340
1030 common: 300
1031 common: 300
1031 missing: 1040
1032 missing: 1040
1032 common heads: 3ee37d65064a
1033 common heads: 3ee37d65064a
1033
1034
1034 Test actual protocol when pulling one new head in addition to common heads
1035 Test actual protocol when pulling one new head in addition to common heads
1035
1036
1036 $ hg clone -U b c
1037 $ hg clone -U b c
1037 $ hg -R c id -ir tip
1038 $ hg -R c id -ir tip
1038 513314ca8b3a
1039 513314ca8b3a
1039 $ hg -R c up -qr default
1040 $ hg -R c up -qr default
1040 $ touch c/f
1041 $ touch c/f
1041 $ hg -R c ci -Aqm "extra head"
1042 $ hg -R c ci -Aqm "extra head"
1042 $ hg -R c id -i
1043 $ hg -R c id -i
1043 e64a39e7da8b
1044 e64a39e7da8b
1044
1045
1045 $ hg serve -R c -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1046 $ hg serve -R c -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1046 $ cat hg.pid >> $DAEMON_PIDS
1047 $ cat hg.pid >> $DAEMON_PIDS
1047
1048
1048 $ hg -R b incoming http://localhost:$HGPORT/ -T '{node|short}\n'
1049 $ hg -R b incoming http://localhost:$HGPORT/ -T '{node|short}\n'
1049 comparing with http://localhost:$HGPORT/
1050 comparing with http://localhost:$HGPORT/
1050 searching for changes
1051 searching for changes
1051 e64a39e7da8b
1052 e64a39e7da8b
1052
1053
1053 $ killdaemons.py
1054 $ killdaemons.py
1054 $ cut -d' ' -f6- access.log | grep -v cmd=known # cmd=known uses random sampling
1055 $ cut -d' ' -f6- access.log | grep -v cmd=known # cmd=known uses random sampling
1055 "GET /?cmd=capabilities HTTP/1.1" 200 -
1056 "GET /?cmd=capabilities HTTP/1.1" 200 -
1056 "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
1057 "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
1057 "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
1058 "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
1058 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
1059 "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull
1059 $ cat errors.log
1060 $ cat errors.log
1060
1061
1061 $ cd ..
1062 $ cd ..
1062
1063
1063
1064
1064 Issue 4438 - test coverage for 3ef893520a85 issues.
1065 Issue 4438 - test coverage for 3ef893520a85 issues.
1065
1066
1066 $ mkdir issue4438
1067 $ mkdir issue4438
1067 $ cd issue4438
1068 $ cd issue4438
1068 #if false
1069 #if false
1069 generate new bundles:
1070 generate new bundles:
1070 $ hg init r1
1071 $ hg init r1
1071 $ 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
1072 $ 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
1072 $ hg clone -q r1 r2
1073 $ hg clone -q r1 r2
1073 $ 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
1074 $ 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
1074 $ hg -R r2 branch -q r2change && hg -R r2 ci -qmr2change
1075 $ hg -R r2 branch -q r2change && hg -R r2 ci -qmr2change
1075 $ hg -R r1 bundle -qa $TESTDIR/bundles/issue4438-r1.hg
1076 $ hg -R r1 bundle -qa $TESTDIR/bundles/issue4438-r1.hg
1076 $ hg -R r2 bundle -qa $TESTDIR/bundles/issue4438-r2.hg
1077 $ hg -R r2 bundle -qa $TESTDIR/bundles/issue4438-r2.hg
1077 #else
1078 #else
1078 use existing bundles:
1079 use existing bundles:
1079 $ hg init r1
1080 $ hg init r1
1080 $ hg -R r1 -q unbundle $TESTDIR/bundles/issue4438-r1.hg
1081 $ hg -R r1 -q unbundle $TESTDIR/bundles/issue4438-r1.hg
1081 $ hg -R r1 -q up
1082 $ hg -R r1 -q up
1082 $ hg init r2
1083 $ hg init r2
1083 $ hg -R r2 -q unbundle $TESTDIR/bundles/issue4438-r2.hg
1084 $ hg -R r2 -q unbundle $TESTDIR/bundles/issue4438-r2.hg
1084 $ hg -R r2 -q up
1085 $ hg -R r2 -q up
1085 #endif
1086 #endif
1086
1087
1087 Set iteration order could cause wrong and unstable results - fixed in 73cfaa348650:
1088 Set iteration order could cause wrong and unstable results - fixed in 73cfaa348650:
1088
1089
1089 $ hg -R r1 outgoing r2 -T'{rev} '
1090 $ hg -R r1 outgoing r2 -T'{rev} '
1090 comparing with r2
1091 comparing with r2
1091 searching for changes
1092 searching for changes
1092 101 102 103 104 105 106 107 108 109 110 (no-eol)
1093 101 102 103 104 105 106 107 108 109 110 (no-eol)
1093
1094
1094 The case where all the 'initialsamplesize' samples already were common would
1095 The case where all the 'initialsamplesize' samples already were common would
1095 give 'all remote heads known locally' without checking the remaining heads -
1096 give 'all remote heads known locally' without checking the remaining heads -
1096 fixed in 86c35b7ae300:
1097 fixed in 86c35b7ae300:
1097
1098
1098 $ cat >> $TESTTMP/unrandomsample.py << EOF
1099 > import random
1100 > def sample(population, k):
1101 > return sorted(population)[:k]
1102 > random.sample = sample
1103 > EOF
1104
1105 $ cat >> r1/.hg/hgrc << EOF
1099 $ cat >> r1/.hg/hgrc << EOF
1106 > [extensions]
1100 > [devel]
1107 > unrandomsample = $TESTTMP/unrandomsample.py
1101 > discovery.randomize = False
1108 > EOF
1102 > EOF
1109
1103
1110 $ hg -R r1 outgoing r2 -T'{rev} ' --config extensions.blackbox= \
1104 $ hg -R r1 outgoing r2 -T'{rev} ' --config extensions.blackbox= \
1111 > --config blackbox.track='command commandfinish discovery'
1105 > --config blackbox.track='command commandfinish discovery'
1112 comparing with r2
1106 comparing with r2
1113 searching for changes
1107 searching for changes
1114 101 102 103 104 105 106 107 108 109 110 (no-eol)
1108 101 102 103 104 105 106 107 108 109 110 (no-eol)
1115 $ hg -R r1 --config extensions.blackbox= blackbox --config blackbox.track=
1109 $ hg -R r1 --config extensions.blackbox= blackbox --config blackbox.track=
1116 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> serve --cmdserver chgunix * (glob) (chg !)
1110 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> serve --cmdserver chgunix * (glob) (chg !)
1117 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* (glob)
1111 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* (glob)
1118 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> found 101 common and 1 unknown server heads, 1 roundtrips in *.????s (glob)
1112 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> found 101 common and 1 unknown server heads, 1 roundtrips in *.????s (glob)
1119 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* exited 0 after *.?? seconds (glob)
1113 * @5d0b986a083e0d91f116de4691e2aaa54d5bbec0 (*)> -R r1 outgoing r2 *-T{rev} * --config *extensions.blackbox=* exited 0 after *.?? seconds (glob)
1120 $ cd ..
1114 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now