Show More
@@ -1,1427 +1,1427 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 | coreconfigitem('alias', '.*', |
|
116 | coreconfigitem('alias', '.*', | |
117 | default=dynamicdefault, |
|
117 | default=dynamicdefault, | |
118 | generic=True, |
|
118 | generic=True, | |
119 | ) |
|
119 | ) | |
120 | coreconfigitem('annotate', 'nodates', |
|
120 | coreconfigitem('annotate', 'nodates', | |
121 | default=False, |
|
121 | default=False, | |
122 | ) |
|
122 | ) | |
123 | coreconfigitem('annotate', 'showfunc', |
|
123 | coreconfigitem('annotate', 'showfunc', | |
124 | default=False, |
|
124 | default=False, | |
125 | ) |
|
125 | ) | |
126 | coreconfigitem('annotate', 'unified', |
|
126 | coreconfigitem('annotate', 'unified', | |
127 | default=None, |
|
127 | default=None, | |
128 | ) |
|
128 | ) | |
129 | coreconfigitem('annotate', 'git', |
|
129 | coreconfigitem('annotate', 'git', | |
130 | default=False, |
|
130 | default=False, | |
131 | ) |
|
131 | ) | |
132 | coreconfigitem('annotate', 'ignorews', |
|
132 | coreconfigitem('annotate', 'ignorews', | |
133 | default=False, |
|
133 | default=False, | |
134 | ) |
|
134 | ) | |
135 | coreconfigitem('annotate', 'ignorewsamount', |
|
135 | coreconfigitem('annotate', 'ignorewsamount', | |
136 | default=False, |
|
136 | default=False, | |
137 | ) |
|
137 | ) | |
138 | coreconfigitem('annotate', 'ignoreblanklines', |
|
138 | coreconfigitem('annotate', 'ignoreblanklines', | |
139 | default=False, |
|
139 | default=False, | |
140 | ) |
|
140 | ) | |
141 | coreconfigitem('annotate', 'ignorewseol', |
|
141 | coreconfigitem('annotate', 'ignorewseol', | |
142 | default=False, |
|
142 | default=False, | |
143 | ) |
|
143 | ) | |
144 | coreconfigitem('annotate', 'nobinary', |
|
144 | coreconfigitem('annotate', 'nobinary', | |
145 | default=False, |
|
145 | default=False, | |
146 | ) |
|
146 | ) | |
147 | coreconfigitem('annotate', 'noprefix', |
|
147 | coreconfigitem('annotate', 'noprefix', | |
148 | default=False, |
|
148 | default=False, | |
149 | ) |
|
149 | ) | |
150 | coreconfigitem('annotate', 'word-diff', |
|
150 | coreconfigitem('annotate', 'word-diff', | |
151 | default=False, |
|
151 | default=False, | |
152 | ) |
|
152 | ) | |
153 | coreconfigitem('auth', 'cookiefile', |
|
153 | coreconfigitem('auth', 'cookiefile', | |
154 | default=None, |
|
154 | default=None, | |
155 | ) |
|
155 | ) | |
156 | # bookmarks.pushing: internal hack for discovery |
|
156 | # bookmarks.pushing: internal hack for discovery | |
157 | coreconfigitem('bookmarks', 'pushing', |
|
157 | coreconfigitem('bookmarks', 'pushing', | |
158 | default=list, |
|
158 | default=list, | |
159 | ) |
|
159 | ) | |
160 | # bundle.mainreporoot: internal hack for bundlerepo |
|
160 | # bundle.mainreporoot: internal hack for bundlerepo | |
161 | coreconfigitem('bundle', 'mainreporoot', |
|
161 | coreconfigitem('bundle', 'mainreporoot', | |
162 | default='', |
|
162 | default='', | |
163 | ) |
|
163 | ) | |
164 | coreconfigitem('censor', 'policy', |
|
164 | coreconfigitem('censor', 'policy', | |
165 | default='abort', |
|
165 | default='abort', | |
166 | ) |
|
166 | ) | |
167 | coreconfigitem('chgserver', 'idletimeout', |
|
167 | coreconfigitem('chgserver', 'idletimeout', | |
168 | default=3600, |
|
168 | default=3600, | |
169 | ) |
|
169 | ) | |
170 | coreconfigitem('chgserver', 'skiphash', |
|
170 | coreconfigitem('chgserver', 'skiphash', | |
171 | default=False, |
|
171 | default=False, | |
172 | ) |
|
172 | ) | |
173 | coreconfigitem('cmdserver', 'log', |
|
173 | coreconfigitem('cmdserver', 'log', | |
174 | default=None, |
|
174 | default=None, | |
175 | ) |
|
175 | ) | |
176 | coreconfigitem('color', '.*', |
|
176 | coreconfigitem('color', '.*', | |
177 | default=None, |
|
177 | default=None, | |
178 | generic=True, |
|
178 | generic=True, | |
179 | ) |
|
179 | ) | |
180 | coreconfigitem('color', 'mode', |
|
180 | coreconfigitem('color', 'mode', | |
181 | default='auto', |
|
181 | default='auto', | |
182 | ) |
|
182 | ) | |
183 | coreconfigitem('color', 'pagermode', |
|
183 | coreconfigitem('color', 'pagermode', | |
184 | default=dynamicdefault, |
|
184 | default=dynamicdefault, | |
185 | ) |
|
185 | ) | |
186 | coreconfigitem('commands', 'grep.all-files', |
|
186 | coreconfigitem('commands', 'grep.all-files', | |
187 | default=False, |
|
187 | default=False, | |
188 | ) |
|
188 | ) | |
189 | coreconfigitem('commands', 'resolve.confirm', |
|
189 | coreconfigitem('commands', 'resolve.confirm', | |
190 | default=False, |
|
190 | default=False, | |
191 | ) |
|
191 | ) | |
192 | coreconfigitem('commands', 'resolve.explicit-re-merge', |
|
192 | coreconfigitem('commands', 'resolve.explicit-re-merge', | |
193 | default=False, |
|
193 | default=False, | |
194 | ) |
|
194 | ) | |
195 | coreconfigitem('commands', 'resolve.mark-check', |
|
195 | coreconfigitem('commands', 'resolve.mark-check', | |
196 | default='none', |
|
196 | default='none', | |
197 | ) |
|
197 | ) | |
198 | coreconfigitem('commands', 'show.aliasprefix', |
|
198 | coreconfigitem('commands', 'show.aliasprefix', | |
199 | default=list, |
|
199 | default=list, | |
200 | ) |
|
200 | ) | |
201 | coreconfigitem('commands', 'status.relative', |
|
201 | coreconfigitem('commands', 'status.relative', | |
202 | default=False, |
|
202 | default=False, | |
203 | ) |
|
203 | ) | |
204 | coreconfigitem('commands', 'status.skipstates', |
|
204 | coreconfigitem('commands', 'status.skipstates', | |
205 | default=[], |
|
205 | default=[], | |
206 | ) |
|
206 | ) | |
207 | coreconfigitem('commands', 'status.terse', |
|
207 | coreconfigitem('commands', 'status.terse', | |
208 | default='', |
|
208 | default='', | |
209 | ) |
|
209 | ) | |
210 | coreconfigitem('commands', 'status.verbose', |
|
210 | coreconfigitem('commands', 'status.verbose', | |
211 | default=False, |
|
211 | default=False, | |
212 | ) |
|
212 | ) | |
213 | coreconfigitem('commands', 'update.check', |
|
213 | coreconfigitem('commands', 'update.check', | |
214 | default=None, |
|
214 | default=None, | |
215 | ) |
|
215 | ) | |
216 | coreconfigitem('commands', 'update.requiredest', |
|
216 | coreconfigitem('commands', 'update.requiredest', | |
217 | default=False, |
|
217 | default=False, | |
218 | ) |
|
218 | ) | |
219 | coreconfigitem('committemplate', '.*', |
|
219 | coreconfigitem('committemplate', '.*', | |
220 | default=None, |
|
220 | default=None, | |
221 | generic=True, |
|
221 | generic=True, | |
222 | ) |
|
222 | ) | |
223 | coreconfigitem('convert', 'bzr.saverev', |
|
223 | coreconfigitem('convert', 'bzr.saverev', | |
224 | default=True, |
|
224 | default=True, | |
225 | ) |
|
225 | ) | |
226 | coreconfigitem('convert', 'cvsps.cache', |
|
226 | coreconfigitem('convert', 'cvsps.cache', | |
227 | default=True, |
|
227 | default=True, | |
228 | ) |
|
228 | ) | |
229 | coreconfigitem('convert', 'cvsps.fuzz', |
|
229 | coreconfigitem('convert', 'cvsps.fuzz', | |
230 | default=60, |
|
230 | default=60, | |
231 | ) |
|
231 | ) | |
232 | coreconfigitem('convert', 'cvsps.logencoding', |
|
232 | coreconfigitem('convert', 'cvsps.logencoding', | |
233 | default=None, |
|
233 | default=None, | |
234 | ) |
|
234 | ) | |
235 | coreconfigitem('convert', 'cvsps.mergefrom', |
|
235 | coreconfigitem('convert', 'cvsps.mergefrom', | |
236 | default=None, |
|
236 | default=None, | |
237 | ) |
|
237 | ) | |
238 | coreconfigitem('convert', 'cvsps.mergeto', |
|
238 | coreconfigitem('convert', 'cvsps.mergeto', | |
239 | default=None, |
|
239 | default=None, | |
240 | ) |
|
240 | ) | |
241 | coreconfigitem('convert', 'git.committeractions', |
|
241 | coreconfigitem('convert', 'git.committeractions', | |
242 | default=lambda: ['messagedifferent'], |
|
242 | default=lambda: ['messagedifferent'], | |
243 | ) |
|
243 | ) | |
244 | coreconfigitem('convert', 'git.extrakeys', |
|
244 | coreconfigitem('convert', 'git.extrakeys', | |
245 | default=list, |
|
245 | default=list, | |
246 | ) |
|
246 | ) | |
247 | coreconfigitem('convert', 'git.findcopiesharder', |
|
247 | coreconfigitem('convert', 'git.findcopiesharder', | |
248 | default=False, |
|
248 | default=False, | |
249 | ) |
|
249 | ) | |
250 | coreconfigitem('convert', 'git.remoteprefix', |
|
250 | coreconfigitem('convert', 'git.remoteprefix', | |
251 | default='remote', |
|
251 | default='remote', | |
252 | ) |
|
252 | ) | |
253 | coreconfigitem('convert', 'git.renamelimit', |
|
253 | coreconfigitem('convert', 'git.renamelimit', | |
254 | default=400, |
|
254 | default=400, | |
255 | ) |
|
255 | ) | |
256 | coreconfigitem('convert', 'git.saverev', |
|
256 | coreconfigitem('convert', 'git.saverev', | |
257 | default=True, |
|
257 | default=True, | |
258 | ) |
|
258 | ) | |
259 | coreconfigitem('convert', 'git.similarity', |
|
259 | coreconfigitem('convert', 'git.similarity', | |
260 | default=50, |
|
260 | default=50, | |
261 | ) |
|
261 | ) | |
262 | coreconfigitem('convert', 'git.skipsubmodules', |
|
262 | coreconfigitem('convert', 'git.skipsubmodules', | |
263 | default=False, |
|
263 | default=False, | |
264 | ) |
|
264 | ) | |
265 | coreconfigitem('convert', 'hg.clonebranches', |
|
265 | coreconfigitem('convert', 'hg.clonebranches', | |
266 | default=False, |
|
266 | default=False, | |
267 | ) |
|
267 | ) | |
268 | coreconfigitem('convert', 'hg.ignoreerrors', |
|
268 | coreconfigitem('convert', 'hg.ignoreerrors', | |
269 | default=False, |
|
269 | default=False, | |
270 | ) |
|
270 | ) | |
271 | coreconfigitem('convert', 'hg.revs', |
|
271 | coreconfigitem('convert', 'hg.revs', | |
272 | default=None, |
|
272 | default=None, | |
273 | ) |
|
273 | ) | |
274 | coreconfigitem('convert', 'hg.saverev', |
|
274 | coreconfigitem('convert', 'hg.saverev', | |
275 | default=False, |
|
275 | default=False, | |
276 | ) |
|
276 | ) | |
277 | coreconfigitem('convert', 'hg.sourcename', |
|
277 | coreconfigitem('convert', 'hg.sourcename', | |
278 | default=None, |
|
278 | default=None, | |
279 | ) |
|
279 | ) | |
280 | coreconfigitem('convert', 'hg.startrev', |
|
280 | coreconfigitem('convert', 'hg.startrev', | |
281 | default=None, |
|
281 | default=None, | |
282 | ) |
|
282 | ) | |
283 | coreconfigitem('convert', 'hg.tagsbranch', |
|
283 | coreconfigitem('convert', 'hg.tagsbranch', | |
284 | default='default', |
|
284 | default='default', | |
285 | ) |
|
285 | ) | |
286 | coreconfigitem('convert', 'hg.usebranchnames', |
|
286 | coreconfigitem('convert', 'hg.usebranchnames', | |
287 | default=True, |
|
287 | default=True, | |
288 | ) |
|
288 | ) | |
289 | coreconfigitem('convert', 'ignoreancestorcheck', |
|
289 | coreconfigitem('convert', 'ignoreancestorcheck', | |
290 | default=False, |
|
290 | default=False, | |
291 | ) |
|
291 | ) | |
292 | coreconfigitem('convert', 'localtimezone', |
|
292 | coreconfigitem('convert', 'localtimezone', | |
293 | default=False, |
|
293 | default=False, | |
294 | ) |
|
294 | ) | |
295 | coreconfigitem('convert', 'p4.encoding', |
|
295 | coreconfigitem('convert', 'p4.encoding', | |
296 | default=dynamicdefault, |
|
296 | default=dynamicdefault, | |
297 | ) |
|
297 | ) | |
298 | coreconfigitem('convert', 'p4.startrev', |
|
298 | coreconfigitem('convert', 'p4.startrev', | |
299 | default=0, |
|
299 | default=0, | |
300 | ) |
|
300 | ) | |
301 | coreconfigitem('convert', 'skiptags', |
|
301 | coreconfigitem('convert', 'skiptags', | |
302 | default=False, |
|
302 | default=False, | |
303 | ) |
|
303 | ) | |
304 | coreconfigitem('convert', 'svn.debugsvnlog', |
|
304 | coreconfigitem('convert', 'svn.debugsvnlog', | |
305 | default=True, |
|
305 | default=True, | |
306 | ) |
|
306 | ) | |
307 | coreconfigitem('convert', 'svn.trunk', |
|
307 | coreconfigitem('convert', 'svn.trunk', | |
308 | default=None, |
|
308 | default=None, | |
309 | ) |
|
309 | ) | |
310 | coreconfigitem('convert', 'svn.tags', |
|
310 | coreconfigitem('convert', 'svn.tags', | |
311 | default=None, |
|
311 | default=None, | |
312 | ) |
|
312 | ) | |
313 | coreconfigitem('convert', 'svn.branches', |
|
313 | coreconfigitem('convert', 'svn.branches', | |
314 | default=None, |
|
314 | default=None, | |
315 | ) |
|
315 | ) | |
316 | coreconfigitem('convert', 'svn.startrev', |
|
316 | coreconfigitem('convert', 'svn.startrev', | |
317 | default=0, |
|
317 | default=0, | |
318 | ) |
|
318 | ) | |
319 | coreconfigitem('debug', 'dirstate.delaywrite', |
|
319 | coreconfigitem('debug', 'dirstate.delaywrite', | |
320 | default=0, |
|
320 | default=0, | |
321 | ) |
|
321 | ) | |
322 | coreconfigitem('defaults', '.*', |
|
322 | coreconfigitem('defaults', '.*', | |
323 | default=None, |
|
323 | default=None, | |
324 | generic=True, |
|
324 | generic=True, | |
325 | ) |
|
325 | ) | |
326 | coreconfigitem('devel', 'all-warnings', |
|
326 | coreconfigitem('devel', 'all-warnings', | |
327 | default=False, |
|
327 | default=False, | |
328 | ) |
|
328 | ) | |
329 | coreconfigitem('devel', 'bundle2.debug', |
|
329 | coreconfigitem('devel', 'bundle2.debug', | |
330 | default=False, |
|
330 | default=False, | |
331 | ) |
|
331 | ) | |
332 | coreconfigitem('devel', 'cache-vfs', |
|
332 | coreconfigitem('devel', 'cache-vfs', | |
333 | default=None, |
|
333 | default=None, | |
334 | ) |
|
334 | ) | |
335 | coreconfigitem('devel', 'check-locks', |
|
335 | coreconfigitem('devel', 'check-locks', | |
336 | default=False, |
|
336 | default=False, | |
337 | ) |
|
337 | ) | |
338 | coreconfigitem('devel', 'check-relroot', |
|
338 | coreconfigitem('devel', 'check-relroot', | |
339 | default=False, |
|
339 | default=False, | |
340 | ) |
|
340 | ) | |
341 | coreconfigitem('devel', 'default-date', |
|
341 | coreconfigitem('devel', 'default-date', | |
342 | default=None, |
|
342 | default=None, | |
343 | ) |
|
343 | ) | |
344 | coreconfigitem('devel', 'deprec-warn', |
|
344 | coreconfigitem('devel', 'deprec-warn', | |
345 | default=False, |
|
345 | default=False, | |
346 | ) |
|
346 | ) | |
347 | coreconfigitem('devel', 'disableloaddefaultcerts', |
|
347 | coreconfigitem('devel', 'disableloaddefaultcerts', | |
348 | default=False, |
|
348 | default=False, | |
349 | ) |
|
349 | ) | |
350 | coreconfigitem('devel', 'warn-empty-changegroup', |
|
350 | coreconfigitem('devel', 'warn-empty-changegroup', | |
351 | default=False, |
|
351 | default=False, | |
352 | ) |
|
352 | ) | |
353 | coreconfigitem('devel', 'legacy.exchange', |
|
353 | coreconfigitem('devel', 'legacy.exchange', | |
354 | default=list, |
|
354 | default=list, | |
355 | ) |
|
355 | ) | |
356 | coreconfigitem('devel', 'servercafile', |
|
356 | coreconfigitem('devel', 'servercafile', | |
357 | default='', |
|
357 | default='', | |
358 | ) |
|
358 | ) | |
359 | coreconfigitem('devel', 'serverexactprotocol', |
|
359 | coreconfigitem('devel', 'serverexactprotocol', | |
360 | default='', |
|
360 | default='', | |
361 | ) |
|
361 | ) | |
362 | coreconfigitem('devel', 'serverrequirecert', |
|
362 | coreconfigitem('devel', 'serverrequirecert', | |
363 | default=False, |
|
363 | default=False, | |
364 | ) |
|
364 | ) | |
365 | coreconfigitem('devel', 'strip-obsmarkers', |
|
365 | coreconfigitem('devel', 'strip-obsmarkers', | |
366 | default=True, |
|
366 | default=True, | |
367 | ) |
|
367 | ) | |
368 | coreconfigitem('devel', 'warn-config', |
|
368 | coreconfigitem('devel', 'warn-config', | |
369 | default=None, |
|
369 | default=None, | |
370 | ) |
|
370 | ) | |
371 | coreconfigitem('devel', 'warn-config-default', |
|
371 | coreconfigitem('devel', 'warn-config-default', | |
372 | default=None, |
|
372 | default=None, | |
373 | ) |
|
373 | ) | |
374 | coreconfigitem('devel', 'user.obsmarker', |
|
374 | coreconfigitem('devel', 'user.obsmarker', | |
375 | default=None, |
|
375 | default=None, | |
376 | ) |
|
376 | ) | |
377 | coreconfigitem('devel', 'warn-config-unknown', |
|
377 | coreconfigitem('devel', 'warn-config-unknown', | |
378 | default=None, |
|
378 | default=None, | |
379 | ) |
|
379 | ) | |
380 | coreconfigitem('devel', 'debug.copies', |
|
380 | coreconfigitem('devel', 'debug.copies', | |
381 | default=False, |
|
381 | default=False, | |
382 | ) |
|
382 | ) | |
383 | coreconfigitem('devel', 'debug.extensions', |
|
383 | coreconfigitem('devel', 'debug.extensions', | |
384 | default=False, |
|
384 | default=False, | |
385 | ) |
|
385 | ) | |
386 | coreconfigitem('devel', 'debug.peer-request', |
|
386 | coreconfigitem('devel', 'debug.peer-request', | |
387 | default=False, |
|
387 | default=False, | |
388 | ) |
|
388 | ) | |
389 | coreconfigitem('diff', 'nodates', |
|
389 | coreconfigitem('diff', 'nodates', | |
390 | default=False, |
|
390 | default=False, | |
391 | ) |
|
391 | ) | |
392 | coreconfigitem('diff', 'showfunc', |
|
392 | coreconfigitem('diff', 'showfunc', | |
393 | default=False, |
|
393 | default=False, | |
394 | ) |
|
394 | ) | |
395 | coreconfigitem('diff', 'unified', |
|
395 | coreconfigitem('diff', 'unified', | |
396 | default=None, |
|
396 | default=None, | |
397 | ) |
|
397 | ) | |
398 | coreconfigitem('diff', 'git', |
|
398 | coreconfigitem('diff', 'git', | |
399 | default=False, |
|
399 | default=False, | |
400 | ) |
|
400 | ) | |
401 | coreconfigitem('diff', 'ignorews', |
|
401 | coreconfigitem('diff', 'ignorews', | |
402 | default=False, |
|
402 | default=False, | |
403 | ) |
|
403 | ) | |
404 | coreconfigitem('diff', 'ignorewsamount', |
|
404 | coreconfigitem('diff', 'ignorewsamount', | |
405 | default=False, |
|
405 | default=False, | |
406 | ) |
|
406 | ) | |
407 | coreconfigitem('diff', 'ignoreblanklines', |
|
407 | coreconfigitem('diff', 'ignoreblanklines', | |
408 | default=False, |
|
408 | default=False, | |
409 | ) |
|
409 | ) | |
410 | coreconfigitem('diff', 'ignorewseol', |
|
410 | coreconfigitem('diff', 'ignorewseol', | |
411 | default=False, |
|
411 | default=False, | |
412 | ) |
|
412 | ) | |
413 | coreconfigitem('diff', 'nobinary', |
|
413 | coreconfigitem('diff', 'nobinary', | |
414 | default=False, |
|
414 | default=False, | |
415 | ) |
|
415 | ) | |
416 | coreconfigitem('diff', 'noprefix', |
|
416 | coreconfigitem('diff', 'noprefix', | |
417 | default=False, |
|
417 | default=False, | |
418 | ) |
|
418 | ) | |
419 | coreconfigitem('diff', 'word-diff', |
|
419 | coreconfigitem('diff', 'word-diff', | |
420 | default=False, |
|
420 | default=False, | |
421 | ) |
|
421 | ) | |
422 | coreconfigitem('email', 'bcc', |
|
422 | coreconfigitem('email', 'bcc', | |
423 | default=None, |
|
423 | default=None, | |
424 | ) |
|
424 | ) | |
425 | coreconfigitem('email', 'cc', |
|
425 | coreconfigitem('email', 'cc', | |
426 | default=None, |
|
426 | default=None, | |
427 | ) |
|
427 | ) | |
428 | coreconfigitem('email', 'charsets', |
|
428 | coreconfigitem('email', 'charsets', | |
429 | default=list, |
|
429 | default=list, | |
430 | ) |
|
430 | ) | |
431 | coreconfigitem('email', 'from', |
|
431 | coreconfigitem('email', 'from', | |
432 | default=None, |
|
432 | default=None, | |
433 | ) |
|
433 | ) | |
434 | coreconfigitem('email', 'method', |
|
434 | coreconfigitem('email', 'method', | |
435 | default='smtp', |
|
435 | default='smtp', | |
436 | ) |
|
436 | ) | |
437 | coreconfigitem('email', 'reply-to', |
|
437 | coreconfigitem('email', 'reply-to', | |
438 | default=None, |
|
438 | default=None, | |
439 | ) |
|
439 | ) | |
440 | coreconfigitem('email', 'to', |
|
440 | coreconfigitem('email', 'to', | |
441 | default=None, |
|
441 | default=None, | |
442 | ) |
|
442 | ) | |
443 | coreconfigitem('experimental', 'archivemetatemplate', |
|
443 | coreconfigitem('experimental', 'archivemetatemplate', | |
444 | default=dynamicdefault, |
|
444 | default=dynamicdefault, | |
445 | ) |
|
445 | ) | |
446 | coreconfigitem('experimental', 'bundle-phases', |
|
446 | coreconfigitem('experimental', 'bundle-phases', | |
447 | default=False, |
|
447 | default=False, | |
448 | ) |
|
448 | ) | |
449 | coreconfigitem('experimental', 'bundle2-advertise', |
|
449 | coreconfigitem('experimental', 'bundle2-advertise', | |
450 | default=True, |
|
450 | default=True, | |
451 | ) |
|
451 | ) | |
452 | coreconfigitem('experimental', 'bundle2-output-capture', |
|
452 | coreconfigitem('experimental', 'bundle2-output-capture', | |
453 | default=False, |
|
453 | default=False, | |
454 | ) |
|
454 | ) | |
455 | coreconfigitem('experimental', 'bundle2.pushback', |
|
455 | coreconfigitem('experimental', 'bundle2.pushback', | |
456 | default=False, |
|
456 | default=False, | |
457 | ) |
|
457 | ) | |
458 | coreconfigitem('experimental', 'bundle2lazylocking', |
|
458 | coreconfigitem('experimental', 'bundle2lazylocking', | |
459 | default=False, |
|
459 | default=False, | |
460 | ) |
|
460 | ) | |
461 | coreconfigitem('experimental', 'bundlecomplevel', |
|
461 | coreconfigitem('experimental', 'bundlecomplevel', | |
462 | default=None, |
|
462 | default=None, | |
463 | ) |
|
463 | ) | |
464 | coreconfigitem('experimental', 'bundlecomplevel.bzip2', |
|
464 | coreconfigitem('experimental', 'bundlecomplevel.bzip2', | |
465 | default=None, |
|
465 | default=None, | |
466 | ) |
|
466 | ) | |
467 | coreconfigitem('experimental', 'bundlecomplevel.gzip', |
|
467 | coreconfigitem('experimental', 'bundlecomplevel.gzip', | |
468 | default=None, |
|
468 | default=None, | |
469 | ) |
|
469 | ) | |
470 | coreconfigitem('experimental', 'bundlecomplevel.none', |
|
470 | coreconfigitem('experimental', 'bundlecomplevel.none', | |
471 | default=None, |
|
471 | default=None, | |
472 | ) |
|
472 | ) | |
473 | coreconfigitem('experimental', 'bundlecomplevel.zstd', |
|
473 | coreconfigitem('experimental', 'bundlecomplevel.zstd', | |
474 | default=None, |
|
474 | default=None, | |
475 | ) |
|
475 | ) | |
476 | coreconfigitem('experimental', 'changegroup3', |
|
476 | coreconfigitem('experimental', 'changegroup3', | |
477 | default=False, |
|
477 | default=False, | |
478 | ) |
|
478 | ) | |
479 | coreconfigitem('experimental', 'clientcompressionengines', |
|
479 | coreconfigitem('experimental', 'clientcompressionengines', | |
480 | default=list, |
|
480 | default=list, | |
481 | ) |
|
481 | ) | |
482 | coreconfigitem('experimental', 'copytrace', |
|
482 | coreconfigitem('experimental', 'copytrace', | |
483 | default='on', |
|
483 | default='on', | |
484 | ) |
|
484 | ) | |
485 | coreconfigitem('experimental', 'copytrace.movecandidateslimit', |
|
485 | coreconfigitem('experimental', 'copytrace.movecandidateslimit', | |
486 | default=100, |
|
486 | default=100, | |
487 | ) |
|
487 | ) | |
488 | coreconfigitem('experimental', 'copytrace.sourcecommitlimit', |
|
488 | coreconfigitem('experimental', 'copytrace.sourcecommitlimit', | |
489 | default=100, |
|
489 | default=100, | |
490 | ) |
|
490 | ) | |
491 | coreconfigitem('experimental', 'crecordtest', |
|
491 | coreconfigitem('experimental', 'crecordtest', | |
492 | default=None, |
|
492 | default=None, | |
493 | ) |
|
493 | ) | |
494 | coreconfigitem('experimental', 'directaccess', |
|
494 | coreconfigitem('experimental', 'directaccess', | |
495 | default=False, |
|
495 | default=False, | |
496 | ) |
|
496 | ) | |
497 | coreconfigitem('experimental', 'directaccess.revnums', |
|
497 | coreconfigitem('experimental', 'directaccess.revnums', | |
498 | default=False, |
|
498 | default=False, | |
499 | ) |
|
499 | ) | |
500 | coreconfigitem('experimental', 'editortmpinhg', |
|
500 | coreconfigitem('experimental', 'editortmpinhg', | |
501 | default=False, |
|
501 | default=False, | |
502 | ) |
|
502 | ) | |
503 | coreconfigitem('experimental', 'evolution', |
|
503 | coreconfigitem('experimental', 'evolution', | |
504 | default=list, |
|
504 | default=list, | |
505 | ) |
|
505 | ) | |
506 | coreconfigitem('experimental', 'evolution.allowdivergence', |
|
506 | coreconfigitem('experimental', 'evolution.allowdivergence', | |
507 | default=False, |
|
507 | default=False, | |
508 | alias=[('experimental', 'allowdivergence')] |
|
508 | alias=[('experimental', 'allowdivergence')] | |
509 | ) |
|
509 | ) | |
510 | coreconfigitem('experimental', 'evolution.allowunstable', |
|
510 | coreconfigitem('experimental', 'evolution.allowunstable', | |
511 | default=None, |
|
511 | default=None, | |
512 | ) |
|
512 | ) | |
513 | coreconfigitem('experimental', 'evolution.createmarkers', |
|
513 | coreconfigitem('experimental', 'evolution.createmarkers', | |
514 | default=None, |
|
514 | default=None, | |
515 | ) |
|
515 | ) | |
516 | coreconfigitem('experimental', 'evolution.effect-flags', |
|
516 | coreconfigitem('experimental', 'evolution.effect-flags', | |
517 | default=True, |
|
517 | default=True, | |
518 | alias=[('experimental', 'effect-flags')] |
|
518 | alias=[('experimental', 'effect-flags')] | |
519 | ) |
|
519 | ) | |
520 | coreconfigitem('experimental', 'evolution.exchange', |
|
520 | coreconfigitem('experimental', 'evolution.exchange', | |
521 | default=None, |
|
521 | default=None, | |
522 | ) |
|
522 | ) | |
523 | coreconfigitem('experimental', 'evolution.bundle-obsmarker', |
|
523 | coreconfigitem('experimental', 'evolution.bundle-obsmarker', | |
524 | default=False, |
|
524 | default=False, | |
525 | ) |
|
525 | ) | |
526 | coreconfigitem('experimental', 'evolution.report-instabilities', |
|
526 | coreconfigitem('experimental', 'evolution.report-instabilities', | |
527 | default=True, |
|
527 | default=True, | |
528 | ) |
|
528 | ) | |
529 | coreconfigitem('experimental', 'evolution.track-operation', |
|
529 | coreconfigitem('experimental', 'evolution.track-operation', | |
530 | default=True, |
|
530 | default=True, | |
531 | ) |
|
531 | ) | |
532 | coreconfigitem('experimental', 'maxdeltachainspan', |
|
532 | coreconfigitem('experimental', 'maxdeltachainspan', | |
533 | default=-1, |
|
533 | default=-1, | |
534 | ) |
|
534 | ) | |
535 | coreconfigitem('experimental', 'mergetempdirprefix', |
|
535 | coreconfigitem('experimental', 'mergetempdirprefix', | |
536 | default=None, |
|
536 | default=None, | |
537 | ) |
|
537 | ) | |
538 | coreconfigitem('experimental', 'mmapindexthreshold', |
|
538 | coreconfigitem('experimental', 'mmapindexthreshold', | |
539 | default=None, |
|
539 | default=None, | |
540 | ) |
|
540 | ) | |
541 | coreconfigitem('experimental', 'narrow', |
|
541 | coreconfigitem('experimental', 'narrow', | |
542 | default=False, |
|
542 | default=False, | |
543 | ) |
|
543 | ) | |
544 | coreconfigitem('experimental', 'nonnormalparanoidcheck', |
|
544 | coreconfigitem('experimental', 'nonnormalparanoidcheck', | |
545 | default=False, |
|
545 | default=False, | |
546 | ) |
|
546 | ) | |
547 | coreconfigitem('experimental', 'exportableenviron', |
|
547 | coreconfigitem('experimental', 'exportableenviron', | |
548 | default=list, |
|
548 | default=list, | |
549 | ) |
|
549 | ) | |
550 | coreconfigitem('experimental', 'extendedheader.index', |
|
550 | coreconfigitem('experimental', 'extendedheader.index', | |
551 | default=None, |
|
551 | default=None, | |
552 | ) |
|
552 | ) | |
553 | coreconfigitem('experimental', 'extendedheader.similarity', |
|
553 | coreconfigitem('experimental', 'extendedheader.similarity', | |
554 | default=False, |
|
554 | default=False, | |
555 | ) |
|
555 | ) | |
556 | coreconfigitem('experimental', 'format.compression', |
|
556 | coreconfigitem('experimental', 'format.compression', | |
557 | default='zlib', |
|
557 | default='zlib', | |
558 | ) |
|
558 | ) | |
559 | coreconfigitem('experimental', 'graphshorten', |
|
559 | coreconfigitem('experimental', 'graphshorten', | |
560 | default=False, |
|
560 | default=False, | |
561 | ) |
|
561 | ) | |
562 | coreconfigitem('experimental', 'graphstyle.parent', |
|
562 | coreconfigitem('experimental', 'graphstyle.parent', | |
563 | default=dynamicdefault, |
|
563 | default=dynamicdefault, | |
564 | ) |
|
564 | ) | |
565 | coreconfigitem('experimental', 'graphstyle.missing', |
|
565 | coreconfigitem('experimental', 'graphstyle.missing', | |
566 | default=dynamicdefault, |
|
566 | default=dynamicdefault, | |
567 | ) |
|
567 | ) | |
568 | coreconfigitem('experimental', 'graphstyle.grandparent', |
|
568 | coreconfigitem('experimental', 'graphstyle.grandparent', | |
569 | default=dynamicdefault, |
|
569 | default=dynamicdefault, | |
570 | ) |
|
570 | ) | |
571 | coreconfigitem('experimental', 'hook-track-tags', |
|
571 | coreconfigitem('experimental', 'hook-track-tags', | |
572 | default=False, |
|
572 | default=False, | |
573 | ) |
|
573 | ) | |
574 | coreconfigitem('experimental', 'httppeer.advertise-v2', |
|
574 | coreconfigitem('experimental', 'httppeer.advertise-v2', | |
575 | default=False, |
|
575 | default=False, | |
576 | ) |
|
576 | ) | |
577 | coreconfigitem('experimental', 'httppeer.v2-encoder-order', |
|
577 | coreconfigitem('experimental', 'httppeer.v2-encoder-order', | |
578 | default=None, |
|
578 | default=None, | |
579 | ) |
|
579 | ) | |
580 | coreconfigitem('experimental', 'httppostargs', |
|
580 | coreconfigitem('experimental', 'httppostargs', | |
581 | default=False, |
|
581 | default=False, | |
582 | ) |
|
582 | ) | |
583 | coreconfigitem('experimental', 'mergedriver', |
|
583 | coreconfigitem('experimental', 'mergedriver', | |
584 | default=None, |
|
584 | default=None, | |
585 | ) |
|
585 | ) | |
586 | coreconfigitem('experimental', 'nointerrupt', default=False) |
|
586 | coreconfigitem('experimental', 'nointerrupt', default=False) | |
587 | coreconfigitem('experimental', 'nointerrupt-interactiveonly', default=True) |
|
587 | coreconfigitem('experimental', 'nointerrupt-interactiveonly', default=True) | |
588 |
|
588 | |||
589 | coreconfigitem('experimental', 'obsmarkers-exchange-debug', |
|
589 | coreconfigitem('experimental', 'obsmarkers-exchange-debug', | |
590 | default=False, |
|
590 | default=False, | |
591 | ) |
|
591 | ) | |
592 | coreconfigitem('experimental', 'remotenames', |
|
592 | coreconfigitem('experimental', 'remotenames', | |
593 | default=False, |
|
593 | default=False, | |
594 | ) |
|
594 | ) | |
595 | coreconfigitem('experimental', 'removeemptydirs', |
|
595 | coreconfigitem('experimental', 'removeemptydirs', | |
596 | default=True, |
|
596 | default=True, | |
597 | ) |
|
597 | ) | |
598 | coreconfigitem('experimental', 'revisions.prefixhexnode', |
|
598 | coreconfigitem('experimental', 'revisions.prefixhexnode', | |
599 | default=False, |
|
599 | default=False, | |
600 | ) |
|
600 | ) | |
601 | coreconfigitem('experimental', 'revlogv2', |
|
601 | coreconfigitem('experimental', 'revlogv2', | |
602 | default=None, |
|
602 | default=None, | |
603 | ) |
|
603 | ) | |
604 | coreconfigitem('experimental', 'revisions.disambiguatewithin', |
|
604 | coreconfigitem('experimental', 'revisions.disambiguatewithin', | |
605 | default=None, |
|
605 | default=None, | |
606 | ) |
|
606 | ) | |
607 | coreconfigitem('experimental', 'server.filesdata.recommended-batch-size', |
|
607 | coreconfigitem('experimental', 'server.filesdata.recommended-batch-size', | |
608 | default=50000, |
|
608 | default=50000, | |
609 | ) |
|
609 | ) | |
610 | coreconfigitem('experimental', 'server.manifestdata.recommended-batch-size', |
|
610 | coreconfigitem('experimental', 'server.manifestdata.recommended-batch-size', | |
611 | default=100000, |
|
611 | default=100000, | |
612 | ) |
|
612 | ) | |
613 | coreconfigitem('experimental.server', 'stream-narrow-clones', |
|
613 | coreconfigitem('experimental.server', 'stream-narrow-clones', | |
614 | default=False, |
|
614 | default=False, | |
615 | ) |
|
615 | ) | |
616 | coreconfigitem('experimental', 'single-head-per-branch', |
|
616 | coreconfigitem('experimental', 'single-head-per-branch', | |
617 | default=False, |
|
617 | default=False, | |
618 | ) |
|
618 | ) | |
619 | coreconfigitem('experimental', 'sshserver.support-v2', |
|
619 | coreconfigitem('experimental', 'sshserver.support-v2', | |
620 | default=False, |
|
620 | default=False, | |
621 | ) |
|
621 | ) | |
622 | coreconfigitem('experimental', 'sparse-read', |
|
622 | coreconfigitem('experimental', 'sparse-read', | |
623 | default=False, |
|
623 | default=False, | |
624 | ) |
|
624 | ) | |
625 | coreconfigitem('experimental', 'sparse-read.density-threshold', |
|
625 | coreconfigitem('experimental', 'sparse-read.density-threshold', | |
626 | default=0.50, |
|
626 | default=0.50, | |
627 | ) |
|
627 | ) | |
628 | coreconfigitem('experimental', 'sparse-read.min-gap-size', |
|
628 | coreconfigitem('experimental', 'sparse-read.min-gap-size', | |
629 | default='65K', |
|
629 | default='65K', | |
630 | ) |
|
630 | ) | |
631 | coreconfigitem('experimental', 'treemanifest', |
|
631 | coreconfigitem('experimental', 'treemanifest', | |
632 | default=False, |
|
632 | default=False, | |
633 | ) |
|
633 | ) | |
634 | coreconfigitem('experimental', 'update.atomic-file', |
|
634 | coreconfigitem('experimental', 'update.atomic-file', | |
635 | default=False, |
|
635 | default=False, | |
636 | ) |
|
636 | ) | |
637 | coreconfigitem('experimental', 'sshpeer.advertise-v2', |
|
637 | coreconfigitem('experimental', 'sshpeer.advertise-v2', | |
638 | default=False, |
|
638 | default=False, | |
639 | ) |
|
639 | ) | |
640 | coreconfigitem('experimental', 'web.apiserver', |
|
640 | coreconfigitem('experimental', 'web.apiserver', | |
641 | default=False, |
|
641 | default=False, | |
642 | ) |
|
642 | ) | |
643 | coreconfigitem('experimental', 'web.api.http-v2', |
|
643 | coreconfigitem('experimental', 'web.api.http-v2', | |
644 | default=False, |
|
644 | default=False, | |
645 | ) |
|
645 | ) | |
646 | coreconfigitem('experimental', 'web.api.debugreflect', |
|
646 | coreconfigitem('experimental', 'web.api.debugreflect', | |
647 | default=False, |
|
647 | default=False, | |
648 | ) |
|
648 | ) | |
649 | coreconfigitem('experimental', 'worker.wdir-get-thread-safe', |
|
649 | coreconfigitem('experimental', 'worker.wdir-get-thread-safe', | |
650 | default=False, |
|
650 | default=False, | |
651 | ) |
|
651 | ) | |
652 | coreconfigitem('experimental', 'xdiff', |
|
652 | coreconfigitem('experimental', 'xdiff', | |
653 | default=False, |
|
653 | default=False, | |
654 | ) |
|
654 | ) | |
655 | coreconfigitem('extensions', '.*', |
|
655 | coreconfigitem('extensions', '.*', | |
656 | default=None, |
|
656 | default=None, | |
657 | generic=True, |
|
657 | generic=True, | |
658 | ) |
|
658 | ) | |
659 | coreconfigitem('extdata', '.*', |
|
659 | coreconfigitem('extdata', '.*', | |
660 | default=None, |
|
660 | default=None, | |
661 | generic=True, |
|
661 | generic=True, | |
662 | ) |
|
662 | ) | |
663 | coreconfigitem('format', 'chunkcachesize', |
|
663 | coreconfigitem('format', 'chunkcachesize', | |
664 | default=None, |
|
664 | default=None, | |
665 | ) |
|
665 | ) | |
666 | coreconfigitem('format', 'dotencode', |
|
666 | coreconfigitem('format', 'dotencode', | |
667 | default=True, |
|
667 | default=True, | |
668 | ) |
|
668 | ) | |
669 | coreconfigitem('format', 'generaldelta', |
|
669 | coreconfigitem('format', 'generaldelta', | |
670 | default=False, |
|
670 | default=False, | |
671 | ) |
|
671 | ) | |
672 | coreconfigitem('format', 'manifestcachesize', |
|
672 | coreconfigitem('format', 'manifestcachesize', | |
673 | default=None, |
|
673 | default=None, | |
674 | ) |
|
674 | ) | |
675 | coreconfigitem('format', 'maxchainlen', |
|
675 | coreconfigitem('format', 'maxchainlen', | |
676 | default=dynamicdefault, |
|
676 | default=dynamicdefault, | |
677 | ) |
|
677 | ) | |
678 | coreconfigitem('format', 'obsstore-version', |
|
678 | coreconfigitem('format', 'obsstore-version', | |
679 | default=None, |
|
679 | default=None, | |
680 | ) |
|
680 | ) | |
681 | coreconfigitem('format', 'sparse-revlog', |
|
681 | coreconfigitem('format', 'sparse-revlog', | |
682 | default=False, |
|
682 | default=False, | |
683 | ) |
|
683 | ) | |
684 | coreconfigitem('format', 'usefncache', |
|
684 | coreconfigitem('format', 'usefncache', | |
685 | default=True, |
|
685 | default=True, | |
686 | ) |
|
686 | ) | |
687 | coreconfigitem('format', 'usegeneraldelta', |
|
687 | coreconfigitem('format', 'usegeneraldelta', | |
688 | default=True, |
|
688 | default=True, | |
689 | ) |
|
689 | ) | |
690 | coreconfigitem('format', 'usestore', |
|
690 | coreconfigitem('format', 'usestore', | |
691 | default=True, |
|
691 | default=True, | |
692 | ) |
|
692 | ) | |
693 | coreconfigitem('format', 'internal-phase', |
|
693 | coreconfigitem('format', 'internal-phase', | |
694 | default=False, |
|
694 | default=False, | |
695 | ) |
|
695 | ) | |
696 | coreconfigitem('fsmonitor', 'warn_when_unused', |
|
696 | coreconfigitem('fsmonitor', 'warn_when_unused', | |
697 | default=True, |
|
697 | default=True, | |
698 | ) |
|
698 | ) | |
699 | coreconfigitem('fsmonitor', 'warn_update_file_count', |
|
699 | coreconfigitem('fsmonitor', 'warn_update_file_count', | |
700 | default=50000, |
|
700 | default=50000, | |
701 | ) |
|
701 | ) | |
702 | coreconfigitem('hooks', '.*', |
|
702 | coreconfigitem('hooks', '.*', | |
703 | default=dynamicdefault, |
|
703 | default=dynamicdefault, | |
704 | generic=True, |
|
704 | generic=True, | |
705 | ) |
|
705 | ) | |
706 | coreconfigitem('hgweb-paths', '.*', |
|
706 | coreconfigitem('hgweb-paths', '.*', | |
707 | default=list, |
|
707 | default=list, | |
708 | generic=True, |
|
708 | generic=True, | |
709 | ) |
|
709 | ) | |
710 | coreconfigitem('hostfingerprints', '.*', |
|
710 | coreconfigitem('hostfingerprints', '.*', | |
711 | default=list, |
|
711 | default=list, | |
712 | generic=True, |
|
712 | generic=True, | |
713 | ) |
|
713 | ) | |
714 | coreconfigitem('hostsecurity', 'ciphers', |
|
714 | coreconfigitem('hostsecurity', 'ciphers', | |
715 | default=None, |
|
715 | default=None, | |
716 | ) |
|
716 | ) | |
717 | coreconfigitem('hostsecurity', 'disabletls10warning', |
|
717 | coreconfigitem('hostsecurity', 'disabletls10warning', | |
718 | default=False, |
|
718 | default=False, | |
719 | ) |
|
719 | ) | |
720 | coreconfigitem('hostsecurity', 'minimumprotocol', |
|
720 | coreconfigitem('hostsecurity', 'minimumprotocol', | |
721 | default=dynamicdefault, |
|
721 | default=dynamicdefault, | |
722 | ) |
|
722 | ) | |
723 | coreconfigitem('hostsecurity', '.*:minimumprotocol$', |
|
723 | coreconfigitem('hostsecurity', '.*:minimumprotocol$', | |
724 | default=dynamicdefault, |
|
724 | default=dynamicdefault, | |
725 | generic=True, |
|
725 | generic=True, | |
726 | ) |
|
726 | ) | |
727 | coreconfigitem('hostsecurity', '.*:ciphers$', |
|
727 | coreconfigitem('hostsecurity', '.*:ciphers$', | |
728 | default=dynamicdefault, |
|
728 | default=dynamicdefault, | |
729 | generic=True, |
|
729 | generic=True, | |
730 | ) |
|
730 | ) | |
731 | coreconfigitem('hostsecurity', '.*:fingerprints$', |
|
731 | coreconfigitem('hostsecurity', '.*:fingerprints$', | |
732 | default=list, |
|
732 | default=list, | |
733 | generic=True, |
|
733 | generic=True, | |
734 | ) |
|
734 | ) | |
735 | coreconfigitem('hostsecurity', '.*:verifycertsfile$', |
|
735 | coreconfigitem('hostsecurity', '.*:verifycertsfile$', | |
736 | default=None, |
|
736 | default=None, | |
737 | generic=True, |
|
737 | generic=True, | |
738 | ) |
|
738 | ) | |
739 |
|
739 | |||
740 | coreconfigitem('http_proxy', 'always', |
|
740 | coreconfigitem('http_proxy', 'always', | |
741 | default=False, |
|
741 | default=False, | |
742 | ) |
|
742 | ) | |
743 | coreconfigitem('http_proxy', 'host', |
|
743 | coreconfigitem('http_proxy', 'host', | |
744 | default=None, |
|
744 | default=None, | |
745 | ) |
|
745 | ) | |
746 | coreconfigitem('http_proxy', 'no', |
|
746 | coreconfigitem('http_proxy', 'no', | |
747 | default=list, |
|
747 | default=list, | |
748 | ) |
|
748 | ) | |
749 | coreconfigitem('http_proxy', 'passwd', |
|
749 | coreconfigitem('http_proxy', 'passwd', | |
750 | default=None, |
|
750 | default=None, | |
751 | ) |
|
751 | ) | |
752 | coreconfigitem('http_proxy', 'user', |
|
752 | coreconfigitem('http_proxy', 'user', | |
753 | default=None, |
|
753 | default=None, | |
754 | ) |
|
754 | ) | |
755 |
|
755 | |||
756 | coreconfigitem('http', 'timeout', |
|
756 | coreconfigitem('http', 'timeout', | |
757 | default=None, |
|
757 | default=None, | |
758 | ) |
|
758 | ) | |
759 |
|
759 | |||
760 | coreconfigitem('logtoprocess', 'commandexception', |
|
760 | coreconfigitem('logtoprocess', 'commandexception', | |
761 | default=None, |
|
761 | default=None, | |
762 | ) |
|
762 | ) | |
763 | coreconfigitem('logtoprocess', 'commandfinish', |
|
763 | coreconfigitem('logtoprocess', 'commandfinish', | |
764 | default=None, |
|
764 | default=None, | |
765 | ) |
|
765 | ) | |
766 | coreconfigitem('logtoprocess', 'command', |
|
766 | coreconfigitem('logtoprocess', 'command', | |
767 | default=None, |
|
767 | default=None, | |
768 | ) |
|
768 | ) | |
769 | coreconfigitem('logtoprocess', 'develwarn', |
|
769 | coreconfigitem('logtoprocess', 'develwarn', | |
770 | default=None, |
|
770 | default=None, | |
771 | ) |
|
771 | ) | |
772 | coreconfigitem('logtoprocess', 'uiblocked', |
|
772 | coreconfigitem('logtoprocess', 'uiblocked', | |
773 | default=None, |
|
773 | default=None, | |
774 | ) |
|
774 | ) | |
775 | coreconfigitem('merge', 'checkunknown', |
|
775 | coreconfigitem('merge', 'checkunknown', | |
776 | default='abort', |
|
776 | default='abort', | |
777 | ) |
|
777 | ) | |
778 | coreconfigitem('merge', 'checkignored', |
|
778 | coreconfigitem('merge', 'checkignored', | |
779 | default='abort', |
|
779 | default='abort', | |
780 | ) |
|
780 | ) | |
781 | coreconfigitem('experimental', 'merge.checkpathconflicts', |
|
781 | coreconfigitem('experimental', 'merge.checkpathconflicts', | |
782 | default=False, |
|
782 | default=False, | |
783 | ) |
|
783 | ) | |
784 | coreconfigitem('merge', 'followcopies', |
|
784 | coreconfigitem('merge', 'followcopies', | |
785 | default=True, |
|
785 | default=True, | |
786 | ) |
|
786 | ) | |
787 | coreconfigitem('merge', 'on-failure', |
|
787 | coreconfigitem('merge', 'on-failure', | |
788 | default='continue', |
|
788 | default='continue', | |
789 | ) |
|
789 | ) | |
790 | coreconfigitem('merge', 'preferancestor', |
|
790 | coreconfigitem('merge', 'preferancestor', | |
791 | default=lambda: ['*'], |
|
791 | default=lambda: ['*'], | |
792 | ) |
|
792 | ) | |
793 | coreconfigitem('merge', 'strict-capability-check', |
|
793 | coreconfigitem('merge', 'strict-capability-check', | |
794 | default=False, |
|
794 | default=False, | |
795 | ) |
|
795 | ) | |
796 | coreconfigitem('merge-tools', '.*', |
|
796 | coreconfigitem('merge-tools', '.*', | |
797 | default=None, |
|
797 | default=None, | |
798 | generic=True, |
|
798 | generic=True, | |
799 | ) |
|
799 | ) | |
800 | coreconfigitem('merge-tools', br'.*\.args$', |
|
800 | coreconfigitem('merge-tools', br'.*\.args$', | |
801 | default="$local $base $other", |
|
801 | default="$local $base $other", | |
802 | generic=True, |
|
802 | generic=True, | |
803 | priority=-1, |
|
803 | priority=-1, | |
804 | ) |
|
804 | ) | |
805 | coreconfigitem('merge-tools', br'.*\.binary$', |
|
805 | coreconfigitem('merge-tools', br'.*\.binary$', | |
806 | default=False, |
|
806 | default=False, | |
807 | generic=True, |
|
807 | generic=True, | |
808 | priority=-1, |
|
808 | priority=-1, | |
809 | ) |
|
809 | ) | |
810 | coreconfigitem('merge-tools', br'.*\.check$', |
|
810 | coreconfigitem('merge-tools', br'.*\.check$', | |
811 | default=list, |
|
811 | default=list, | |
812 | generic=True, |
|
812 | generic=True, | |
813 | priority=-1, |
|
813 | priority=-1, | |
814 | ) |
|
814 | ) | |
815 | coreconfigitem('merge-tools', br'.*\.checkchanged$', |
|
815 | coreconfigitem('merge-tools', br'.*\.checkchanged$', | |
816 | default=False, |
|
816 | default=False, | |
817 | generic=True, |
|
817 | generic=True, | |
818 | priority=-1, |
|
818 | priority=-1, | |
819 | ) |
|
819 | ) | |
820 | coreconfigitem('merge-tools', br'.*\.executable$', |
|
820 | coreconfigitem('merge-tools', br'.*\.executable$', | |
821 | default=dynamicdefault, |
|
821 | default=dynamicdefault, | |
822 | generic=True, |
|
822 | generic=True, | |
823 | priority=-1, |
|
823 | priority=-1, | |
824 | ) |
|
824 | ) | |
825 | coreconfigitem('merge-tools', br'.*\.fixeol$', |
|
825 | coreconfigitem('merge-tools', br'.*\.fixeol$', | |
826 | default=False, |
|
826 | default=False, | |
827 | generic=True, |
|
827 | generic=True, | |
828 | priority=-1, |
|
828 | priority=-1, | |
829 | ) |
|
829 | ) | |
830 | coreconfigitem('merge-tools', br'.*\.gui$', |
|
830 | coreconfigitem('merge-tools', br'.*\.gui$', | |
831 | default=False, |
|
831 | default=False, | |
832 | generic=True, |
|
832 | generic=True, | |
833 | priority=-1, |
|
833 | priority=-1, | |
834 | ) |
|
834 | ) | |
835 | coreconfigitem('merge-tools', br'.*\.mergemarkers$', |
|
835 | coreconfigitem('merge-tools', br'.*\.mergemarkers$', | |
836 | default='basic', |
|
836 | default='basic', | |
837 | generic=True, |
|
837 | generic=True, | |
838 | priority=-1, |
|
838 | priority=-1, | |
839 | ) |
|
839 | ) | |
840 | coreconfigitem('merge-tools', br'.*\.mergemarkertemplate$', |
|
840 | coreconfigitem('merge-tools', br'.*\.mergemarkertemplate$', | |
841 | default=dynamicdefault, # take from ui.mergemarkertemplate |
|
841 | default=dynamicdefault, # take from ui.mergemarkertemplate | |
842 | generic=True, |
|
842 | generic=True, | |
843 | priority=-1, |
|
843 | priority=-1, | |
844 | ) |
|
844 | ) | |
845 | coreconfigitem('merge-tools', br'.*\.priority$', |
|
845 | coreconfigitem('merge-tools', br'.*\.priority$', | |
846 | default=0, |
|
846 | default=0, | |
847 | generic=True, |
|
847 | generic=True, | |
848 | priority=-1, |
|
848 | priority=-1, | |
849 | ) |
|
849 | ) | |
850 | coreconfigitem('merge-tools', br'.*\.premerge$', |
|
850 | coreconfigitem('merge-tools', br'.*\.premerge$', | |
851 | default=dynamicdefault, |
|
851 | default=dynamicdefault, | |
852 | generic=True, |
|
852 | generic=True, | |
853 | priority=-1, |
|
853 | priority=-1, | |
854 | ) |
|
854 | ) | |
855 | coreconfigitem('merge-tools', br'.*\.symlink$', |
|
855 | coreconfigitem('merge-tools', br'.*\.symlink$', | |
856 | default=False, |
|
856 | default=False, | |
857 | generic=True, |
|
857 | generic=True, | |
858 | priority=-1, |
|
858 | priority=-1, | |
859 | ) |
|
859 | ) | |
860 | coreconfigitem('pager', 'attend-.*', |
|
860 | coreconfigitem('pager', 'attend-.*', | |
861 | default=dynamicdefault, |
|
861 | default=dynamicdefault, | |
862 | generic=True, |
|
862 | generic=True, | |
863 | ) |
|
863 | ) | |
864 | coreconfigitem('pager', 'ignore', |
|
864 | coreconfigitem('pager', 'ignore', | |
865 | default=list, |
|
865 | default=list, | |
866 | ) |
|
866 | ) | |
867 | coreconfigitem('pager', 'pager', |
|
867 | coreconfigitem('pager', 'pager', | |
868 | default=dynamicdefault, |
|
868 | default=dynamicdefault, | |
869 | ) |
|
869 | ) | |
870 | coreconfigitem('patch', 'eol', |
|
870 | coreconfigitem('patch', 'eol', | |
871 | default='strict', |
|
871 | default='strict', | |
872 | ) |
|
872 | ) | |
873 | coreconfigitem('patch', 'fuzz', |
|
873 | coreconfigitem('patch', 'fuzz', | |
874 | default=2, |
|
874 | default=2, | |
875 | ) |
|
875 | ) | |
876 | coreconfigitem('paths', 'default', |
|
876 | coreconfigitem('paths', 'default', | |
877 | default=None, |
|
877 | default=None, | |
878 | ) |
|
878 | ) | |
879 | coreconfigitem('paths', 'default-push', |
|
879 | coreconfigitem('paths', 'default-push', | |
880 | default=None, |
|
880 | default=None, | |
881 | ) |
|
881 | ) | |
882 | coreconfigitem('paths', '.*', |
|
882 | coreconfigitem('paths', '.*', | |
883 | default=None, |
|
883 | default=None, | |
884 | generic=True, |
|
884 | generic=True, | |
885 | ) |
|
885 | ) | |
886 | coreconfigitem('phases', 'checksubrepos', |
|
886 | coreconfigitem('phases', 'checksubrepos', | |
887 | default='follow', |
|
887 | default='follow', | |
888 | ) |
|
888 | ) | |
889 | coreconfigitem('phases', 'new-commit', |
|
889 | coreconfigitem('phases', 'new-commit', | |
890 | default='draft', |
|
890 | default='draft', | |
891 | ) |
|
891 | ) | |
892 | coreconfigitem('phases', 'publish', |
|
892 | coreconfigitem('phases', 'publish', | |
893 | default=True, |
|
893 | default=True, | |
894 | ) |
|
894 | ) | |
895 | coreconfigitem('profiling', 'enabled', |
|
895 | coreconfigitem('profiling', 'enabled', | |
896 | default=False, |
|
896 | default=False, | |
897 | ) |
|
897 | ) | |
898 | coreconfigitem('profiling', 'format', |
|
898 | coreconfigitem('profiling', 'format', | |
899 | default='text', |
|
899 | default='text', | |
900 | ) |
|
900 | ) | |
901 | coreconfigitem('profiling', 'freq', |
|
901 | coreconfigitem('profiling', 'freq', | |
902 | default=1000, |
|
902 | default=1000, | |
903 | ) |
|
903 | ) | |
904 | coreconfigitem('profiling', 'limit', |
|
904 | coreconfigitem('profiling', 'limit', | |
905 | default=30, |
|
905 | default=30, | |
906 | ) |
|
906 | ) | |
907 | coreconfigitem('profiling', 'nested', |
|
907 | coreconfigitem('profiling', 'nested', | |
908 | default=0, |
|
908 | default=0, | |
909 | ) |
|
909 | ) | |
910 | coreconfigitem('profiling', 'output', |
|
910 | coreconfigitem('profiling', 'output', | |
911 | default=None, |
|
911 | default=None, | |
912 | ) |
|
912 | ) | |
913 | coreconfigitem('profiling', 'showmax', |
|
913 | coreconfigitem('profiling', 'showmax', | |
914 | default=0.999, |
|
914 | default=0.999, | |
915 | ) |
|
915 | ) | |
916 | coreconfigitem('profiling', 'showmin', |
|
916 | coreconfigitem('profiling', 'showmin', | |
917 | default=dynamicdefault, |
|
917 | default=dynamicdefault, | |
918 | ) |
|
918 | ) | |
919 | coreconfigitem('profiling', 'sort', |
|
919 | coreconfigitem('profiling', 'sort', | |
920 | default='inlinetime', |
|
920 | default='inlinetime', | |
921 | ) |
|
921 | ) | |
922 | coreconfigitem('profiling', 'statformat', |
|
922 | coreconfigitem('profiling', 'statformat', | |
923 | default='hotpath', |
|
923 | default='hotpath', | |
924 | ) |
|
924 | ) | |
925 | coreconfigitem('profiling', 'time-track', |
|
925 | coreconfigitem('profiling', 'time-track', | |
926 |
default= |
|
926 | default=dynamicdefault, | |
927 | ) |
|
927 | ) | |
928 | coreconfigitem('profiling', 'type', |
|
928 | coreconfigitem('profiling', 'type', | |
929 | default='stat', |
|
929 | default='stat', | |
930 | ) |
|
930 | ) | |
931 | coreconfigitem('progress', 'assume-tty', |
|
931 | coreconfigitem('progress', 'assume-tty', | |
932 | default=False, |
|
932 | default=False, | |
933 | ) |
|
933 | ) | |
934 | coreconfigitem('progress', 'changedelay', |
|
934 | coreconfigitem('progress', 'changedelay', | |
935 | default=1, |
|
935 | default=1, | |
936 | ) |
|
936 | ) | |
937 | coreconfigitem('progress', 'clear-complete', |
|
937 | coreconfigitem('progress', 'clear-complete', | |
938 | default=True, |
|
938 | default=True, | |
939 | ) |
|
939 | ) | |
940 | coreconfigitem('progress', 'debug', |
|
940 | coreconfigitem('progress', 'debug', | |
941 | default=False, |
|
941 | default=False, | |
942 | ) |
|
942 | ) | |
943 | coreconfigitem('progress', 'delay', |
|
943 | coreconfigitem('progress', 'delay', | |
944 | default=3, |
|
944 | default=3, | |
945 | ) |
|
945 | ) | |
946 | coreconfigitem('progress', 'disable', |
|
946 | coreconfigitem('progress', 'disable', | |
947 | default=False, |
|
947 | default=False, | |
948 | ) |
|
948 | ) | |
949 | coreconfigitem('progress', 'estimateinterval', |
|
949 | coreconfigitem('progress', 'estimateinterval', | |
950 | default=60.0, |
|
950 | default=60.0, | |
951 | ) |
|
951 | ) | |
952 | coreconfigitem('progress', 'format', |
|
952 | coreconfigitem('progress', 'format', | |
953 | default=lambda: ['topic', 'bar', 'number', 'estimate'], |
|
953 | default=lambda: ['topic', 'bar', 'number', 'estimate'], | |
954 | ) |
|
954 | ) | |
955 | coreconfigitem('progress', 'refresh', |
|
955 | coreconfigitem('progress', 'refresh', | |
956 | default=0.1, |
|
956 | default=0.1, | |
957 | ) |
|
957 | ) | |
958 | coreconfigitem('progress', 'width', |
|
958 | coreconfigitem('progress', 'width', | |
959 | default=dynamicdefault, |
|
959 | default=dynamicdefault, | |
960 | ) |
|
960 | ) | |
961 | coreconfigitem('push', 'pushvars.server', |
|
961 | coreconfigitem('push', 'pushvars.server', | |
962 | default=False, |
|
962 | default=False, | |
963 | ) |
|
963 | ) | |
964 | coreconfigitem('storage', 'new-repo-backend', |
|
964 | coreconfigitem('storage', 'new-repo-backend', | |
965 | default='revlogv1', |
|
965 | default='revlogv1', | |
966 | ) |
|
966 | ) | |
967 | coreconfigitem('storage', 'revlog.optimize-delta-parent-choice', |
|
967 | coreconfigitem('storage', 'revlog.optimize-delta-parent-choice', | |
968 | default=True, |
|
968 | default=True, | |
969 | alias=[('format', 'aggressivemergedeltas')], |
|
969 | alias=[('format', 'aggressivemergedeltas')], | |
970 | ) |
|
970 | ) | |
971 | coreconfigitem('server', 'bookmarks-pushkey-compat', |
|
971 | coreconfigitem('server', 'bookmarks-pushkey-compat', | |
972 | default=True, |
|
972 | default=True, | |
973 | ) |
|
973 | ) | |
974 | coreconfigitem('server', 'bundle1', |
|
974 | coreconfigitem('server', 'bundle1', | |
975 | default=True, |
|
975 | default=True, | |
976 | ) |
|
976 | ) | |
977 | coreconfigitem('server', 'bundle1gd', |
|
977 | coreconfigitem('server', 'bundle1gd', | |
978 | default=None, |
|
978 | default=None, | |
979 | ) |
|
979 | ) | |
980 | coreconfigitem('server', 'bundle1.pull', |
|
980 | coreconfigitem('server', 'bundle1.pull', | |
981 | default=None, |
|
981 | default=None, | |
982 | ) |
|
982 | ) | |
983 | coreconfigitem('server', 'bundle1gd.pull', |
|
983 | coreconfigitem('server', 'bundle1gd.pull', | |
984 | default=None, |
|
984 | default=None, | |
985 | ) |
|
985 | ) | |
986 | coreconfigitem('server', 'bundle1.push', |
|
986 | coreconfigitem('server', 'bundle1.push', | |
987 | default=None, |
|
987 | default=None, | |
988 | ) |
|
988 | ) | |
989 | coreconfigitem('server', 'bundle1gd.push', |
|
989 | coreconfigitem('server', 'bundle1gd.push', | |
990 | default=None, |
|
990 | default=None, | |
991 | ) |
|
991 | ) | |
992 | coreconfigitem('server', 'bundle2.stream', |
|
992 | coreconfigitem('server', 'bundle2.stream', | |
993 | default=True, |
|
993 | default=True, | |
994 | alias=[('experimental', 'bundle2.stream')] |
|
994 | alias=[('experimental', 'bundle2.stream')] | |
995 | ) |
|
995 | ) | |
996 | coreconfigitem('server', 'compressionengines', |
|
996 | coreconfigitem('server', 'compressionengines', | |
997 | default=list, |
|
997 | default=list, | |
998 | ) |
|
998 | ) | |
999 | coreconfigitem('server', 'concurrent-push-mode', |
|
999 | coreconfigitem('server', 'concurrent-push-mode', | |
1000 | default='strict', |
|
1000 | default='strict', | |
1001 | ) |
|
1001 | ) | |
1002 | coreconfigitem('server', 'disablefullbundle', |
|
1002 | coreconfigitem('server', 'disablefullbundle', | |
1003 | default=False, |
|
1003 | default=False, | |
1004 | ) |
|
1004 | ) | |
1005 | coreconfigitem('server', 'maxhttpheaderlen', |
|
1005 | coreconfigitem('server', 'maxhttpheaderlen', | |
1006 | default=1024, |
|
1006 | default=1024, | |
1007 | ) |
|
1007 | ) | |
1008 | coreconfigitem('server', 'pullbundle', |
|
1008 | coreconfigitem('server', 'pullbundle', | |
1009 | default=False, |
|
1009 | default=False, | |
1010 | ) |
|
1010 | ) | |
1011 | coreconfigitem('server', 'preferuncompressed', |
|
1011 | coreconfigitem('server', 'preferuncompressed', | |
1012 | default=False, |
|
1012 | default=False, | |
1013 | ) |
|
1013 | ) | |
1014 | coreconfigitem('server', 'streamunbundle', |
|
1014 | coreconfigitem('server', 'streamunbundle', | |
1015 | default=False, |
|
1015 | default=False, | |
1016 | ) |
|
1016 | ) | |
1017 | coreconfigitem('server', 'uncompressed', |
|
1017 | coreconfigitem('server', 'uncompressed', | |
1018 | default=True, |
|
1018 | default=True, | |
1019 | ) |
|
1019 | ) | |
1020 | coreconfigitem('server', 'uncompressedallowsecret', |
|
1020 | coreconfigitem('server', 'uncompressedallowsecret', | |
1021 | default=False, |
|
1021 | default=False, | |
1022 | ) |
|
1022 | ) | |
1023 | coreconfigitem('server', 'validate', |
|
1023 | coreconfigitem('server', 'validate', | |
1024 | default=False, |
|
1024 | default=False, | |
1025 | ) |
|
1025 | ) | |
1026 | coreconfigitem('server', 'zliblevel', |
|
1026 | coreconfigitem('server', 'zliblevel', | |
1027 | default=-1, |
|
1027 | default=-1, | |
1028 | ) |
|
1028 | ) | |
1029 | coreconfigitem('server', 'zstdlevel', |
|
1029 | coreconfigitem('server', 'zstdlevel', | |
1030 | default=3, |
|
1030 | default=3, | |
1031 | ) |
|
1031 | ) | |
1032 | coreconfigitem('share', 'pool', |
|
1032 | coreconfigitem('share', 'pool', | |
1033 | default=None, |
|
1033 | default=None, | |
1034 | ) |
|
1034 | ) | |
1035 | coreconfigitem('share', 'poolnaming', |
|
1035 | coreconfigitem('share', 'poolnaming', | |
1036 | default='identity', |
|
1036 | default='identity', | |
1037 | ) |
|
1037 | ) | |
1038 | coreconfigitem('smtp', 'host', |
|
1038 | coreconfigitem('smtp', 'host', | |
1039 | default=None, |
|
1039 | default=None, | |
1040 | ) |
|
1040 | ) | |
1041 | coreconfigitem('smtp', 'local_hostname', |
|
1041 | coreconfigitem('smtp', 'local_hostname', | |
1042 | default=None, |
|
1042 | default=None, | |
1043 | ) |
|
1043 | ) | |
1044 | coreconfigitem('smtp', 'password', |
|
1044 | coreconfigitem('smtp', 'password', | |
1045 | default=None, |
|
1045 | default=None, | |
1046 | ) |
|
1046 | ) | |
1047 | coreconfigitem('smtp', 'port', |
|
1047 | coreconfigitem('smtp', 'port', | |
1048 | default=dynamicdefault, |
|
1048 | default=dynamicdefault, | |
1049 | ) |
|
1049 | ) | |
1050 | coreconfigitem('smtp', 'tls', |
|
1050 | coreconfigitem('smtp', 'tls', | |
1051 | default='none', |
|
1051 | default='none', | |
1052 | ) |
|
1052 | ) | |
1053 | coreconfigitem('smtp', 'username', |
|
1053 | coreconfigitem('smtp', 'username', | |
1054 | default=None, |
|
1054 | default=None, | |
1055 | ) |
|
1055 | ) | |
1056 | coreconfigitem('sparse', 'missingwarning', |
|
1056 | coreconfigitem('sparse', 'missingwarning', | |
1057 | default=True, |
|
1057 | default=True, | |
1058 | ) |
|
1058 | ) | |
1059 | coreconfigitem('subrepos', 'allowed', |
|
1059 | coreconfigitem('subrepos', 'allowed', | |
1060 | default=dynamicdefault, # to make backporting simpler |
|
1060 | default=dynamicdefault, # to make backporting simpler | |
1061 | ) |
|
1061 | ) | |
1062 | coreconfigitem('subrepos', 'hg:allowed', |
|
1062 | coreconfigitem('subrepos', 'hg:allowed', | |
1063 | default=dynamicdefault, |
|
1063 | default=dynamicdefault, | |
1064 | ) |
|
1064 | ) | |
1065 | coreconfigitem('subrepos', 'git:allowed', |
|
1065 | coreconfigitem('subrepos', 'git:allowed', | |
1066 | default=dynamicdefault, |
|
1066 | default=dynamicdefault, | |
1067 | ) |
|
1067 | ) | |
1068 | coreconfigitem('subrepos', 'svn:allowed', |
|
1068 | coreconfigitem('subrepos', 'svn:allowed', | |
1069 | default=dynamicdefault, |
|
1069 | default=dynamicdefault, | |
1070 | ) |
|
1070 | ) | |
1071 | coreconfigitem('templates', '.*', |
|
1071 | coreconfigitem('templates', '.*', | |
1072 | default=None, |
|
1072 | default=None, | |
1073 | generic=True, |
|
1073 | generic=True, | |
1074 | ) |
|
1074 | ) | |
1075 | coreconfigitem('trusted', 'groups', |
|
1075 | coreconfigitem('trusted', 'groups', | |
1076 | default=list, |
|
1076 | default=list, | |
1077 | ) |
|
1077 | ) | |
1078 | coreconfigitem('trusted', 'users', |
|
1078 | coreconfigitem('trusted', 'users', | |
1079 | default=list, |
|
1079 | default=list, | |
1080 | ) |
|
1080 | ) | |
1081 | coreconfigitem('ui', '_usedassubrepo', |
|
1081 | coreconfigitem('ui', '_usedassubrepo', | |
1082 | default=False, |
|
1082 | default=False, | |
1083 | ) |
|
1083 | ) | |
1084 | coreconfigitem('ui', 'allowemptycommit', |
|
1084 | coreconfigitem('ui', 'allowemptycommit', | |
1085 | default=False, |
|
1085 | default=False, | |
1086 | ) |
|
1086 | ) | |
1087 | coreconfigitem('ui', 'archivemeta', |
|
1087 | coreconfigitem('ui', 'archivemeta', | |
1088 | default=True, |
|
1088 | default=True, | |
1089 | ) |
|
1089 | ) | |
1090 | coreconfigitem('ui', 'askusername', |
|
1090 | coreconfigitem('ui', 'askusername', | |
1091 | default=False, |
|
1091 | default=False, | |
1092 | ) |
|
1092 | ) | |
1093 | coreconfigitem('ui', 'clonebundlefallback', |
|
1093 | coreconfigitem('ui', 'clonebundlefallback', | |
1094 | default=False, |
|
1094 | default=False, | |
1095 | ) |
|
1095 | ) | |
1096 | coreconfigitem('ui', 'clonebundleprefers', |
|
1096 | coreconfigitem('ui', 'clonebundleprefers', | |
1097 | default=list, |
|
1097 | default=list, | |
1098 | ) |
|
1098 | ) | |
1099 | coreconfigitem('ui', 'clonebundles', |
|
1099 | coreconfigitem('ui', 'clonebundles', | |
1100 | default=True, |
|
1100 | default=True, | |
1101 | ) |
|
1101 | ) | |
1102 | coreconfigitem('ui', 'color', |
|
1102 | coreconfigitem('ui', 'color', | |
1103 | default='auto', |
|
1103 | default='auto', | |
1104 | ) |
|
1104 | ) | |
1105 | coreconfigitem('ui', 'commitsubrepos', |
|
1105 | coreconfigitem('ui', 'commitsubrepos', | |
1106 | default=False, |
|
1106 | default=False, | |
1107 | ) |
|
1107 | ) | |
1108 | coreconfigitem('ui', 'debug', |
|
1108 | coreconfigitem('ui', 'debug', | |
1109 | default=False, |
|
1109 | default=False, | |
1110 | ) |
|
1110 | ) | |
1111 | coreconfigitem('ui', 'debugger', |
|
1111 | coreconfigitem('ui', 'debugger', | |
1112 | default=None, |
|
1112 | default=None, | |
1113 | ) |
|
1113 | ) | |
1114 | coreconfigitem('ui', 'editor', |
|
1114 | coreconfigitem('ui', 'editor', | |
1115 | default=dynamicdefault, |
|
1115 | default=dynamicdefault, | |
1116 | ) |
|
1116 | ) | |
1117 | coreconfigitem('ui', 'fallbackencoding', |
|
1117 | coreconfigitem('ui', 'fallbackencoding', | |
1118 | default=None, |
|
1118 | default=None, | |
1119 | ) |
|
1119 | ) | |
1120 | coreconfigitem('ui', 'forcecwd', |
|
1120 | coreconfigitem('ui', 'forcecwd', | |
1121 | default=None, |
|
1121 | default=None, | |
1122 | ) |
|
1122 | ) | |
1123 | coreconfigitem('ui', 'forcemerge', |
|
1123 | coreconfigitem('ui', 'forcemerge', | |
1124 | default=None, |
|
1124 | default=None, | |
1125 | ) |
|
1125 | ) | |
1126 | coreconfigitem('ui', 'formatdebug', |
|
1126 | coreconfigitem('ui', 'formatdebug', | |
1127 | default=False, |
|
1127 | default=False, | |
1128 | ) |
|
1128 | ) | |
1129 | coreconfigitem('ui', 'formatjson', |
|
1129 | coreconfigitem('ui', 'formatjson', | |
1130 | default=False, |
|
1130 | default=False, | |
1131 | ) |
|
1131 | ) | |
1132 | coreconfigitem('ui', 'formatted', |
|
1132 | coreconfigitem('ui', 'formatted', | |
1133 | default=None, |
|
1133 | default=None, | |
1134 | ) |
|
1134 | ) | |
1135 | coreconfigitem('ui', 'graphnodetemplate', |
|
1135 | coreconfigitem('ui', 'graphnodetemplate', | |
1136 | default=None, |
|
1136 | default=None, | |
1137 | ) |
|
1137 | ) | |
1138 | coreconfigitem('ui', 'history-editing-backup', |
|
1138 | coreconfigitem('ui', 'history-editing-backup', | |
1139 | default=True, |
|
1139 | default=True, | |
1140 | ) |
|
1140 | ) | |
1141 | coreconfigitem('ui', 'interactive', |
|
1141 | coreconfigitem('ui', 'interactive', | |
1142 | default=None, |
|
1142 | default=None, | |
1143 | ) |
|
1143 | ) | |
1144 | coreconfigitem('ui', 'interface', |
|
1144 | coreconfigitem('ui', 'interface', | |
1145 | default=None, |
|
1145 | default=None, | |
1146 | ) |
|
1146 | ) | |
1147 | coreconfigitem('ui', 'interface.chunkselector', |
|
1147 | coreconfigitem('ui', 'interface.chunkselector', | |
1148 | default=None, |
|
1148 | default=None, | |
1149 | ) |
|
1149 | ) | |
1150 | coreconfigitem('ui', 'large-file-limit', |
|
1150 | coreconfigitem('ui', 'large-file-limit', | |
1151 | default=10000000, |
|
1151 | default=10000000, | |
1152 | ) |
|
1152 | ) | |
1153 | coreconfigitem('ui', 'logblockedtimes', |
|
1153 | coreconfigitem('ui', 'logblockedtimes', | |
1154 | default=False, |
|
1154 | default=False, | |
1155 | ) |
|
1155 | ) | |
1156 | coreconfigitem('ui', 'logtemplate', |
|
1156 | coreconfigitem('ui', 'logtemplate', | |
1157 | default=None, |
|
1157 | default=None, | |
1158 | ) |
|
1158 | ) | |
1159 | coreconfigitem('ui', 'merge', |
|
1159 | coreconfigitem('ui', 'merge', | |
1160 | default=None, |
|
1160 | default=None, | |
1161 | ) |
|
1161 | ) | |
1162 | coreconfigitem('ui', 'mergemarkers', |
|
1162 | coreconfigitem('ui', 'mergemarkers', | |
1163 | default='basic', |
|
1163 | default='basic', | |
1164 | ) |
|
1164 | ) | |
1165 | coreconfigitem('ui', 'mergemarkertemplate', |
|
1165 | coreconfigitem('ui', 'mergemarkertemplate', | |
1166 | default=('{node|short} ' |
|
1166 | default=('{node|short} ' | |
1167 | '{ifeq(tags, "tip", "", ' |
|
1167 | '{ifeq(tags, "tip", "", ' | |
1168 | 'ifeq(tags, "", "", "{tags} "))}' |
|
1168 | 'ifeq(tags, "", "", "{tags} "))}' | |
1169 | '{if(bookmarks, "{bookmarks} ")}' |
|
1169 | '{if(bookmarks, "{bookmarks} ")}' | |
1170 | '{ifeq(branch, "default", "", "{branch} ")}' |
|
1170 | '{ifeq(branch, "default", "", "{branch} ")}' | |
1171 | '- {author|user}: {desc|firstline}') |
|
1171 | '- {author|user}: {desc|firstline}') | |
1172 | ) |
|
1172 | ) | |
1173 | coreconfigitem('ui', 'nontty', |
|
1173 | coreconfigitem('ui', 'nontty', | |
1174 | default=False, |
|
1174 | default=False, | |
1175 | ) |
|
1175 | ) | |
1176 | coreconfigitem('ui', 'origbackuppath', |
|
1176 | coreconfigitem('ui', 'origbackuppath', | |
1177 | default=None, |
|
1177 | default=None, | |
1178 | ) |
|
1178 | ) | |
1179 | coreconfigitem('ui', 'paginate', |
|
1179 | coreconfigitem('ui', 'paginate', | |
1180 | default=True, |
|
1180 | default=True, | |
1181 | ) |
|
1181 | ) | |
1182 | coreconfigitem('ui', 'patch', |
|
1182 | coreconfigitem('ui', 'patch', | |
1183 | default=None, |
|
1183 | default=None, | |
1184 | ) |
|
1184 | ) | |
1185 | coreconfigitem('ui', 'portablefilenames', |
|
1185 | coreconfigitem('ui', 'portablefilenames', | |
1186 | default='warn', |
|
1186 | default='warn', | |
1187 | ) |
|
1187 | ) | |
1188 | coreconfigitem('ui', 'promptecho', |
|
1188 | coreconfigitem('ui', 'promptecho', | |
1189 | default=False, |
|
1189 | default=False, | |
1190 | ) |
|
1190 | ) | |
1191 | coreconfigitem('ui', 'quiet', |
|
1191 | coreconfigitem('ui', 'quiet', | |
1192 | default=False, |
|
1192 | default=False, | |
1193 | ) |
|
1193 | ) | |
1194 | coreconfigitem('ui', 'quietbookmarkmove', |
|
1194 | coreconfigitem('ui', 'quietbookmarkmove', | |
1195 | default=False, |
|
1195 | default=False, | |
1196 | ) |
|
1196 | ) | |
1197 | coreconfigitem('ui', 'remotecmd', |
|
1197 | coreconfigitem('ui', 'remotecmd', | |
1198 | default='hg', |
|
1198 | default='hg', | |
1199 | ) |
|
1199 | ) | |
1200 | coreconfigitem('ui', 'report_untrusted', |
|
1200 | coreconfigitem('ui', 'report_untrusted', | |
1201 | default=True, |
|
1201 | default=True, | |
1202 | ) |
|
1202 | ) | |
1203 | coreconfigitem('ui', 'rollback', |
|
1203 | coreconfigitem('ui', 'rollback', | |
1204 | default=True, |
|
1204 | default=True, | |
1205 | ) |
|
1205 | ) | |
1206 | coreconfigitem('ui', 'signal-safe-lock', |
|
1206 | coreconfigitem('ui', 'signal-safe-lock', | |
1207 | default=True, |
|
1207 | default=True, | |
1208 | ) |
|
1208 | ) | |
1209 | coreconfigitem('ui', 'slash', |
|
1209 | coreconfigitem('ui', 'slash', | |
1210 | default=False, |
|
1210 | default=False, | |
1211 | ) |
|
1211 | ) | |
1212 | coreconfigitem('ui', 'ssh', |
|
1212 | coreconfigitem('ui', 'ssh', | |
1213 | default='ssh', |
|
1213 | default='ssh', | |
1214 | ) |
|
1214 | ) | |
1215 | coreconfigitem('ui', 'ssherrorhint', |
|
1215 | coreconfigitem('ui', 'ssherrorhint', | |
1216 | default=None, |
|
1216 | default=None, | |
1217 | ) |
|
1217 | ) | |
1218 | coreconfigitem('ui', 'statuscopies', |
|
1218 | coreconfigitem('ui', 'statuscopies', | |
1219 | default=False, |
|
1219 | default=False, | |
1220 | ) |
|
1220 | ) | |
1221 | coreconfigitem('ui', 'strict', |
|
1221 | coreconfigitem('ui', 'strict', | |
1222 | default=False, |
|
1222 | default=False, | |
1223 | ) |
|
1223 | ) | |
1224 | coreconfigitem('ui', 'style', |
|
1224 | coreconfigitem('ui', 'style', | |
1225 | default='', |
|
1225 | default='', | |
1226 | ) |
|
1226 | ) | |
1227 | coreconfigitem('ui', 'supportcontact', |
|
1227 | coreconfigitem('ui', 'supportcontact', | |
1228 | default=None, |
|
1228 | default=None, | |
1229 | ) |
|
1229 | ) | |
1230 | coreconfigitem('ui', 'textwidth', |
|
1230 | coreconfigitem('ui', 'textwidth', | |
1231 | default=78, |
|
1231 | default=78, | |
1232 | ) |
|
1232 | ) | |
1233 | coreconfigitem('ui', 'timeout', |
|
1233 | coreconfigitem('ui', 'timeout', | |
1234 | default='600', |
|
1234 | default='600', | |
1235 | ) |
|
1235 | ) | |
1236 | coreconfigitem('ui', 'timeout.warn', |
|
1236 | coreconfigitem('ui', 'timeout.warn', | |
1237 | default=0, |
|
1237 | default=0, | |
1238 | ) |
|
1238 | ) | |
1239 | coreconfigitem('ui', 'traceback', |
|
1239 | coreconfigitem('ui', 'traceback', | |
1240 | default=False, |
|
1240 | default=False, | |
1241 | ) |
|
1241 | ) | |
1242 | coreconfigitem('ui', 'tweakdefaults', |
|
1242 | coreconfigitem('ui', 'tweakdefaults', | |
1243 | default=False, |
|
1243 | default=False, | |
1244 | ) |
|
1244 | ) | |
1245 | coreconfigitem('ui', 'username', |
|
1245 | coreconfigitem('ui', 'username', | |
1246 | alias=[('ui', 'user')] |
|
1246 | alias=[('ui', 'user')] | |
1247 | ) |
|
1247 | ) | |
1248 | coreconfigitem('ui', 'verbose', |
|
1248 | coreconfigitem('ui', 'verbose', | |
1249 | default=False, |
|
1249 | default=False, | |
1250 | ) |
|
1250 | ) | |
1251 | coreconfigitem('verify', 'skipflags', |
|
1251 | coreconfigitem('verify', 'skipflags', | |
1252 | default=None, |
|
1252 | default=None, | |
1253 | ) |
|
1253 | ) | |
1254 | coreconfigitem('web', 'allowbz2', |
|
1254 | coreconfigitem('web', 'allowbz2', | |
1255 | default=False, |
|
1255 | default=False, | |
1256 | ) |
|
1256 | ) | |
1257 | coreconfigitem('web', 'allowgz', |
|
1257 | coreconfigitem('web', 'allowgz', | |
1258 | default=False, |
|
1258 | default=False, | |
1259 | ) |
|
1259 | ) | |
1260 | coreconfigitem('web', 'allow-pull', |
|
1260 | coreconfigitem('web', 'allow-pull', | |
1261 | alias=[('web', 'allowpull')], |
|
1261 | alias=[('web', 'allowpull')], | |
1262 | default=True, |
|
1262 | default=True, | |
1263 | ) |
|
1263 | ) | |
1264 | coreconfigitem('web', 'allow-push', |
|
1264 | coreconfigitem('web', 'allow-push', | |
1265 | alias=[('web', 'allow_push')], |
|
1265 | alias=[('web', 'allow_push')], | |
1266 | default=list, |
|
1266 | default=list, | |
1267 | ) |
|
1267 | ) | |
1268 | coreconfigitem('web', 'allowzip', |
|
1268 | coreconfigitem('web', 'allowzip', | |
1269 | default=False, |
|
1269 | default=False, | |
1270 | ) |
|
1270 | ) | |
1271 | coreconfigitem('web', 'archivesubrepos', |
|
1271 | coreconfigitem('web', 'archivesubrepos', | |
1272 | default=False, |
|
1272 | default=False, | |
1273 | ) |
|
1273 | ) | |
1274 | coreconfigitem('web', 'cache', |
|
1274 | coreconfigitem('web', 'cache', | |
1275 | default=True, |
|
1275 | default=True, | |
1276 | ) |
|
1276 | ) | |
1277 | coreconfigitem('web', 'contact', |
|
1277 | coreconfigitem('web', 'contact', | |
1278 | default=None, |
|
1278 | default=None, | |
1279 | ) |
|
1279 | ) | |
1280 | coreconfigitem('web', 'deny_push', |
|
1280 | coreconfigitem('web', 'deny_push', | |
1281 | default=list, |
|
1281 | default=list, | |
1282 | ) |
|
1282 | ) | |
1283 | coreconfigitem('web', 'guessmime', |
|
1283 | coreconfigitem('web', 'guessmime', | |
1284 | default=False, |
|
1284 | default=False, | |
1285 | ) |
|
1285 | ) | |
1286 | coreconfigitem('web', 'hidden', |
|
1286 | coreconfigitem('web', 'hidden', | |
1287 | default=False, |
|
1287 | default=False, | |
1288 | ) |
|
1288 | ) | |
1289 | coreconfigitem('web', 'labels', |
|
1289 | coreconfigitem('web', 'labels', | |
1290 | default=list, |
|
1290 | default=list, | |
1291 | ) |
|
1291 | ) | |
1292 | coreconfigitem('web', 'logoimg', |
|
1292 | coreconfigitem('web', 'logoimg', | |
1293 | default='hglogo.png', |
|
1293 | default='hglogo.png', | |
1294 | ) |
|
1294 | ) | |
1295 | coreconfigitem('web', 'logourl', |
|
1295 | coreconfigitem('web', 'logourl', | |
1296 | default='https://mercurial-scm.org/', |
|
1296 | default='https://mercurial-scm.org/', | |
1297 | ) |
|
1297 | ) | |
1298 | coreconfigitem('web', 'accesslog', |
|
1298 | coreconfigitem('web', 'accesslog', | |
1299 | default='-', |
|
1299 | default='-', | |
1300 | ) |
|
1300 | ) | |
1301 | coreconfigitem('web', 'address', |
|
1301 | coreconfigitem('web', 'address', | |
1302 | default='', |
|
1302 | default='', | |
1303 | ) |
|
1303 | ) | |
1304 | coreconfigitem('web', 'allow-archive', |
|
1304 | coreconfigitem('web', 'allow-archive', | |
1305 | alias=[('web', 'allow_archive')], |
|
1305 | alias=[('web', 'allow_archive')], | |
1306 | default=list, |
|
1306 | default=list, | |
1307 | ) |
|
1307 | ) | |
1308 | coreconfigitem('web', 'allow_read', |
|
1308 | coreconfigitem('web', 'allow_read', | |
1309 | default=list, |
|
1309 | default=list, | |
1310 | ) |
|
1310 | ) | |
1311 | coreconfigitem('web', 'baseurl', |
|
1311 | coreconfigitem('web', 'baseurl', | |
1312 | default=None, |
|
1312 | default=None, | |
1313 | ) |
|
1313 | ) | |
1314 | coreconfigitem('web', 'cacerts', |
|
1314 | coreconfigitem('web', 'cacerts', | |
1315 | default=None, |
|
1315 | default=None, | |
1316 | ) |
|
1316 | ) | |
1317 | coreconfigitem('web', 'certificate', |
|
1317 | coreconfigitem('web', 'certificate', | |
1318 | default=None, |
|
1318 | default=None, | |
1319 | ) |
|
1319 | ) | |
1320 | coreconfigitem('web', 'collapse', |
|
1320 | coreconfigitem('web', 'collapse', | |
1321 | default=False, |
|
1321 | default=False, | |
1322 | ) |
|
1322 | ) | |
1323 | coreconfigitem('web', 'csp', |
|
1323 | coreconfigitem('web', 'csp', | |
1324 | default=None, |
|
1324 | default=None, | |
1325 | ) |
|
1325 | ) | |
1326 | coreconfigitem('web', 'deny_read', |
|
1326 | coreconfigitem('web', 'deny_read', | |
1327 | default=list, |
|
1327 | default=list, | |
1328 | ) |
|
1328 | ) | |
1329 | coreconfigitem('web', 'descend', |
|
1329 | coreconfigitem('web', 'descend', | |
1330 | default=True, |
|
1330 | default=True, | |
1331 | ) |
|
1331 | ) | |
1332 | coreconfigitem('web', 'description', |
|
1332 | coreconfigitem('web', 'description', | |
1333 | default="", |
|
1333 | default="", | |
1334 | ) |
|
1334 | ) | |
1335 | coreconfigitem('web', 'encoding', |
|
1335 | coreconfigitem('web', 'encoding', | |
1336 | default=lambda: encoding.encoding, |
|
1336 | default=lambda: encoding.encoding, | |
1337 | ) |
|
1337 | ) | |
1338 | coreconfigitem('web', 'errorlog', |
|
1338 | coreconfigitem('web', 'errorlog', | |
1339 | default='-', |
|
1339 | default='-', | |
1340 | ) |
|
1340 | ) | |
1341 | coreconfigitem('web', 'ipv6', |
|
1341 | coreconfigitem('web', 'ipv6', | |
1342 | default=False, |
|
1342 | default=False, | |
1343 | ) |
|
1343 | ) | |
1344 | coreconfigitem('web', 'maxchanges', |
|
1344 | coreconfigitem('web', 'maxchanges', | |
1345 | default=10, |
|
1345 | default=10, | |
1346 | ) |
|
1346 | ) | |
1347 | coreconfigitem('web', 'maxfiles', |
|
1347 | coreconfigitem('web', 'maxfiles', | |
1348 | default=10, |
|
1348 | default=10, | |
1349 | ) |
|
1349 | ) | |
1350 | coreconfigitem('web', 'maxshortchanges', |
|
1350 | coreconfigitem('web', 'maxshortchanges', | |
1351 | default=60, |
|
1351 | default=60, | |
1352 | ) |
|
1352 | ) | |
1353 | coreconfigitem('web', 'motd', |
|
1353 | coreconfigitem('web', 'motd', | |
1354 | default='', |
|
1354 | default='', | |
1355 | ) |
|
1355 | ) | |
1356 | coreconfigitem('web', 'name', |
|
1356 | coreconfigitem('web', 'name', | |
1357 | default=dynamicdefault, |
|
1357 | default=dynamicdefault, | |
1358 | ) |
|
1358 | ) | |
1359 | coreconfigitem('web', 'port', |
|
1359 | coreconfigitem('web', 'port', | |
1360 | default=8000, |
|
1360 | default=8000, | |
1361 | ) |
|
1361 | ) | |
1362 | coreconfigitem('web', 'prefix', |
|
1362 | coreconfigitem('web', 'prefix', | |
1363 | default='', |
|
1363 | default='', | |
1364 | ) |
|
1364 | ) | |
1365 | coreconfigitem('web', 'push_ssl', |
|
1365 | coreconfigitem('web', 'push_ssl', | |
1366 | default=True, |
|
1366 | default=True, | |
1367 | ) |
|
1367 | ) | |
1368 | coreconfigitem('web', 'refreshinterval', |
|
1368 | coreconfigitem('web', 'refreshinterval', | |
1369 | default=20, |
|
1369 | default=20, | |
1370 | ) |
|
1370 | ) | |
1371 | coreconfigitem('web', 'server-header', |
|
1371 | coreconfigitem('web', 'server-header', | |
1372 | default=None, |
|
1372 | default=None, | |
1373 | ) |
|
1373 | ) | |
1374 | coreconfigitem('web', 'static', |
|
1374 | coreconfigitem('web', 'static', | |
1375 | default=None, |
|
1375 | default=None, | |
1376 | ) |
|
1376 | ) | |
1377 | coreconfigitem('web', 'staticurl', |
|
1377 | coreconfigitem('web', 'staticurl', | |
1378 | default=None, |
|
1378 | default=None, | |
1379 | ) |
|
1379 | ) | |
1380 | coreconfigitem('web', 'stripes', |
|
1380 | coreconfigitem('web', 'stripes', | |
1381 | default=1, |
|
1381 | default=1, | |
1382 | ) |
|
1382 | ) | |
1383 | coreconfigitem('web', 'style', |
|
1383 | coreconfigitem('web', 'style', | |
1384 | default='paper', |
|
1384 | default='paper', | |
1385 | ) |
|
1385 | ) | |
1386 | coreconfigitem('web', 'templates', |
|
1386 | coreconfigitem('web', 'templates', | |
1387 | default=None, |
|
1387 | default=None, | |
1388 | ) |
|
1388 | ) | |
1389 | coreconfigitem('web', 'view', |
|
1389 | coreconfigitem('web', 'view', | |
1390 | default='served', |
|
1390 | default='served', | |
1391 | ) |
|
1391 | ) | |
1392 | coreconfigitem('worker', 'backgroundclose', |
|
1392 | coreconfigitem('worker', 'backgroundclose', | |
1393 | default=dynamicdefault, |
|
1393 | default=dynamicdefault, | |
1394 | ) |
|
1394 | ) | |
1395 | # Windows defaults to a limit of 512 open files. A buffer of 128 |
|
1395 | # Windows defaults to a limit of 512 open files. A buffer of 128 | |
1396 | # should give us enough headway. |
|
1396 | # should give us enough headway. | |
1397 | coreconfigitem('worker', 'backgroundclosemaxqueue', |
|
1397 | coreconfigitem('worker', 'backgroundclosemaxqueue', | |
1398 | default=384, |
|
1398 | default=384, | |
1399 | ) |
|
1399 | ) | |
1400 | coreconfigitem('worker', 'backgroundcloseminfilecount', |
|
1400 | coreconfigitem('worker', 'backgroundcloseminfilecount', | |
1401 | default=2048, |
|
1401 | default=2048, | |
1402 | ) |
|
1402 | ) | |
1403 | coreconfigitem('worker', 'backgroundclosethreadcount', |
|
1403 | coreconfigitem('worker', 'backgroundclosethreadcount', | |
1404 | default=4, |
|
1404 | default=4, | |
1405 | ) |
|
1405 | ) | |
1406 | coreconfigitem('worker', 'enabled', |
|
1406 | coreconfigitem('worker', 'enabled', | |
1407 | default=True, |
|
1407 | default=True, | |
1408 | ) |
|
1408 | ) | |
1409 | coreconfigitem('worker', 'numcpus', |
|
1409 | coreconfigitem('worker', 'numcpus', | |
1410 | default=None, |
|
1410 | default=None, | |
1411 | ) |
|
1411 | ) | |
1412 |
|
1412 | |||
1413 | # Rebase related configuration moved to core because other extension are doing |
|
1413 | # Rebase related configuration moved to core because other extension are doing | |
1414 | # strange things. For example, shelve import the extensions to reuse some bit |
|
1414 | # strange things. For example, shelve import the extensions to reuse some bit | |
1415 | # without formally loading it. |
|
1415 | # without formally loading it. | |
1416 | coreconfigitem('commands', 'rebase.requiredest', |
|
1416 | coreconfigitem('commands', 'rebase.requiredest', | |
1417 | default=False, |
|
1417 | default=False, | |
1418 | ) |
|
1418 | ) | |
1419 | coreconfigitem('experimental', 'rebaseskipobsolete', |
|
1419 | coreconfigitem('experimental', 'rebaseskipobsolete', | |
1420 | default=True, |
|
1420 | default=True, | |
1421 | ) |
|
1421 | ) | |
1422 | coreconfigitem('rebase', 'singletransaction', |
|
1422 | coreconfigitem('rebase', 'singletransaction', | |
1423 | default=False, |
|
1423 | default=False, | |
1424 | ) |
|
1424 | ) | |
1425 | coreconfigitem('rebase', 'experimental.inmemory', |
|
1425 | coreconfigitem('rebase', 'experimental.inmemory', | |
1426 | default=False, |
|
1426 | default=False, | |
1427 | ) |
|
1427 | ) |
@@ -1,251 +1,252 b'' | |||||
1 | # profiling.py - profiling functions |
|
1 | # profiling.py - profiling functions | |
2 | # |
|
2 | # | |
3 | # Copyright 2016 Gregory Szorc <gregory.szorc@gmail.com> |
|
3 | # Copyright 2016 Gregory Szorc <gregory.szorc@gmail.com> | |
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, print_function |
|
8 | from __future__ import absolute_import, print_function | |
9 |
|
9 | |||
10 | import contextlib |
|
10 | import contextlib | |
11 |
|
11 | |||
12 | from .i18n import _ |
|
12 | from .i18n import _ | |
13 | from . import ( |
|
13 | from . import ( | |
14 | encoding, |
|
14 | encoding, | |
15 | error, |
|
15 | error, | |
16 | extensions, |
|
16 | extensions, | |
17 | pycompat, |
|
17 | pycompat, | |
18 | util, |
|
18 | util, | |
19 | ) |
|
19 | ) | |
20 |
|
20 | |||
21 | def _loadprofiler(ui, profiler): |
|
21 | def _loadprofiler(ui, profiler): | |
22 | """load profiler extension. return profile method, or None on failure""" |
|
22 | """load profiler extension. return profile method, or None on failure""" | |
23 | extname = profiler |
|
23 | extname = profiler | |
24 | extensions.loadall(ui, whitelist=[extname]) |
|
24 | extensions.loadall(ui, whitelist=[extname]) | |
25 | try: |
|
25 | try: | |
26 | mod = extensions.find(extname) |
|
26 | mod = extensions.find(extname) | |
27 | except KeyError: |
|
27 | except KeyError: | |
28 | return None |
|
28 | return None | |
29 | else: |
|
29 | else: | |
30 | return getattr(mod, 'profile', None) |
|
30 | return getattr(mod, 'profile', None) | |
31 |
|
31 | |||
32 | @contextlib.contextmanager |
|
32 | @contextlib.contextmanager | |
33 | def lsprofile(ui, fp): |
|
33 | def lsprofile(ui, fp): | |
34 | format = ui.config('profiling', 'format') |
|
34 | format = ui.config('profiling', 'format') | |
35 | field = ui.config('profiling', 'sort') |
|
35 | field = ui.config('profiling', 'sort') | |
36 | limit = ui.configint('profiling', 'limit') |
|
36 | limit = ui.configint('profiling', 'limit') | |
37 | climit = ui.configint('profiling', 'nested') |
|
37 | climit = ui.configint('profiling', 'nested') | |
38 |
|
38 | |||
39 | if format not in ['text', 'kcachegrind']: |
|
39 | if format not in ['text', 'kcachegrind']: | |
40 | ui.warn(_("unrecognized profiling format '%s'" |
|
40 | ui.warn(_("unrecognized profiling format '%s'" | |
41 | " - Ignored\n") % format) |
|
41 | " - Ignored\n") % format) | |
42 | format = 'text' |
|
42 | format = 'text' | |
43 |
|
43 | |||
44 | try: |
|
44 | try: | |
45 | from . import lsprof |
|
45 | from . import lsprof | |
46 | except ImportError: |
|
46 | except ImportError: | |
47 | raise error.Abort(_( |
|
47 | raise error.Abort(_( | |
48 | 'lsprof not available - install from ' |
|
48 | 'lsprof not available - install from ' | |
49 | 'http://codespeak.net/svn/user/arigo/hack/misc/lsprof/')) |
|
49 | 'http://codespeak.net/svn/user/arigo/hack/misc/lsprof/')) | |
50 | p = lsprof.Profiler() |
|
50 | p = lsprof.Profiler() | |
51 | p.enable(subcalls=True) |
|
51 | p.enable(subcalls=True) | |
52 | try: |
|
52 | try: | |
53 | yield |
|
53 | yield | |
54 | finally: |
|
54 | finally: | |
55 | p.disable() |
|
55 | p.disable() | |
56 |
|
56 | |||
57 | if format == 'kcachegrind': |
|
57 | if format == 'kcachegrind': | |
58 | from . import lsprofcalltree |
|
58 | from . import lsprofcalltree | |
59 | calltree = lsprofcalltree.KCacheGrind(p) |
|
59 | calltree = lsprofcalltree.KCacheGrind(p) | |
60 | calltree.output(fp) |
|
60 | calltree.output(fp) | |
61 | else: |
|
61 | else: | |
62 | # format == 'text' |
|
62 | # format == 'text' | |
63 | stats = lsprof.Stats(p.getstats()) |
|
63 | stats = lsprof.Stats(p.getstats()) | |
64 | stats.sort(pycompat.sysstr(field)) |
|
64 | stats.sort(pycompat.sysstr(field)) | |
65 | stats.pprint(limit=limit, file=fp, climit=climit) |
|
65 | stats.pprint(limit=limit, file=fp, climit=climit) | |
66 |
|
66 | |||
67 | @contextlib.contextmanager |
|
67 | @contextlib.contextmanager | |
68 | def flameprofile(ui, fp): |
|
68 | def flameprofile(ui, fp): | |
69 | try: |
|
69 | try: | |
70 | from flamegraph import flamegraph |
|
70 | from flamegraph import flamegraph | |
71 | except ImportError: |
|
71 | except ImportError: | |
72 | raise error.Abort(_( |
|
72 | raise error.Abort(_( | |
73 | 'flamegraph not available - install from ' |
|
73 | 'flamegraph not available - install from ' | |
74 | 'https://github.com/evanhempel/python-flamegraph')) |
|
74 | 'https://github.com/evanhempel/python-flamegraph')) | |
75 | # developer config: profiling.freq |
|
75 | # developer config: profiling.freq | |
76 | freq = ui.configint('profiling', 'freq') |
|
76 | freq = ui.configint('profiling', 'freq') | |
77 | filter_ = None |
|
77 | filter_ = None | |
78 | collapse_recursion = True |
|
78 | collapse_recursion = True | |
79 | thread = flamegraph.ProfileThread(fp, 1.0 / freq, |
|
79 | thread = flamegraph.ProfileThread(fp, 1.0 / freq, | |
80 | filter_, collapse_recursion) |
|
80 | filter_, collapse_recursion) | |
81 | start_time = util.timer() |
|
81 | start_time = util.timer() | |
82 | try: |
|
82 | try: | |
83 | thread.start() |
|
83 | thread.start() | |
84 | yield |
|
84 | yield | |
85 | finally: |
|
85 | finally: | |
86 | thread.stop() |
|
86 | thread.stop() | |
87 | thread.join() |
|
87 | thread.join() | |
88 | print('Collected %d stack frames (%d unique) in %2.2f seconds.' % ( |
|
88 | print('Collected %d stack frames (%d unique) in %2.2f seconds.' % ( | |
89 | util.timer() - start_time, thread.num_frames(), |
|
89 | util.timer() - start_time, thread.num_frames(), | |
90 | thread.num_frames(unique=True))) |
|
90 | thread.num_frames(unique=True))) | |
91 |
|
91 | |||
92 | @contextlib.contextmanager |
|
92 | @contextlib.contextmanager | |
93 | def statprofile(ui, fp): |
|
93 | def statprofile(ui, fp): | |
94 | from . import statprof |
|
94 | from . import statprof | |
95 |
|
95 | |||
96 | freq = ui.configint('profiling', 'freq') |
|
96 | freq = ui.configint('profiling', 'freq') | |
97 | if freq > 0: |
|
97 | if freq > 0: | |
98 | # Cannot reset when profiler is already active. So silently no-op. |
|
98 | # Cannot reset when profiler is already active. So silently no-op. | |
99 | if statprof.state.profile_level == 0: |
|
99 | if statprof.state.profile_level == 0: | |
100 | statprof.reset(freq) |
|
100 | statprof.reset(freq) | |
101 | else: |
|
101 | else: | |
102 | ui.warn(_("invalid sampling frequency '%s' - ignoring\n") % freq) |
|
102 | ui.warn(_("invalid sampling frequency '%s' - ignoring\n") % freq) | |
103 |
|
103 | |||
104 |
track = ui.config('profiling', 'time-track' |
|
104 | track = ui.config('profiling', 'time-track', | |
|
105 | pycompat.iswindows and 'cpu' or 'real') | |||
105 | statprof.start(mechanism='thread', track=track) |
|
106 | statprof.start(mechanism='thread', track=track) | |
106 |
|
107 | |||
107 | try: |
|
108 | try: | |
108 | yield |
|
109 | yield | |
109 | finally: |
|
110 | finally: | |
110 | data = statprof.stop() |
|
111 | data = statprof.stop() | |
111 |
|
112 | |||
112 | profformat = ui.config('profiling', 'statformat') |
|
113 | profformat = ui.config('profiling', 'statformat') | |
113 |
|
114 | |||
114 | formats = { |
|
115 | formats = { | |
115 | 'byline': statprof.DisplayFormats.ByLine, |
|
116 | 'byline': statprof.DisplayFormats.ByLine, | |
116 | 'bymethod': statprof.DisplayFormats.ByMethod, |
|
117 | 'bymethod': statprof.DisplayFormats.ByMethod, | |
117 | 'hotpath': statprof.DisplayFormats.Hotpath, |
|
118 | 'hotpath': statprof.DisplayFormats.Hotpath, | |
118 | 'json': statprof.DisplayFormats.Json, |
|
119 | 'json': statprof.DisplayFormats.Json, | |
119 | 'chrome': statprof.DisplayFormats.Chrome, |
|
120 | 'chrome': statprof.DisplayFormats.Chrome, | |
120 | } |
|
121 | } | |
121 |
|
122 | |||
122 | if profformat in formats: |
|
123 | if profformat in formats: | |
123 | displayformat = formats[profformat] |
|
124 | displayformat = formats[profformat] | |
124 | else: |
|
125 | else: | |
125 | ui.warn(_('unknown profiler output format: %s\n') % profformat) |
|
126 | ui.warn(_('unknown profiler output format: %s\n') % profformat) | |
126 | displayformat = statprof.DisplayFormats.Hotpath |
|
127 | displayformat = statprof.DisplayFormats.Hotpath | |
127 |
|
128 | |||
128 | kwargs = {} |
|
129 | kwargs = {} | |
129 |
|
130 | |||
130 | def fraction(s): |
|
131 | def fraction(s): | |
131 | if isinstance(s, (float, int)): |
|
132 | if isinstance(s, (float, int)): | |
132 | return float(s) |
|
133 | return float(s) | |
133 | if s.endswith('%'): |
|
134 | if s.endswith('%'): | |
134 | v = float(s[:-1]) / 100 |
|
135 | v = float(s[:-1]) / 100 | |
135 | else: |
|
136 | else: | |
136 | v = float(s) |
|
137 | v = float(s) | |
137 | if 0 <= v <= 1: |
|
138 | if 0 <= v <= 1: | |
138 | return v |
|
139 | return v | |
139 | raise ValueError(s) |
|
140 | raise ValueError(s) | |
140 |
|
141 | |||
141 | if profformat == 'chrome': |
|
142 | if profformat == 'chrome': | |
142 | showmin = ui.configwith(fraction, 'profiling', 'showmin', 0.005) |
|
143 | showmin = ui.configwith(fraction, 'profiling', 'showmin', 0.005) | |
143 | showmax = ui.configwith(fraction, 'profiling', 'showmax') |
|
144 | showmax = ui.configwith(fraction, 'profiling', 'showmax') | |
144 | kwargs.update(minthreshold=showmin, maxthreshold=showmax) |
|
145 | kwargs.update(minthreshold=showmin, maxthreshold=showmax) | |
145 | elif profformat == 'hotpath': |
|
146 | elif profformat == 'hotpath': | |
146 | # inconsistent config: profiling.showmin |
|
147 | # inconsistent config: profiling.showmin | |
147 | limit = ui.configwith(fraction, 'profiling', 'showmin', 0.05) |
|
148 | limit = ui.configwith(fraction, 'profiling', 'showmin', 0.05) | |
148 | kwargs[r'limit'] = limit |
|
149 | kwargs[r'limit'] = limit | |
149 |
|
150 | |||
150 | statprof.display(fp, data=data, format=displayformat, **kwargs) |
|
151 | statprof.display(fp, data=data, format=displayformat, **kwargs) | |
151 |
|
152 | |||
152 | class profile(object): |
|
153 | class profile(object): | |
153 | """Start profiling. |
|
154 | """Start profiling. | |
154 |
|
155 | |||
155 | Profiling is active when the context manager is active. When the context |
|
156 | Profiling is active when the context manager is active. When the context | |
156 | manager exits, profiling results will be written to the configured output. |
|
157 | manager exits, profiling results will be written to the configured output. | |
157 | """ |
|
158 | """ | |
158 | def __init__(self, ui, enabled=True): |
|
159 | def __init__(self, ui, enabled=True): | |
159 | self._ui = ui |
|
160 | self._ui = ui | |
160 | self._output = None |
|
161 | self._output = None | |
161 | self._fp = None |
|
162 | self._fp = None | |
162 | self._fpdoclose = True |
|
163 | self._fpdoclose = True | |
163 | self._profiler = None |
|
164 | self._profiler = None | |
164 | self._enabled = enabled |
|
165 | self._enabled = enabled | |
165 | self._entered = False |
|
166 | self._entered = False | |
166 | self._started = False |
|
167 | self._started = False | |
167 |
|
168 | |||
168 | def __enter__(self): |
|
169 | def __enter__(self): | |
169 | self._entered = True |
|
170 | self._entered = True | |
170 | if self._enabled: |
|
171 | if self._enabled: | |
171 | self.start() |
|
172 | self.start() | |
172 | return self |
|
173 | return self | |
173 |
|
174 | |||
174 | def start(self): |
|
175 | def start(self): | |
175 | """Start profiling. |
|
176 | """Start profiling. | |
176 |
|
177 | |||
177 | The profiling will stop at the context exit. |
|
178 | The profiling will stop at the context exit. | |
178 |
|
179 | |||
179 | If the profiler was already started, this has no effect.""" |
|
180 | If the profiler was already started, this has no effect.""" | |
180 | if not self._entered: |
|
181 | if not self._entered: | |
181 | raise error.ProgrammingError() |
|
182 | raise error.ProgrammingError() | |
182 | if self._started: |
|
183 | if self._started: | |
183 | return |
|
184 | return | |
184 | self._started = True |
|
185 | self._started = True | |
185 | profiler = encoding.environ.get('HGPROF') |
|
186 | profiler = encoding.environ.get('HGPROF') | |
186 | proffn = None |
|
187 | proffn = None | |
187 | if profiler is None: |
|
188 | if profiler is None: | |
188 | profiler = self._ui.config('profiling', 'type') |
|
189 | profiler = self._ui.config('profiling', 'type') | |
189 | if profiler not in ('ls', 'stat', 'flame'): |
|
190 | if profiler not in ('ls', 'stat', 'flame'): | |
190 | # try load profiler from extension with the same name |
|
191 | # try load profiler from extension with the same name | |
191 | proffn = _loadprofiler(self._ui, profiler) |
|
192 | proffn = _loadprofiler(self._ui, profiler) | |
192 | if proffn is None: |
|
193 | if proffn is None: | |
193 | self._ui.warn(_("unrecognized profiler '%s' - ignored\n") |
|
194 | self._ui.warn(_("unrecognized profiler '%s' - ignored\n") | |
194 | % profiler) |
|
195 | % profiler) | |
195 | profiler = 'stat' |
|
196 | profiler = 'stat' | |
196 |
|
197 | |||
197 | self._output = self._ui.config('profiling', 'output') |
|
198 | self._output = self._ui.config('profiling', 'output') | |
198 |
|
199 | |||
199 | try: |
|
200 | try: | |
200 | if self._output == 'blackbox': |
|
201 | if self._output == 'blackbox': | |
201 | self._fp = util.stringio() |
|
202 | self._fp = util.stringio() | |
202 | elif self._output: |
|
203 | elif self._output: | |
203 | path = self._ui.expandpath(self._output) |
|
204 | path = self._ui.expandpath(self._output) | |
204 | self._fp = open(path, 'wb') |
|
205 | self._fp = open(path, 'wb') | |
205 | elif pycompat.iswindows: |
|
206 | elif pycompat.iswindows: | |
206 | # parse escape sequence by win32print() |
|
207 | # parse escape sequence by win32print() | |
207 | class uifp(object): |
|
208 | class uifp(object): | |
208 | def __init__(self, ui): |
|
209 | def __init__(self, ui): | |
209 | self._ui = ui |
|
210 | self._ui = ui | |
210 | def write(self, data): |
|
211 | def write(self, data): | |
211 | self._ui.write_err(data) |
|
212 | self._ui.write_err(data) | |
212 | def flush(self): |
|
213 | def flush(self): | |
213 | self._ui.flush() |
|
214 | self._ui.flush() | |
214 | self._fpdoclose = False |
|
215 | self._fpdoclose = False | |
215 | self._fp = uifp(self._ui) |
|
216 | self._fp = uifp(self._ui) | |
216 | else: |
|
217 | else: | |
217 | self._fpdoclose = False |
|
218 | self._fpdoclose = False | |
218 | self._fp = self._ui.ferr |
|
219 | self._fp = self._ui.ferr | |
219 |
|
220 | |||
220 | if proffn is not None: |
|
221 | if proffn is not None: | |
221 | pass |
|
222 | pass | |
222 | elif profiler == 'ls': |
|
223 | elif profiler == 'ls': | |
223 | proffn = lsprofile |
|
224 | proffn = lsprofile | |
224 | elif profiler == 'flame': |
|
225 | elif profiler == 'flame': | |
225 | proffn = flameprofile |
|
226 | proffn = flameprofile | |
226 | else: |
|
227 | else: | |
227 | proffn = statprofile |
|
228 | proffn = statprofile | |
228 |
|
229 | |||
229 | self._profiler = proffn(self._ui, self._fp) |
|
230 | self._profiler = proffn(self._ui, self._fp) | |
230 | self._profiler.__enter__() |
|
231 | self._profiler.__enter__() | |
231 | except: # re-raises |
|
232 | except: # re-raises | |
232 | self._closefp() |
|
233 | self._closefp() | |
233 | raise |
|
234 | raise | |
234 |
|
235 | |||
235 | def __exit__(self, exception_type, exception_value, traceback): |
|
236 | def __exit__(self, exception_type, exception_value, traceback): | |
236 | propagate = None |
|
237 | propagate = None | |
237 | if self._profiler is not None: |
|
238 | if self._profiler is not None: | |
238 | propagate = self._profiler.__exit__(exception_type, exception_value, |
|
239 | propagate = self._profiler.__exit__(exception_type, exception_value, | |
239 | traceback) |
|
240 | traceback) | |
240 | if self._output == 'blackbox': |
|
241 | if self._output == 'blackbox': | |
241 | val = 'Profile:\n%s' % self._fp.getvalue() |
|
242 | val = 'Profile:\n%s' % self._fp.getvalue() | |
242 | # ui.log treats the input as a format string, |
|
243 | # ui.log treats the input as a format string, | |
243 | # so we need to escape any % signs. |
|
244 | # so we need to escape any % signs. | |
244 | val = val.replace('%', '%%') |
|
245 | val = val.replace('%', '%%') | |
245 | self._ui.log('profile', val) |
|
246 | self._ui.log('profile', val) | |
246 | self._closefp() |
|
247 | self._closefp() | |
247 | return propagate |
|
248 | return propagate | |
248 |
|
249 | |||
249 | def _closefp(self): |
|
250 | def _closefp(self): | |
250 | if self._fpdoclose and self._fp is not None: |
|
251 | if self._fpdoclose and self._fp is not None: | |
251 | self._fp.close() |
|
252 | self._fp.close() |
General Comments 0
You need to be logged in to leave comments.
Login now