Show More
@@ -1,1596 +1,1597 b'' | |||||
1 | # configitems.py - centralized declaration of configuration option |
|
1 | # configitems.py - centralized declaration of configuration option | |
2 | # |
|
2 | # | |
3 | # Copyright 2017 Pierre-Yves David <pierre-yves.david@octobus.net> |
|
3 | # Copyright 2017 Pierre-Yves David <pierre-yves.david@octobus.net> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import functools |
|
10 | import functools | |
11 | import re |
|
11 | import re | |
12 |
|
12 | |||
13 | from . import ( |
|
13 | from . import ( | |
14 | encoding, |
|
14 | encoding, | |
15 | error, |
|
15 | error, | |
16 | ) |
|
16 | ) | |
17 |
|
17 | |||
18 |
|
18 | |||
19 | def loadconfigtable(ui, extname, configtable): |
|
19 | def loadconfigtable(ui, extname, configtable): | |
20 | """update config item known to the ui with the extension ones""" |
|
20 | """update config item known to the ui with the extension ones""" | |
21 | for section, items in sorted(configtable.items()): |
|
21 | for section, items in sorted(configtable.items()): | |
22 | knownitems = ui._knownconfig.setdefault(section, itemregister()) |
|
22 | knownitems = ui._knownconfig.setdefault(section, itemregister()) | |
23 | knownkeys = set(knownitems) |
|
23 | knownkeys = set(knownitems) | |
24 | newkeys = set(items) |
|
24 | newkeys = set(items) | |
25 | for key in sorted(knownkeys & newkeys): |
|
25 | for key in sorted(knownkeys & newkeys): | |
26 | msg = b"extension '%s' overwrite config item '%s.%s'" |
|
26 | msg = b"extension '%s' overwrite config item '%s.%s'" | |
27 | msg %= (extname, section, key) |
|
27 | msg %= (extname, section, key) | |
28 | ui.develwarn(msg, config=b'warn-config') |
|
28 | ui.develwarn(msg, config=b'warn-config') | |
29 |
|
29 | |||
30 | knownitems.update(items) |
|
30 | knownitems.update(items) | |
31 |
|
31 | |||
32 |
|
32 | |||
33 | class configitem(object): |
|
33 | class configitem(object): | |
34 | """represent a known config item |
|
34 | """represent a known config item | |
35 |
|
35 | |||
36 | :section: the official config section where to find this item, |
|
36 | :section: the official config section where to find this item, | |
37 | :name: the official name within the section, |
|
37 | :name: the official name within the section, | |
38 | :default: default value for this item, |
|
38 | :default: default value for this item, | |
39 | :alias: optional list of tuples as alternatives, |
|
39 | :alias: optional list of tuples as alternatives, | |
40 | :generic: this is a generic definition, match name using regular expression. |
|
40 | :generic: this is a generic definition, match name using regular expression. | |
41 | """ |
|
41 | """ | |
42 |
|
42 | |||
43 | def __init__( |
|
43 | def __init__( | |
44 | self, |
|
44 | self, | |
45 | section, |
|
45 | section, | |
46 | name, |
|
46 | name, | |
47 | default=None, |
|
47 | default=None, | |
48 | alias=(), |
|
48 | alias=(), | |
49 | generic=False, |
|
49 | generic=False, | |
50 | priority=0, |
|
50 | priority=0, | |
51 | experimental=False, |
|
51 | experimental=False, | |
52 | ): |
|
52 | ): | |
53 | self.section = section |
|
53 | self.section = section | |
54 | self.name = name |
|
54 | self.name = name | |
55 | self.default = default |
|
55 | self.default = default | |
56 | self.alias = list(alias) |
|
56 | self.alias = list(alias) | |
57 | self.generic = generic |
|
57 | self.generic = generic | |
58 | self.priority = priority |
|
58 | self.priority = priority | |
59 | self.experimental = experimental |
|
59 | self.experimental = experimental | |
60 | self._re = None |
|
60 | self._re = None | |
61 | if generic: |
|
61 | if generic: | |
62 | self._re = re.compile(self.name) |
|
62 | self._re = re.compile(self.name) | |
63 |
|
63 | |||
64 |
|
64 | |||
65 | class itemregister(dict): |
|
65 | class itemregister(dict): | |
66 | """A specialized dictionary that can handle wild-card selection""" |
|
66 | """A specialized dictionary that can handle wild-card selection""" | |
67 |
|
67 | |||
68 | def __init__(self): |
|
68 | def __init__(self): | |
69 | super(itemregister, self).__init__() |
|
69 | super(itemregister, self).__init__() | |
70 | self._generics = set() |
|
70 | self._generics = set() | |
71 |
|
71 | |||
72 | def update(self, other): |
|
72 | def update(self, other): | |
73 | super(itemregister, self).update(other) |
|
73 | super(itemregister, self).update(other) | |
74 | self._generics.update(other._generics) |
|
74 | self._generics.update(other._generics) | |
75 |
|
75 | |||
76 | def __setitem__(self, key, item): |
|
76 | def __setitem__(self, key, item): | |
77 | super(itemregister, self).__setitem__(key, item) |
|
77 | super(itemregister, self).__setitem__(key, item) | |
78 | if item.generic: |
|
78 | if item.generic: | |
79 | self._generics.add(item) |
|
79 | self._generics.add(item) | |
80 |
|
80 | |||
81 | def get(self, key): |
|
81 | def get(self, key): | |
82 | baseitem = super(itemregister, self).get(key) |
|
82 | baseitem = super(itemregister, self).get(key) | |
83 | if baseitem is not None and not baseitem.generic: |
|
83 | if baseitem is not None and not baseitem.generic: | |
84 | return baseitem |
|
84 | return baseitem | |
85 |
|
85 | |||
86 | # search for a matching generic item |
|
86 | # search for a matching generic item | |
87 | generics = sorted(self._generics, key=(lambda x: (x.priority, x.name))) |
|
87 | generics = sorted(self._generics, key=(lambda x: (x.priority, x.name))) | |
88 | for item in generics: |
|
88 | for item in generics: | |
89 | # we use 'match' instead of 'search' to make the matching simpler |
|
89 | # we use 'match' instead of 'search' to make the matching simpler | |
90 | # for people unfamiliar with regular expression. Having the match |
|
90 | # for people unfamiliar with regular expression. Having the match | |
91 | # rooted to the start of the string will produce less surprising |
|
91 | # rooted to the start of the string will produce less surprising | |
92 | # result for user writing simple regex for sub-attribute. |
|
92 | # result for user writing simple regex for sub-attribute. | |
93 | # |
|
93 | # | |
94 | # For example using "color\..*" match produces an unsurprising |
|
94 | # For example using "color\..*" match produces an unsurprising | |
95 | # result, while using search could suddenly match apparently |
|
95 | # result, while using search could suddenly match apparently | |
96 | # unrelated configuration that happens to contains "color." |
|
96 | # unrelated configuration that happens to contains "color." | |
97 | # anywhere. This is a tradeoff where we favor requiring ".*" on |
|
97 | # anywhere. This is a tradeoff where we favor requiring ".*" on | |
98 | # some match to avoid the need to prefix most pattern with "^". |
|
98 | # some match to avoid the need to prefix most pattern with "^". | |
99 | # The "^" seems more error prone. |
|
99 | # The "^" seems more error prone. | |
100 | if item._re.match(key): |
|
100 | if item._re.match(key): | |
101 | return item |
|
101 | return item | |
102 |
|
102 | |||
103 | return None |
|
103 | return None | |
104 |
|
104 | |||
105 |
|
105 | |||
106 | coreitems = {} |
|
106 | coreitems = {} | |
107 |
|
107 | |||
108 |
|
108 | |||
109 | def _register(configtable, *args, **kwargs): |
|
109 | def _register(configtable, *args, **kwargs): | |
110 | item = configitem(*args, **kwargs) |
|
110 | item = configitem(*args, **kwargs) | |
111 | section = configtable.setdefault(item.section, itemregister()) |
|
111 | section = configtable.setdefault(item.section, itemregister()) | |
112 | if item.name in section: |
|
112 | if item.name in section: | |
113 | msg = b"duplicated config item registration for '%s.%s'" |
|
113 | msg = b"duplicated config item registration for '%s.%s'" | |
114 | raise error.ProgrammingError(msg % (item.section, item.name)) |
|
114 | raise error.ProgrammingError(msg % (item.section, item.name)) | |
115 | section[item.name] = item |
|
115 | section[item.name] = item | |
116 |
|
116 | |||
117 |
|
117 | |||
118 | # special value for case where the default is derived from other values |
|
118 | # special value for case where the default is derived from other values | |
119 | dynamicdefault = object() |
|
119 | dynamicdefault = object() | |
120 |
|
120 | |||
121 | # Registering actual config items |
|
121 | # Registering actual config items | |
122 |
|
122 | |||
123 |
|
123 | |||
124 | def getitemregister(configtable): |
|
124 | def getitemregister(configtable): | |
125 | f = functools.partial(_register, configtable) |
|
125 | f = functools.partial(_register, configtable) | |
126 | # export pseudo enum as configitem.* |
|
126 | # export pseudo enum as configitem.* | |
127 | f.dynamicdefault = dynamicdefault |
|
127 | f.dynamicdefault = dynamicdefault | |
128 | return f |
|
128 | return f | |
129 |
|
129 | |||
130 |
|
130 | |||
131 | coreconfigitem = getitemregister(coreitems) |
|
131 | coreconfigitem = getitemregister(coreitems) | |
132 |
|
132 | |||
133 |
|
133 | |||
134 | def _registerdiffopts(section, configprefix=b''): |
|
134 | def _registerdiffopts(section, configprefix=b''): | |
135 | coreconfigitem( |
|
135 | coreconfigitem( | |
136 | section, configprefix + b'nodates', default=False, |
|
136 | section, configprefix + b'nodates', default=False, | |
137 | ) |
|
137 | ) | |
138 | coreconfigitem( |
|
138 | coreconfigitem( | |
139 | section, configprefix + b'showfunc', default=False, |
|
139 | section, configprefix + b'showfunc', default=False, | |
140 | ) |
|
140 | ) | |
141 | coreconfigitem( |
|
141 | coreconfigitem( | |
142 | section, configprefix + b'unified', default=None, |
|
142 | section, configprefix + b'unified', default=None, | |
143 | ) |
|
143 | ) | |
144 | coreconfigitem( |
|
144 | coreconfigitem( | |
145 | section, configprefix + b'git', default=False, |
|
145 | section, configprefix + b'git', default=False, | |
146 | ) |
|
146 | ) | |
147 | coreconfigitem( |
|
147 | coreconfigitem( | |
148 | section, configprefix + b'ignorews', default=False, |
|
148 | section, configprefix + b'ignorews', default=False, | |
149 | ) |
|
149 | ) | |
150 | coreconfigitem( |
|
150 | coreconfigitem( | |
151 | section, configprefix + b'ignorewsamount', default=False, |
|
151 | section, configprefix + b'ignorewsamount', default=False, | |
152 | ) |
|
152 | ) | |
153 | coreconfigitem( |
|
153 | coreconfigitem( | |
154 | section, configprefix + b'ignoreblanklines', default=False, |
|
154 | section, configprefix + b'ignoreblanklines', default=False, | |
155 | ) |
|
155 | ) | |
156 | coreconfigitem( |
|
156 | coreconfigitem( | |
157 | section, configprefix + b'ignorewseol', default=False, |
|
157 | section, configprefix + b'ignorewseol', default=False, | |
158 | ) |
|
158 | ) | |
159 | coreconfigitem( |
|
159 | coreconfigitem( | |
160 | section, configprefix + b'nobinary', default=False, |
|
160 | section, configprefix + b'nobinary', default=False, | |
161 | ) |
|
161 | ) | |
162 | coreconfigitem( |
|
162 | coreconfigitem( | |
163 | section, configprefix + b'noprefix', default=False, |
|
163 | section, configprefix + b'noprefix', default=False, | |
164 | ) |
|
164 | ) | |
165 | coreconfigitem( |
|
165 | coreconfigitem( | |
166 | section, configprefix + b'word-diff', default=False, |
|
166 | section, configprefix + b'word-diff', default=False, | |
167 | ) |
|
167 | ) | |
168 |
|
168 | |||
169 |
|
169 | |||
170 | coreconfigitem( |
|
170 | coreconfigitem( | |
171 | b'alias', b'.*', default=dynamicdefault, generic=True, |
|
171 | b'alias', b'.*', default=dynamicdefault, generic=True, | |
172 | ) |
|
172 | ) | |
173 | coreconfigitem( |
|
173 | coreconfigitem( | |
174 | b'auth', b'cookiefile', default=None, |
|
174 | b'auth', b'cookiefile', default=None, | |
175 | ) |
|
175 | ) | |
176 | _registerdiffopts(section=b'annotate') |
|
176 | _registerdiffopts(section=b'annotate') | |
177 | # bookmarks.pushing: internal hack for discovery |
|
177 | # bookmarks.pushing: internal hack for discovery | |
178 | coreconfigitem( |
|
178 | coreconfigitem( | |
179 | b'bookmarks', b'pushing', default=list, |
|
179 | b'bookmarks', b'pushing', default=list, | |
180 | ) |
|
180 | ) | |
181 | # bundle.mainreporoot: internal hack for bundlerepo |
|
181 | # bundle.mainreporoot: internal hack for bundlerepo | |
182 | coreconfigitem( |
|
182 | coreconfigitem( | |
183 | b'bundle', b'mainreporoot', default=b'', |
|
183 | b'bundle', b'mainreporoot', default=b'', | |
184 | ) |
|
184 | ) | |
185 | coreconfigitem( |
|
185 | coreconfigitem( | |
186 | b'censor', b'policy', default=b'abort', experimental=True, |
|
186 | b'censor', b'policy', default=b'abort', experimental=True, | |
187 | ) |
|
187 | ) | |
188 | coreconfigitem( |
|
188 | coreconfigitem( | |
189 | b'chgserver', b'idletimeout', default=3600, |
|
189 | b'chgserver', b'idletimeout', default=3600, | |
190 | ) |
|
190 | ) | |
191 | coreconfigitem( |
|
191 | coreconfigitem( | |
192 | b'chgserver', b'skiphash', default=False, |
|
192 | b'chgserver', b'skiphash', default=False, | |
193 | ) |
|
193 | ) | |
194 | coreconfigitem( |
|
194 | coreconfigitem( | |
195 | b'cmdserver', b'log', default=None, |
|
195 | b'cmdserver', b'log', default=None, | |
196 | ) |
|
196 | ) | |
197 | coreconfigitem( |
|
197 | coreconfigitem( | |
198 | b'cmdserver', b'max-log-files', default=7, |
|
198 | b'cmdserver', b'max-log-files', default=7, | |
199 | ) |
|
199 | ) | |
200 | coreconfigitem( |
|
200 | coreconfigitem( | |
201 | b'cmdserver', b'max-log-size', default=b'1 MB', |
|
201 | b'cmdserver', b'max-log-size', default=b'1 MB', | |
202 | ) |
|
202 | ) | |
203 | coreconfigitem( |
|
203 | coreconfigitem( | |
204 | b'cmdserver', b'max-repo-cache', default=0, experimental=True, |
|
204 | b'cmdserver', b'max-repo-cache', default=0, experimental=True, | |
205 | ) |
|
205 | ) | |
206 | coreconfigitem( |
|
206 | coreconfigitem( | |
207 | b'cmdserver', b'message-encodings', default=list, |
|
207 | b'cmdserver', b'message-encodings', default=list, | |
208 | ) |
|
208 | ) | |
209 | coreconfigitem( |
|
209 | coreconfigitem( | |
210 | b'cmdserver', |
|
210 | b'cmdserver', | |
211 | b'track-log', |
|
211 | b'track-log', | |
212 | default=lambda: [b'chgserver', b'cmdserver', b'repocache'], |
|
212 | default=lambda: [b'chgserver', b'cmdserver', b'repocache'], | |
213 | ) |
|
213 | ) | |
214 | coreconfigitem( |
|
214 | coreconfigitem( | |
215 | b'cmdserver', b'shutdown-on-interrupt', default=True, |
|
215 | b'cmdserver', b'shutdown-on-interrupt', default=True, | |
216 | ) |
|
216 | ) | |
217 | coreconfigitem( |
|
217 | coreconfigitem( | |
218 | b'color', b'.*', default=None, generic=True, |
|
218 | b'color', b'.*', default=None, generic=True, | |
219 | ) |
|
219 | ) | |
220 | coreconfigitem( |
|
220 | coreconfigitem( | |
221 | b'color', b'mode', default=b'auto', |
|
221 | b'color', b'mode', default=b'auto', | |
222 | ) |
|
222 | ) | |
223 | coreconfigitem( |
|
223 | coreconfigitem( | |
224 | b'color', b'pagermode', default=dynamicdefault, |
|
224 | b'color', b'pagermode', default=dynamicdefault, | |
225 | ) |
|
225 | ) | |
226 | coreconfigitem( |
|
226 | coreconfigitem( | |
227 | b'command-templates', |
|
227 | b'command-templates', | |
228 | b'graphnode', |
|
228 | b'graphnode', | |
229 | default=None, |
|
229 | default=None, | |
230 | alias=[(b'ui', b'graphnodetemplate')], |
|
230 | alias=[(b'ui', b'graphnodetemplate')], | |
231 | ) |
|
231 | ) | |
232 | coreconfigitem( |
|
232 | coreconfigitem( | |
233 | b'command-templates', b'log', default=None, alias=[(b'ui', b'logtemplate')], |
|
233 | b'command-templates', b'log', default=None, alias=[(b'ui', b'logtemplate')], | |
234 | ) |
|
234 | ) | |
|
235 | coreconfigitem( | |||
|
236 | b'command-templates', | |||
|
237 | b'mergemarker', | |||
|
238 | default=( | |||
|
239 | b'{node|short} ' | |||
|
240 | b'{ifeq(tags, "tip", "", ' | |||
|
241 | b'ifeq(tags, "", "", "{tags} "))}' | |||
|
242 | b'{if(bookmarks, "{bookmarks} ")}' | |||
|
243 | b'{ifeq(branch, "default", "", "{branch} ")}' | |||
|
244 | b'- {author|user}: {desc|firstline}' | |||
|
245 | ), | |||
|
246 | alias=[(b'ui', b'mergemarkertemplate')], | |||
|
247 | ) | |||
235 | _registerdiffopts(section=b'commands', configprefix=b'commit.interactive.') |
|
248 | _registerdiffopts(section=b'commands', configprefix=b'commit.interactive.') | |
236 | coreconfigitem( |
|
249 | coreconfigitem( | |
237 | b'commands', b'commit.post-status', default=False, |
|
250 | b'commands', b'commit.post-status', default=False, | |
238 | ) |
|
251 | ) | |
239 | coreconfigitem( |
|
252 | coreconfigitem( | |
240 | b'commands', b'grep.all-files', default=False, experimental=True, |
|
253 | b'commands', b'grep.all-files', default=False, experimental=True, | |
241 | ) |
|
254 | ) | |
242 | coreconfigitem( |
|
255 | coreconfigitem( | |
243 | b'commands', b'merge.require-rev', default=False, |
|
256 | b'commands', b'merge.require-rev', default=False, | |
244 | ) |
|
257 | ) | |
245 | coreconfigitem( |
|
258 | coreconfigitem( | |
246 | b'commands', b'push.require-revs', default=False, |
|
259 | b'commands', b'push.require-revs', default=False, | |
247 | ) |
|
260 | ) | |
248 | coreconfigitem( |
|
261 | coreconfigitem( | |
249 | b'commands', b'resolve.confirm', default=False, |
|
262 | b'commands', b'resolve.confirm', default=False, | |
250 | ) |
|
263 | ) | |
251 | coreconfigitem( |
|
264 | coreconfigitem( | |
252 | b'commands', b'resolve.explicit-re-merge', default=False, |
|
265 | b'commands', b'resolve.explicit-re-merge', default=False, | |
253 | ) |
|
266 | ) | |
254 | coreconfigitem( |
|
267 | coreconfigitem( | |
255 | b'commands', b'resolve.mark-check', default=b'none', |
|
268 | b'commands', b'resolve.mark-check', default=b'none', | |
256 | ) |
|
269 | ) | |
257 | _registerdiffopts(section=b'commands', configprefix=b'revert.interactive.') |
|
270 | _registerdiffopts(section=b'commands', configprefix=b'revert.interactive.') | |
258 | coreconfigitem( |
|
271 | coreconfigitem( | |
259 | b'commands', b'show.aliasprefix', default=list, |
|
272 | b'commands', b'show.aliasprefix', default=list, | |
260 | ) |
|
273 | ) | |
261 | coreconfigitem( |
|
274 | coreconfigitem( | |
262 | b'commands', b'status.relative', default=False, |
|
275 | b'commands', b'status.relative', default=False, | |
263 | ) |
|
276 | ) | |
264 | coreconfigitem( |
|
277 | coreconfigitem( | |
265 | b'commands', b'status.skipstates', default=[], experimental=True, |
|
278 | b'commands', b'status.skipstates', default=[], experimental=True, | |
266 | ) |
|
279 | ) | |
267 | coreconfigitem( |
|
280 | coreconfigitem( | |
268 | b'commands', b'status.terse', default=b'', |
|
281 | b'commands', b'status.terse', default=b'', | |
269 | ) |
|
282 | ) | |
270 | coreconfigitem( |
|
283 | coreconfigitem( | |
271 | b'commands', b'status.verbose', default=False, |
|
284 | b'commands', b'status.verbose', default=False, | |
272 | ) |
|
285 | ) | |
273 | coreconfigitem( |
|
286 | coreconfigitem( | |
274 | b'commands', b'update.check', default=None, |
|
287 | b'commands', b'update.check', default=None, | |
275 | ) |
|
288 | ) | |
276 | coreconfigitem( |
|
289 | coreconfigitem( | |
277 | b'commands', b'update.requiredest', default=False, |
|
290 | b'commands', b'update.requiredest', default=False, | |
278 | ) |
|
291 | ) | |
279 | coreconfigitem( |
|
292 | coreconfigitem( | |
280 | b'committemplate', b'.*', default=None, generic=True, |
|
293 | b'committemplate', b'.*', default=None, generic=True, | |
281 | ) |
|
294 | ) | |
282 | coreconfigitem( |
|
295 | coreconfigitem( | |
283 | b'convert', b'bzr.saverev', default=True, |
|
296 | b'convert', b'bzr.saverev', default=True, | |
284 | ) |
|
297 | ) | |
285 | coreconfigitem( |
|
298 | coreconfigitem( | |
286 | b'convert', b'cvsps.cache', default=True, |
|
299 | b'convert', b'cvsps.cache', default=True, | |
287 | ) |
|
300 | ) | |
288 | coreconfigitem( |
|
301 | coreconfigitem( | |
289 | b'convert', b'cvsps.fuzz', default=60, |
|
302 | b'convert', b'cvsps.fuzz', default=60, | |
290 | ) |
|
303 | ) | |
291 | coreconfigitem( |
|
304 | coreconfigitem( | |
292 | b'convert', b'cvsps.logencoding', default=None, |
|
305 | b'convert', b'cvsps.logencoding', default=None, | |
293 | ) |
|
306 | ) | |
294 | coreconfigitem( |
|
307 | coreconfigitem( | |
295 | b'convert', b'cvsps.mergefrom', default=None, |
|
308 | b'convert', b'cvsps.mergefrom', default=None, | |
296 | ) |
|
309 | ) | |
297 | coreconfigitem( |
|
310 | coreconfigitem( | |
298 | b'convert', b'cvsps.mergeto', default=None, |
|
311 | b'convert', b'cvsps.mergeto', default=None, | |
299 | ) |
|
312 | ) | |
300 | coreconfigitem( |
|
313 | coreconfigitem( | |
301 | b'convert', b'git.committeractions', default=lambda: [b'messagedifferent'], |
|
314 | b'convert', b'git.committeractions', default=lambda: [b'messagedifferent'], | |
302 | ) |
|
315 | ) | |
303 | coreconfigitem( |
|
316 | coreconfigitem( | |
304 | b'convert', b'git.extrakeys', default=list, |
|
317 | b'convert', b'git.extrakeys', default=list, | |
305 | ) |
|
318 | ) | |
306 | coreconfigitem( |
|
319 | coreconfigitem( | |
307 | b'convert', b'git.findcopiesharder', default=False, |
|
320 | b'convert', b'git.findcopiesharder', default=False, | |
308 | ) |
|
321 | ) | |
309 | coreconfigitem( |
|
322 | coreconfigitem( | |
310 | b'convert', b'git.remoteprefix', default=b'remote', |
|
323 | b'convert', b'git.remoteprefix', default=b'remote', | |
311 | ) |
|
324 | ) | |
312 | coreconfigitem( |
|
325 | coreconfigitem( | |
313 | b'convert', b'git.renamelimit', default=400, |
|
326 | b'convert', b'git.renamelimit', default=400, | |
314 | ) |
|
327 | ) | |
315 | coreconfigitem( |
|
328 | coreconfigitem( | |
316 | b'convert', b'git.saverev', default=True, |
|
329 | b'convert', b'git.saverev', default=True, | |
317 | ) |
|
330 | ) | |
318 | coreconfigitem( |
|
331 | coreconfigitem( | |
319 | b'convert', b'git.similarity', default=50, |
|
332 | b'convert', b'git.similarity', default=50, | |
320 | ) |
|
333 | ) | |
321 | coreconfigitem( |
|
334 | coreconfigitem( | |
322 | b'convert', b'git.skipsubmodules', default=False, |
|
335 | b'convert', b'git.skipsubmodules', default=False, | |
323 | ) |
|
336 | ) | |
324 | coreconfigitem( |
|
337 | coreconfigitem( | |
325 | b'convert', b'hg.clonebranches', default=False, |
|
338 | b'convert', b'hg.clonebranches', default=False, | |
326 | ) |
|
339 | ) | |
327 | coreconfigitem( |
|
340 | coreconfigitem( | |
328 | b'convert', b'hg.ignoreerrors', default=False, |
|
341 | b'convert', b'hg.ignoreerrors', default=False, | |
329 | ) |
|
342 | ) | |
330 | coreconfigitem( |
|
343 | coreconfigitem( | |
331 | b'convert', b'hg.preserve-hash', default=False, |
|
344 | b'convert', b'hg.preserve-hash', default=False, | |
332 | ) |
|
345 | ) | |
333 | coreconfigitem( |
|
346 | coreconfigitem( | |
334 | b'convert', b'hg.revs', default=None, |
|
347 | b'convert', b'hg.revs', default=None, | |
335 | ) |
|
348 | ) | |
336 | coreconfigitem( |
|
349 | coreconfigitem( | |
337 | b'convert', b'hg.saverev', default=False, |
|
350 | b'convert', b'hg.saverev', default=False, | |
338 | ) |
|
351 | ) | |
339 | coreconfigitem( |
|
352 | coreconfigitem( | |
340 | b'convert', b'hg.sourcename', default=None, |
|
353 | b'convert', b'hg.sourcename', default=None, | |
341 | ) |
|
354 | ) | |
342 | coreconfigitem( |
|
355 | coreconfigitem( | |
343 | b'convert', b'hg.startrev', default=None, |
|
356 | b'convert', b'hg.startrev', default=None, | |
344 | ) |
|
357 | ) | |
345 | coreconfigitem( |
|
358 | coreconfigitem( | |
346 | b'convert', b'hg.tagsbranch', default=b'default', |
|
359 | b'convert', b'hg.tagsbranch', default=b'default', | |
347 | ) |
|
360 | ) | |
348 | coreconfigitem( |
|
361 | coreconfigitem( | |
349 | b'convert', b'hg.usebranchnames', default=True, |
|
362 | b'convert', b'hg.usebranchnames', default=True, | |
350 | ) |
|
363 | ) | |
351 | coreconfigitem( |
|
364 | coreconfigitem( | |
352 | b'convert', b'ignoreancestorcheck', default=False, experimental=True, |
|
365 | b'convert', b'ignoreancestorcheck', default=False, experimental=True, | |
353 | ) |
|
366 | ) | |
354 | coreconfigitem( |
|
367 | coreconfigitem( | |
355 | b'convert', b'localtimezone', default=False, |
|
368 | b'convert', b'localtimezone', default=False, | |
356 | ) |
|
369 | ) | |
357 | coreconfigitem( |
|
370 | coreconfigitem( | |
358 | b'convert', b'p4.encoding', default=dynamicdefault, |
|
371 | b'convert', b'p4.encoding', default=dynamicdefault, | |
359 | ) |
|
372 | ) | |
360 | coreconfigitem( |
|
373 | coreconfigitem( | |
361 | b'convert', b'p4.startrev', default=0, |
|
374 | b'convert', b'p4.startrev', default=0, | |
362 | ) |
|
375 | ) | |
363 | coreconfigitem( |
|
376 | coreconfigitem( | |
364 | b'convert', b'skiptags', default=False, |
|
377 | b'convert', b'skiptags', default=False, | |
365 | ) |
|
378 | ) | |
366 | coreconfigitem( |
|
379 | coreconfigitem( | |
367 | b'convert', b'svn.debugsvnlog', default=True, |
|
380 | b'convert', b'svn.debugsvnlog', default=True, | |
368 | ) |
|
381 | ) | |
369 | coreconfigitem( |
|
382 | coreconfigitem( | |
370 | b'convert', b'svn.trunk', default=None, |
|
383 | b'convert', b'svn.trunk', default=None, | |
371 | ) |
|
384 | ) | |
372 | coreconfigitem( |
|
385 | coreconfigitem( | |
373 | b'convert', b'svn.tags', default=None, |
|
386 | b'convert', b'svn.tags', default=None, | |
374 | ) |
|
387 | ) | |
375 | coreconfigitem( |
|
388 | coreconfigitem( | |
376 | b'convert', b'svn.branches', default=None, |
|
389 | b'convert', b'svn.branches', default=None, | |
377 | ) |
|
390 | ) | |
378 | coreconfigitem( |
|
391 | coreconfigitem( | |
379 | b'convert', b'svn.startrev', default=0, |
|
392 | b'convert', b'svn.startrev', default=0, | |
380 | ) |
|
393 | ) | |
381 | coreconfigitem( |
|
394 | coreconfigitem( | |
382 | b'debug', b'dirstate.delaywrite', default=0, |
|
395 | b'debug', b'dirstate.delaywrite', default=0, | |
383 | ) |
|
396 | ) | |
384 | coreconfigitem( |
|
397 | coreconfigitem( | |
385 | b'defaults', b'.*', default=None, generic=True, |
|
398 | b'defaults', b'.*', default=None, generic=True, | |
386 | ) |
|
399 | ) | |
387 | coreconfigitem( |
|
400 | coreconfigitem( | |
388 | b'devel', b'all-warnings', default=False, |
|
401 | b'devel', b'all-warnings', default=False, | |
389 | ) |
|
402 | ) | |
390 | coreconfigitem( |
|
403 | coreconfigitem( | |
391 | b'devel', b'bundle2.debug', default=False, |
|
404 | b'devel', b'bundle2.debug', default=False, | |
392 | ) |
|
405 | ) | |
393 | coreconfigitem( |
|
406 | coreconfigitem( | |
394 | b'devel', b'bundle.delta', default=b'', |
|
407 | b'devel', b'bundle.delta', default=b'', | |
395 | ) |
|
408 | ) | |
396 | coreconfigitem( |
|
409 | coreconfigitem( | |
397 | b'devel', b'cache-vfs', default=None, |
|
410 | b'devel', b'cache-vfs', default=None, | |
398 | ) |
|
411 | ) | |
399 | coreconfigitem( |
|
412 | coreconfigitem( | |
400 | b'devel', b'check-locks', default=False, |
|
413 | b'devel', b'check-locks', default=False, | |
401 | ) |
|
414 | ) | |
402 | coreconfigitem( |
|
415 | coreconfigitem( | |
403 | b'devel', b'check-relroot', default=False, |
|
416 | b'devel', b'check-relroot', default=False, | |
404 | ) |
|
417 | ) | |
405 | coreconfigitem( |
|
418 | coreconfigitem( | |
406 | b'devel', b'default-date', default=None, |
|
419 | b'devel', b'default-date', default=None, | |
407 | ) |
|
420 | ) | |
408 | coreconfigitem( |
|
421 | coreconfigitem( | |
409 | b'devel', b'deprec-warn', default=False, |
|
422 | b'devel', b'deprec-warn', default=False, | |
410 | ) |
|
423 | ) | |
411 | coreconfigitem( |
|
424 | coreconfigitem( | |
412 | b'devel', b'disableloaddefaultcerts', default=False, |
|
425 | b'devel', b'disableloaddefaultcerts', default=False, | |
413 | ) |
|
426 | ) | |
414 | coreconfigitem( |
|
427 | coreconfigitem( | |
415 | b'devel', b'warn-empty-changegroup', default=False, |
|
428 | b'devel', b'warn-empty-changegroup', default=False, | |
416 | ) |
|
429 | ) | |
417 | coreconfigitem( |
|
430 | coreconfigitem( | |
418 | b'devel', b'legacy.exchange', default=list, |
|
431 | b'devel', b'legacy.exchange', default=list, | |
419 | ) |
|
432 | ) | |
420 | coreconfigitem( |
|
433 | coreconfigitem( | |
421 | b'devel', b'persistent-nodemap', default=False, |
|
434 | b'devel', b'persistent-nodemap', default=False, | |
422 | ) |
|
435 | ) | |
423 | coreconfigitem( |
|
436 | coreconfigitem( | |
424 | b'devel', b'servercafile', default=b'', |
|
437 | b'devel', b'servercafile', default=b'', | |
425 | ) |
|
438 | ) | |
426 | coreconfigitem( |
|
439 | coreconfigitem( | |
427 | b'devel', b'serverexactprotocol', default=b'', |
|
440 | b'devel', b'serverexactprotocol', default=b'', | |
428 | ) |
|
441 | ) | |
429 | coreconfigitem( |
|
442 | coreconfigitem( | |
430 | b'devel', b'serverrequirecert', default=False, |
|
443 | b'devel', b'serverrequirecert', default=False, | |
431 | ) |
|
444 | ) | |
432 | coreconfigitem( |
|
445 | coreconfigitem( | |
433 | b'devel', b'strip-obsmarkers', default=True, |
|
446 | b'devel', b'strip-obsmarkers', default=True, | |
434 | ) |
|
447 | ) | |
435 | coreconfigitem( |
|
448 | coreconfigitem( | |
436 | b'devel', b'warn-config', default=None, |
|
449 | b'devel', b'warn-config', default=None, | |
437 | ) |
|
450 | ) | |
438 | coreconfigitem( |
|
451 | coreconfigitem( | |
439 | b'devel', b'warn-config-default', default=None, |
|
452 | b'devel', b'warn-config-default', default=None, | |
440 | ) |
|
453 | ) | |
441 | coreconfigitem( |
|
454 | coreconfigitem( | |
442 | b'devel', b'user.obsmarker', default=None, |
|
455 | b'devel', b'user.obsmarker', default=None, | |
443 | ) |
|
456 | ) | |
444 | coreconfigitem( |
|
457 | coreconfigitem( | |
445 | b'devel', b'warn-config-unknown', default=None, |
|
458 | b'devel', b'warn-config-unknown', default=None, | |
446 | ) |
|
459 | ) | |
447 | coreconfigitem( |
|
460 | coreconfigitem( | |
448 | b'devel', b'debug.copies', default=False, |
|
461 | b'devel', b'debug.copies', default=False, | |
449 | ) |
|
462 | ) | |
450 | coreconfigitem( |
|
463 | coreconfigitem( | |
451 | b'devel', b'debug.extensions', default=False, |
|
464 | b'devel', b'debug.extensions', default=False, | |
452 | ) |
|
465 | ) | |
453 | coreconfigitem( |
|
466 | coreconfigitem( | |
454 | b'devel', b'debug.repo-filters', default=False, |
|
467 | b'devel', b'debug.repo-filters', default=False, | |
455 | ) |
|
468 | ) | |
456 | coreconfigitem( |
|
469 | coreconfigitem( | |
457 | b'devel', b'debug.peer-request', default=False, |
|
470 | b'devel', b'debug.peer-request', default=False, | |
458 | ) |
|
471 | ) | |
459 | coreconfigitem( |
|
472 | coreconfigitem( | |
460 | b'devel', b'discovery.randomize', default=True, |
|
473 | b'devel', b'discovery.randomize', default=True, | |
461 | ) |
|
474 | ) | |
462 | _registerdiffopts(section=b'diff') |
|
475 | _registerdiffopts(section=b'diff') | |
463 | coreconfigitem( |
|
476 | coreconfigitem( | |
464 | b'email', b'bcc', default=None, |
|
477 | b'email', b'bcc', default=None, | |
465 | ) |
|
478 | ) | |
466 | coreconfigitem( |
|
479 | coreconfigitem( | |
467 | b'email', b'cc', default=None, |
|
480 | b'email', b'cc', default=None, | |
468 | ) |
|
481 | ) | |
469 | coreconfigitem( |
|
482 | coreconfigitem( | |
470 | b'email', b'charsets', default=list, |
|
483 | b'email', b'charsets', default=list, | |
471 | ) |
|
484 | ) | |
472 | coreconfigitem( |
|
485 | coreconfigitem( | |
473 | b'email', b'from', default=None, |
|
486 | b'email', b'from', default=None, | |
474 | ) |
|
487 | ) | |
475 | coreconfigitem( |
|
488 | coreconfigitem( | |
476 | b'email', b'method', default=b'smtp', |
|
489 | b'email', b'method', default=b'smtp', | |
477 | ) |
|
490 | ) | |
478 | coreconfigitem( |
|
491 | coreconfigitem( | |
479 | b'email', b'reply-to', default=None, |
|
492 | b'email', b'reply-to', default=None, | |
480 | ) |
|
493 | ) | |
481 | coreconfigitem( |
|
494 | coreconfigitem( | |
482 | b'email', b'to', default=None, |
|
495 | b'email', b'to', default=None, | |
483 | ) |
|
496 | ) | |
484 | coreconfigitem( |
|
497 | coreconfigitem( | |
485 | b'experimental', b'archivemetatemplate', default=dynamicdefault, |
|
498 | b'experimental', b'archivemetatemplate', default=dynamicdefault, | |
486 | ) |
|
499 | ) | |
487 | coreconfigitem( |
|
500 | coreconfigitem( | |
488 | b'experimental', b'auto-publish', default=b'publish', |
|
501 | b'experimental', b'auto-publish', default=b'publish', | |
489 | ) |
|
502 | ) | |
490 | coreconfigitem( |
|
503 | coreconfigitem( | |
491 | b'experimental', b'bundle-phases', default=False, |
|
504 | b'experimental', b'bundle-phases', default=False, | |
492 | ) |
|
505 | ) | |
493 | coreconfigitem( |
|
506 | coreconfigitem( | |
494 | b'experimental', b'bundle2-advertise', default=True, |
|
507 | b'experimental', b'bundle2-advertise', default=True, | |
495 | ) |
|
508 | ) | |
496 | coreconfigitem( |
|
509 | coreconfigitem( | |
497 | b'experimental', b'bundle2-output-capture', default=False, |
|
510 | b'experimental', b'bundle2-output-capture', default=False, | |
498 | ) |
|
511 | ) | |
499 | coreconfigitem( |
|
512 | coreconfigitem( | |
500 | b'experimental', b'bundle2.pushback', default=False, |
|
513 | b'experimental', b'bundle2.pushback', default=False, | |
501 | ) |
|
514 | ) | |
502 | coreconfigitem( |
|
515 | coreconfigitem( | |
503 | b'experimental', b'bundle2lazylocking', default=False, |
|
516 | b'experimental', b'bundle2lazylocking', default=False, | |
504 | ) |
|
517 | ) | |
505 | coreconfigitem( |
|
518 | coreconfigitem( | |
506 | b'experimental', b'bundlecomplevel', default=None, |
|
519 | b'experimental', b'bundlecomplevel', default=None, | |
507 | ) |
|
520 | ) | |
508 | coreconfigitem( |
|
521 | coreconfigitem( | |
509 | b'experimental', b'bundlecomplevel.bzip2', default=None, |
|
522 | b'experimental', b'bundlecomplevel.bzip2', default=None, | |
510 | ) |
|
523 | ) | |
511 | coreconfigitem( |
|
524 | coreconfigitem( | |
512 | b'experimental', b'bundlecomplevel.gzip', default=None, |
|
525 | b'experimental', b'bundlecomplevel.gzip', default=None, | |
513 | ) |
|
526 | ) | |
514 | coreconfigitem( |
|
527 | coreconfigitem( | |
515 | b'experimental', b'bundlecomplevel.none', default=None, |
|
528 | b'experimental', b'bundlecomplevel.none', default=None, | |
516 | ) |
|
529 | ) | |
517 | coreconfigitem( |
|
530 | coreconfigitem( | |
518 | b'experimental', b'bundlecomplevel.zstd', default=None, |
|
531 | b'experimental', b'bundlecomplevel.zstd', default=None, | |
519 | ) |
|
532 | ) | |
520 | coreconfigitem( |
|
533 | coreconfigitem( | |
521 | b'experimental', b'changegroup3', default=False, |
|
534 | b'experimental', b'changegroup3', default=False, | |
522 | ) |
|
535 | ) | |
523 | coreconfigitem( |
|
536 | coreconfigitem( | |
524 | b'experimental', b'cleanup-as-archived', default=False, |
|
537 | b'experimental', b'cleanup-as-archived', default=False, | |
525 | ) |
|
538 | ) | |
526 | coreconfigitem( |
|
539 | coreconfigitem( | |
527 | b'experimental', b'clientcompressionengines', default=list, |
|
540 | b'experimental', b'clientcompressionengines', default=list, | |
528 | ) |
|
541 | ) | |
529 | coreconfigitem( |
|
542 | coreconfigitem( | |
530 | b'experimental', b'copytrace', default=b'on', |
|
543 | b'experimental', b'copytrace', default=b'on', | |
531 | ) |
|
544 | ) | |
532 | coreconfigitem( |
|
545 | coreconfigitem( | |
533 | b'experimental', b'copytrace.movecandidateslimit', default=100, |
|
546 | b'experimental', b'copytrace.movecandidateslimit', default=100, | |
534 | ) |
|
547 | ) | |
535 | coreconfigitem( |
|
548 | coreconfigitem( | |
536 | b'experimental', b'copytrace.sourcecommitlimit', default=100, |
|
549 | b'experimental', b'copytrace.sourcecommitlimit', default=100, | |
537 | ) |
|
550 | ) | |
538 | coreconfigitem( |
|
551 | coreconfigitem( | |
539 | b'experimental', b'copies.read-from', default=b"filelog-only", |
|
552 | b'experimental', b'copies.read-from', default=b"filelog-only", | |
540 | ) |
|
553 | ) | |
541 | coreconfigitem( |
|
554 | coreconfigitem( | |
542 | b'experimental', b'copies.write-to', default=b'filelog-only', |
|
555 | b'experimental', b'copies.write-to', default=b'filelog-only', | |
543 | ) |
|
556 | ) | |
544 | coreconfigitem( |
|
557 | coreconfigitem( | |
545 | b'experimental', b'crecordtest', default=None, |
|
558 | b'experimental', b'crecordtest', default=None, | |
546 | ) |
|
559 | ) | |
547 | coreconfigitem( |
|
560 | coreconfigitem( | |
548 | b'experimental', b'directaccess', default=False, |
|
561 | b'experimental', b'directaccess', default=False, | |
549 | ) |
|
562 | ) | |
550 | coreconfigitem( |
|
563 | coreconfigitem( | |
551 | b'experimental', b'directaccess.revnums', default=False, |
|
564 | b'experimental', b'directaccess.revnums', default=False, | |
552 | ) |
|
565 | ) | |
553 | coreconfigitem( |
|
566 | coreconfigitem( | |
554 | b'experimental', b'editortmpinhg', default=False, |
|
567 | b'experimental', b'editortmpinhg', default=False, | |
555 | ) |
|
568 | ) | |
556 | coreconfigitem( |
|
569 | coreconfigitem( | |
557 | b'experimental', b'evolution', default=list, |
|
570 | b'experimental', b'evolution', default=list, | |
558 | ) |
|
571 | ) | |
559 | coreconfigitem( |
|
572 | coreconfigitem( | |
560 | b'experimental', |
|
573 | b'experimental', | |
561 | b'evolution.allowdivergence', |
|
574 | b'evolution.allowdivergence', | |
562 | default=False, |
|
575 | default=False, | |
563 | alias=[(b'experimental', b'allowdivergence')], |
|
576 | alias=[(b'experimental', b'allowdivergence')], | |
564 | ) |
|
577 | ) | |
565 | coreconfigitem( |
|
578 | coreconfigitem( | |
566 | b'experimental', b'evolution.allowunstable', default=None, |
|
579 | b'experimental', b'evolution.allowunstable', default=None, | |
567 | ) |
|
580 | ) | |
568 | coreconfigitem( |
|
581 | coreconfigitem( | |
569 | b'experimental', b'evolution.createmarkers', default=None, |
|
582 | b'experimental', b'evolution.createmarkers', default=None, | |
570 | ) |
|
583 | ) | |
571 | coreconfigitem( |
|
584 | coreconfigitem( | |
572 | b'experimental', |
|
585 | b'experimental', | |
573 | b'evolution.effect-flags', |
|
586 | b'evolution.effect-flags', | |
574 | default=True, |
|
587 | default=True, | |
575 | alias=[(b'experimental', b'effect-flags')], |
|
588 | alias=[(b'experimental', b'effect-flags')], | |
576 | ) |
|
589 | ) | |
577 | coreconfigitem( |
|
590 | coreconfigitem( | |
578 | b'experimental', b'evolution.exchange', default=None, |
|
591 | b'experimental', b'evolution.exchange', default=None, | |
579 | ) |
|
592 | ) | |
580 | coreconfigitem( |
|
593 | coreconfigitem( | |
581 | b'experimental', b'evolution.bundle-obsmarker', default=False, |
|
594 | b'experimental', b'evolution.bundle-obsmarker', default=False, | |
582 | ) |
|
595 | ) | |
583 | coreconfigitem( |
|
596 | coreconfigitem( | |
584 | b'experimental', b'log.topo', default=False, |
|
597 | b'experimental', b'log.topo', default=False, | |
585 | ) |
|
598 | ) | |
586 | coreconfigitem( |
|
599 | coreconfigitem( | |
587 | b'experimental', b'evolution.report-instabilities', default=True, |
|
600 | b'experimental', b'evolution.report-instabilities', default=True, | |
588 | ) |
|
601 | ) | |
589 | coreconfigitem( |
|
602 | coreconfigitem( | |
590 | b'experimental', b'evolution.track-operation', default=True, |
|
603 | b'experimental', b'evolution.track-operation', default=True, | |
591 | ) |
|
604 | ) | |
592 | # repo-level config to exclude a revset visibility |
|
605 | # repo-level config to exclude a revset visibility | |
593 | # |
|
606 | # | |
594 | # The target use case is to use `share` to expose different subset of the same |
|
607 | # The target use case is to use `share` to expose different subset of the same | |
595 | # repository, especially server side. See also `server.view`. |
|
608 | # repository, especially server side. See also `server.view`. | |
596 | coreconfigitem( |
|
609 | coreconfigitem( | |
597 | b'experimental', b'extra-filter-revs', default=None, |
|
610 | b'experimental', b'extra-filter-revs', default=None, | |
598 | ) |
|
611 | ) | |
599 | coreconfigitem( |
|
612 | coreconfigitem( | |
600 | b'experimental', b'maxdeltachainspan', default=-1, |
|
613 | b'experimental', b'maxdeltachainspan', default=-1, | |
601 | ) |
|
614 | ) | |
602 | # tracks files which were undeleted (merge might delete them but we explicitly |
|
615 | # tracks files which were undeleted (merge might delete them but we explicitly | |
603 | # kept/undeleted them) and creates new filenodes for them |
|
616 | # kept/undeleted them) and creates new filenodes for them | |
604 | coreconfigitem( |
|
617 | coreconfigitem( | |
605 | b'experimental', b'merge-track-salvaged', default=False, |
|
618 | b'experimental', b'merge-track-salvaged', default=False, | |
606 | ) |
|
619 | ) | |
607 | coreconfigitem( |
|
620 | coreconfigitem( | |
608 | b'experimental', b'mergetempdirprefix', default=None, |
|
621 | b'experimental', b'mergetempdirprefix', default=None, | |
609 | ) |
|
622 | ) | |
610 | coreconfigitem( |
|
623 | coreconfigitem( | |
611 | b'experimental', b'mmapindexthreshold', default=None, |
|
624 | b'experimental', b'mmapindexthreshold', default=None, | |
612 | ) |
|
625 | ) | |
613 | coreconfigitem( |
|
626 | coreconfigitem( | |
614 | b'experimental', b'narrow', default=False, |
|
627 | b'experimental', b'narrow', default=False, | |
615 | ) |
|
628 | ) | |
616 | coreconfigitem( |
|
629 | coreconfigitem( | |
617 | b'experimental', b'nonnormalparanoidcheck', default=False, |
|
630 | b'experimental', b'nonnormalparanoidcheck', default=False, | |
618 | ) |
|
631 | ) | |
619 | coreconfigitem( |
|
632 | coreconfigitem( | |
620 | b'experimental', b'exportableenviron', default=list, |
|
633 | b'experimental', b'exportableenviron', default=list, | |
621 | ) |
|
634 | ) | |
622 | coreconfigitem( |
|
635 | coreconfigitem( | |
623 | b'experimental', b'extendedheader.index', default=None, |
|
636 | b'experimental', b'extendedheader.index', default=None, | |
624 | ) |
|
637 | ) | |
625 | coreconfigitem( |
|
638 | coreconfigitem( | |
626 | b'experimental', b'extendedheader.similarity', default=False, |
|
639 | b'experimental', b'extendedheader.similarity', default=False, | |
627 | ) |
|
640 | ) | |
628 | coreconfigitem( |
|
641 | coreconfigitem( | |
629 | b'experimental', b'graphshorten', default=False, |
|
642 | b'experimental', b'graphshorten', default=False, | |
630 | ) |
|
643 | ) | |
631 | coreconfigitem( |
|
644 | coreconfigitem( | |
632 | b'experimental', b'graphstyle.parent', default=dynamicdefault, |
|
645 | b'experimental', b'graphstyle.parent', default=dynamicdefault, | |
633 | ) |
|
646 | ) | |
634 | coreconfigitem( |
|
647 | coreconfigitem( | |
635 | b'experimental', b'graphstyle.missing', default=dynamicdefault, |
|
648 | b'experimental', b'graphstyle.missing', default=dynamicdefault, | |
636 | ) |
|
649 | ) | |
637 | coreconfigitem( |
|
650 | coreconfigitem( | |
638 | b'experimental', b'graphstyle.grandparent', default=dynamicdefault, |
|
651 | b'experimental', b'graphstyle.grandparent', default=dynamicdefault, | |
639 | ) |
|
652 | ) | |
640 | coreconfigitem( |
|
653 | coreconfigitem( | |
641 | b'experimental', b'hook-track-tags', default=False, |
|
654 | b'experimental', b'hook-track-tags', default=False, | |
642 | ) |
|
655 | ) | |
643 | coreconfigitem( |
|
656 | coreconfigitem( | |
644 | b'experimental', b'httppeer.advertise-v2', default=False, |
|
657 | b'experimental', b'httppeer.advertise-v2', default=False, | |
645 | ) |
|
658 | ) | |
646 | coreconfigitem( |
|
659 | coreconfigitem( | |
647 | b'experimental', b'httppeer.v2-encoder-order', default=None, |
|
660 | b'experimental', b'httppeer.v2-encoder-order', default=None, | |
648 | ) |
|
661 | ) | |
649 | coreconfigitem( |
|
662 | coreconfigitem( | |
650 | b'experimental', b'httppostargs', default=False, |
|
663 | b'experimental', b'httppostargs', default=False, | |
651 | ) |
|
664 | ) | |
652 | coreconfigitem(b'experimental', b'nointerrupt', default=False) |
|
665 | coreconfigitem(b'experimental', b'nointerrupt', default=False) | |
653 | coreconfigitem(b'experimental', b'nointerrupt-interactiveonly', default=True) |
|
666 | coreconfigitem(b'experimental', b'nointerrupt-interactiveonly', default=True) | |
654 |
|
667 | |||
655 | coreconfigitem( |
|
668 | coreconfigitem( | |
656 | b'experimental', b'obsmarkers-exchange-debug', default=False, |
|
669 | b'experimental', b'obsmarkers-exchange-debug', default=False, | |
657 | ) |
|
670 | ) | |
658 | coreconfigitem( |
|
671 | coreconfigitem( | |
659 | b'experimental', b'remotenames', default=False, |
|
672 | b'experimental', b'remotenames', default=False, | |
660 | ) |
|
673 | ) | |
661 | coreconfigitem( |
|
674 | coreconfigitem( | |
662 | b'experimental', b'removeemptydirs', default=True, |
|
675 | b'experimental', b'removeemptydirs', default=True, | |
663 | ) |
|
676 | ) | |
664 | coreconfigitem( |
|
677 | coreconfigitem( | |
665 | b'experimental', b'revert.interactive.select-to-keep', default=False, |
|
678 | b'experimental', b'revert.interactive.select-to-keep', default=False, | |
666 | ) |
|
679 | ) | |
667 | coreconfigitem( |
|
680 | coreconfigitem( | |
668 | b'experimental', b'revisions.prefixhexnode', default=False, |
|
681 | b'experimental', b'revisions.prefixhexnode', default=False, | |
669 | ) |
|
682 | ) | |
670 | coreconfigitem( |
|
683 | coreconfigitem( | |
671 | b'experimental', b'revlogv2', default=None, |
|
684 | b'experimental', b'revlogv2', default=None, | |
672 | ) |
|
685 | ) | |
673 | coreconfigitem( |
|
686 | coreconfigitem( | |
674 | b'experimental', b'revisions.disambiguatewithin', default=None, |
|
687 | b'experimental', b'revisions.disambiguatewithin', default=None, | |
675 | ) |
|
688 | ) | |
676 | coreconfigitem( |
|
689 | coreconfigitem( | |
677 | b'experimental', b'rust.index', default=False, |
|
690 | b'experimental', b'rust.index', default=False, | |
678 | ) |
|
691 | ) | |
679 | coreconfigitem( |
|
692 | coreconfigitem( | |
680 | b'experimental', b'server.filesdata.recommended-batch-size', default=50000, |
|
693 | b'experimental', b'server.filesdata.recommended-batch-size', default=50000, | |
681 | ) |
|
694 | ) | |
682 | coreconfigitem( |
|
695 | coreconfigitem( | |
683 | b'experimental', |
|
696 | b'experimental', | |
684 | b'server.manifestdata.recommended-batch-size', |
|
697 | b'server.manifestdata.recommended-batch-size', | |
685 | default=100000, |
|
698 | default=100000, | |
686 | ) |
|
699 | ) | |
687 | coreconfigitem( |
|
700 | coreconfigitem( | |
688 | b'experimental', b'server.stream-narrow-clones', default=False, |
|
701 | b'experimental', b'server.stream-narrow-clones', default=False, | |
689 | ) |
|
702 | ) | |
690 | coreconfigitem( |
|
703 | coreconfigitem( | |
691 | b'experimental', b'single-head-per-branch', default=False, |
|
704 | b'experimental', b'single-head-per-branch', default=False, | |
692 | ) |
|
705 | ) | |
693 | coreconfigitem( |
|
706 | coreconfigitem( | |
694 | b'experimental', |
|
707 | b'experimental', | |
695 | b'single-head-per-branch:account-closed-heads', |
|
708 | b'single-head-per-branch:account-closed-heads', | |
696 | default=False, |
|
709 | default=False, | |
697 | ) |
|
710 | ) | |
698 | coreconfigitem( |
|
711 | coreconfigitem( | |
699 | b'experimental', b'sshserver.support-v2', default=False, |
|
712 | b'experimental', b'sshserver.support-v2', default=False, | |
700 | ) |
|
713 | ) | |
701 | coreconfigitem( |
|
714 | coreconfigitem( | |
702 | b'experimental', b'sparse-read', default=False, |
|
715 | b'experimental', b'sparse-read', default=False, | |
703 | ) |
|
716 | ) | |
704 | coreconfigitem( |
|
717 | coreconfigitem( | |
705 | b'experimental', b'sparse-read.density-threshold', default=0.50, |
|
718 | b'experimental', b'sparse-read.density-threshold', default=0.50, | |
706 | ) |
|
719 | ) | |
707 | coreconfigitem( |
|
720 | coreconfigitem( | |
708 | b'experimental', b'sparse-read.min-gap-size', default=b'65K', |
|
721 | b'experimental', b'sparse-read.min-gap-size', default=b'65K', | |
709 | ) |
|
722 | ) | |
710 | coreconfigitem( |
|
723 | coreconfigitem( | |
711 | b'experimental', b'treemanifest', default=False, |
|
724 | b'experimental', b'treemanifest', default=False, | |
712 | ) |
|
725 | ) | |
713 | coreconfigitem( |
|
726 | coreconfigitem( | |
714 | b'experimental', b'update.atomic-file', default=False, |
|
727 | b'experimental', b'update.atomic-file', default=False, | |
715 | ) |
|
728 | ) | |
716 | coreconfigitem( |
|
729 | coreconfigitem( | |
717 | b'experimental', b'sshpeer.advertise-v2', default=False, |
|
730 | b'experimental', b'sshpeer.advertise-v2', default=False, | |
718 | ) |
|
731 | ) | |
719 | coreconfigitem( |
|
732 | coreconfigitem( | |
720 | b'experimental', b'web.apiserver', default=False, |
|
733 | b'experimental', b'web.apiserver', default=False, | |
721 | ) |
|
734 | ) | |
722 | coreconfigitem( |
|
735 | coreconfigitem( | |
723 | b'experimental', b'web.api.http-v2', default=False, |
|
736 | b'experimental', b'web.api.http-v2', default=False, | |
724 | ) |
|
737 | ) | |
725 | coreconfigitem( |
|
738 | coreconfigitem( | |
726 | b'experimental', b'web.api.debugreflect', default=False, |
|
739 | b'experimental', b'web.api.debugreflect', default=False, | |
727 | ) |
|
740 | ) | |
728 | coreconfigitem( |
|
741 | coreconfigitem( | |
729 | b'experimental', b'worker.wdir-get-thread-safe', default=False, |
|
742 | b'experimental', b'worker.wdir-get-thread-safe', default=False, | |
730 | ) |
|
743 | ) | |
731 | coreconfigitem( |
|
744 | coreconfigitem( | |
732 | b'experimental', b'worker.repository-upgrade', default=False, |
|
745 | b'experimental', b'worker.repository-upgrade', default=False, | |
733 | ) |
|
746 | ) | |
734 | coreconfigitem( |
|
747 | coreconfigitem( | |
735 | b'experimental', b'xdiff', default=False, |
|
748 | b'experimental', b'xdiff', default=False, | |
736 | ) |
|
749 | ) | |
737 | coreconfigitem( |
|
750 | coreconfigitem( | |
738 | b'extensions', b'.*', default=None, generic=True, |
|
751 | b'extensions', b'.*', default=None, generic=True, | |
739 | ) |
|
752 | ) | |
740 | coreconfigitem( |
|
753 | coreconfigitem( | |
741 | b'extdata', b'.*', default=None, generic=True, |
|
754 | b'extdata', b'.*', default=None, generic=True, | |
742 | ) |
|
755 | ) | |
743 | coreconfigitem( |
|
756 | coreconfigitem( | |
744 | b'format', b'bookmarks-in-store', default=False, |
|
757 | b'format', b'bookmarks-in-store', default=False, | |
745 | ) |
|
758 | ) | |
746 | coreconfigitem( |
|
759 | coreconfigitem( | |
747 | b'format', b'chunkcachesize', default=None, experimental=True, |
|
760 | b'format', b'chunkcachesize', default=None, experimental=True, | |
748 | ) |
|
761 | ) | |
749 | coreconfigitem( |
|
762 | coreconfigitem( | |
750 | b'format', b'dotencode', default=True, |
|
763 | b'format', b'dotencode', default=True, | |
751 | ) |
|
764 | ) | |
752 | coreconfigitem( |
|
765 | coreconfigitem( | |
753 | b'format', b'generaldelta', default=False, experimental=True, |
|
766 | b'format', b'generaldelta', default=False, experimental=True, | |
754 | ) |
|
767 | ) | |
755 | coreconfigitem( |
|
768 | coreconfigitem( | |
756 | b'format', b'manifestcachesize', default=None, experimental=True, |
|
769 | b'format', b'manifestcachesize', default=None, experimental=True, | |
757 | ) |
|
770 | ) | |
758 | coreconfigitem( |
|
771 | coreconfigitem( | |
759 | b'format', b'maxchainlen', default=dynamicdefault, experimental=True, |
|
772 | b'format', b'maxchainlen', default=dynamicdefault, experimental=True, | |
760 | ) |
|
773 | ) | |
761 | coreconfigitem( |
|
774 | coreconfigitem( | |
762 | b'format', b'obsstore-version', default=None, |
|
775 | b'format', b'obsstore-version', default=None, | |
763 | ) |
|
776 | ) | |
764 | coreconfigitem( |
|
777 | coreconfigitem( | |
765 | b'format', b'sparse-revlog', default=True, |
|
778 | b'format', b'sparse-revlog', default=True, | |
766 | ) |
|
779 | ) | |
767 | coreconfigitem( |
|
780 | coreconfigitem( | |
768 | b'format', |
|
781 | b'format', | |
769 | b'revlog-compression', |
|
782 | b'revlog-compression', | |
770 | default=lambda: [b'zlib'], |
|
783 | default=lambda: [b'zlib'], | |
771 | alias=[(b'experimental', b'format.compression')], |
|
784 | alias=[(b'experimental', b'format.compression')], | |
772 | ) |
|
785 | ) | |
773 | coreconfigitem( |
|
786 | coreconfigitem( | |
774 | b'format', b'usefncache', default=True, |
|
787 | b'format', b'usefncache', default=True, | |
775 | ) |
|
788 | ) | |
776 | coreconfigitem( |
|
789 | coreconfigitem( | |
777 | b'format', b'usegeneraldelta', default=True, |
|
790 | b'format', b'usegeneraldelta', default=True, | |
778 | ) |
|
791 | ) | |
779 | coreconfigitem( |
|
792 | coreconfigitem( | |
780 | b'format', b'usestore', default=True, |
|
793 | b'format', b'usestore', default=True, | |
781 | ) |
|
794 | ) | |
782 | # Right now, the only efficient implement of the nodemap logic is in Rust, so |
|
795 | # Right now, the only efficient implement of the nodemap logic is in Rust, so | |
783 | # the persistent nodemap feature needs to stay experimental as long as the Rust |
|
796 | # the persistent nodemap feature needs to stay experimental as long as the Rust | |
784 | # extensions are an experimental feature. |
|
797 | # extensions are an experimental feature. | |
785 | coreconfigitem( |
|
798 | coreconfigitem( | |
786 | b'format', b'use-persistent-nodemap', default=False, experimental=True |
|
799 | b'format', b'use-persistent-nodemap', default=False, experimental=True | |
787 | ) |
|
800 | ) | |
788 | coreconfigitem( |
|
801 | coreconfigitem( | |
789 | b'format', |
|
802 | b'format', | |
790 | b'exp-use-copies-side-data-changeset', |
|
803 | b'exp-use-copies-side-data-changeset', | |
791 | default=False, |
|
804 | default=False, | |
792 | experimental=True, |
|
805 | experimental=True, | |
793 | ) |
|
806 | ) | |
794 | coreconfigitem( |
|
807 | coreconfigitem( | |
795 | b'format', b'exp-use-side-data', default=False, experimental=True, |
|
808 | b'format', b'exp-use-side-data', default=False, experimental=True, | |
796 | ) |
|
809 | ) | |
797 | coreconfigitem( |
|
810 | coreconfigitem( | |
798 | b'format', b'exp-share-safe', default=False, experimental=True, |
|
811 | b'format', b'exp-share-safe', default=False, experimental=True, | |
799 | ) |
|
812 | ) | |
800 | coreconfigitem( |
|
813 | coreconfigitem( | |
801 | b'format', b'internal-phase', default=False, experimental=True, |
|
814 | b'format', b'internal-phase', default=False, experimental=True, | |
802 | ) |
|
815 | ) | |
803 | coreconfigitem( |
|
816 | coreconfigitem( | |
804 | b'fsmonitor', b'warn_when_unused', default=True, |
|
817 | b'fsmonitor', b'warn_when_unused', default=True, | |
805 | ) |
|
818 | ) | |
806 | coreconfigitem( |
|
819 | coreconfigitem( | |
807 | b'fsmonitor', b'warn_update_file_count', default=50000, |
|
820 | b'fsmonitor', b'warn_update_file_count', default=50000, | |
808 | ) |
|
821 | ) | |
809 | coreconfigitem( |
|
822 | coreconfigitem( | |
810 | b'fsmonitor', b'warn_update_file_count_rust', default=400000, |
|
823 | b'fsmonitor', b'warn_update_file_count_rust', default=400000, | |
811 | ) |
|
824 | ) | |
812 | coreconfigitem( |
|
825 | coreconfigitem( | |
813 | b'help', br'hidden-command\..*', default=False, generic=True, |
|
826 | b'help', br'hidden-command\..*', default=False, generic=True, | |
814 | ) |
|
827 | ) | |
815 | coreconfigitem( |
|
828 | coreconfigitem( | |
816 | b'help', br'hidden-topic\..*', default=False, generic=True, |
|
829 | b'help', br'hidden-topic\..*', default=False, generic=True, | |
817 | ) |
|
830 | ) | |
818 | coreconfigitem( |
|
831 | coreconfigitem( | |
819 | b'hooks', b'.*', default=dynamicdefault, generic=True, |
|
832 | b'hooks', b'.*', default=dynamicdefault, generic=True, | |
820 | ) |
|
833 | ) | |
821 | coreconfigitem( |
|
834 | coreconfigitem( | |
822 | b'hgweb-paths', b'.*', default=list, generic=True, |
|
835 | b'hgweb-paths', b'.*', default=list, generic=True, | |
823 | ) |
|
836 | ) | |
824 | coreconfigitem( |
|
837 | coreconfigitem( | |
825 | b'hostfingerprints', b'.*', default=list, generic=True, |
|
838 | b'hostfingerprints', b'.*', default=list, generic=True, | |
826 | ) |
|
839 | ) | |
827 | coreconfigitem( |
|
840 | coreconfigitem( | |
828 | b'hostsecurity', b'ciphers', default=None, |
|
841 | b'hostsecurity', b'ciphers', default=None, | |
829 | ) |
|
842 | ) | |
830 | coreconfigitem( |
|
843 | coreconfigitem( | |
831 | b'hostsecurity', b'minimumprotocol', default=dynamicdefault, |
|
844 | b'hostsecurity', b'minimumprotocol', default=dynamicdefault, | |
832 | ) |
|
845 | ) | |
833 | coreconfigitem( |
|
846 | coreconfigitem( | |
834 | b'hostsecurity', |
|
847 | b'hostsecurity', | |
835 | b'.*:minimumprotocol$', |
|
848 | b'.*:minimumprotocol$', | |
836 | default=dynamicdefault, |
|
849 | default=dynamicdefault, | |
837 | generic=True, |
|
850 | generic=True, | |
838 | ) |
|
851 | ) | |
839 | coreconfigitem( |
|
852 | coreconfigitem( | |
840 | b'hostsecurity', b'.*:ciphers$', default=dynamicdefault, generic=True, |
|
853 | b'hostsecurity', b'.*:ciphers$', default=dynamicdefault, generic=True, | |
841 | ) |
|
854 | ) | |
842 | coreconfigitem( |
|
855 | coreconfigitem( | |
843 | b'hostsecurity', b'.*:fingerprints$', default=list, generic=True, |
|
856 | b'hostsecurity', b'.*:fingerprints$', default=list, generic=True, | |
844 | ) |
|
857 | ) | |
845 | coreconfigitem( |
|
858 | coreconfigitem( | |
846 | b'hostsecurity', b'.*:verifycertsfile$', default=None, generic=True, |
|
859 | b'hostsecurity', b'.*:verifycertsfile$', default=None, generic=True, | |
847 | ) |
|
860 | ) | |
848 |
|
861 | |||
849 | coreconfigitem( |
|
862 | coreconfigitem( | |
850 | b'http_proxy', b'always', default=False, |
|
863 | b'http_proxy', b'always', default=False, | |
851 | ) |
|
864 | ) | |
852 | coreconfigitem( |
|
865 | coreconfigitem( | |
853 | b'http_proxy', b'host', default=None, |
|
866 | b'http_proxy', b'host', default=None, | |
854 | ) |
|
867 | ) | |
855 | coreconfigitem( |
|
868 | coreconfigitem( | |
856 | b'http_proxy', b'no', default=list, |
|
869 | b'http_proxy', b'no', default=list, | |
857 | ) |
|
870 | ) | |
858 | coreconfigitem( |
|
871 | coreconfigitem( | |
859 | b'http_proxy', b'passwd', default=None, |
|
872 | b'http_proxy', b'passwd', default=None, | |
860 | ) |
|
873 | ) | |
861 | coreconfigitem( |
|
874 | coreconfigitem( | |
862 | b'http_proxy', b'user', default=None, |
|
875 | b'http_proxy', b'user', default=None, | |
863 | ) |
|
876 | ) | |
864 |
|
877 | |||
865 | coreconfigitem( |
|
878 | coreconfigitem( | |
866 | b'http', b'timeout', default=None, |
|
879 | b'http', b'timeout', default=None, | |
867 | ) |
|
880 | ) | |
868 |
|
881 | |||
869 | coreconfigitem( |
|
882 | coreconfigitem( | |
870 | b'logtoprocess', b'commandexception', default=None, |
|
883 | b'logtoprocess', b'commandexception', default=None, | |
871 | ) |
|
884 | ) | |
872 | coreconfigitem( |
|
885 | coreconfigitem( | |
873 | b'logtoprocess', b'commandfinish', default=None, |
|
886 | b'logtoprocess', b'commandfinish', default=None, | |
874 | ) |
|
887 | ) | |
875 | coreconfigitem( |
|
888 | coreconfigitem( | |
876 | b'logtoprocess', b'command', default=None, |
|
889 | b'logtoprocess', b'command', default=None, | |
877 | ) |
|
890 | ) | |
878 | coreconfigitem( |
|
891 | coreconfigitem( | |
879 | b'logtoprocess', b'develwarn', default=None, |
|
892 | b'logtoprocess', b'develwarn', default=None, | |
880 | ) |
|
893 | ) | |
881 | coreconfigitem( |
|
894 | coreconfigitem( | |
882 | b'logtoprocess', b'uiblocked', default=None, |
|
895 | b'logtoprocess', b'uiblocked', default=None, | |
883 | ) |
|
896 | ) | |
884 | coreconfigitem( |
|
897 | coreconfigitem( | |
885 | b'merge', b'checkunknown', default=b'abort', |
|
898 | b'merge', b'checkunknown', default=b'abort', | |
886 | ) |
|
899 | ) | |
887 | coreconfigitem( |
|
900 | coreconfigitem( | |
888 | b'merge', b'checkignored', default=b'abort', |
|
901 | b'merge', b'checkignored', default=b'abort', | |
889 | ) |
|
902 | ) | |
890 | coreconfigitem( |
|
903 | coreconfigitem( | |
891 | b'experimental', b'merge.checkpathconflicts', default=False, |
|
904 | b'experimental', b'merge.checkpathconflicts', default=False, | |
892 | ) |
|
905 | ) | |
893 | coreconfigitem( |
|
906 | coreconfigitem( | |
894 | b'merge', b'followcopies', default=True, |
|
907 | b'merge', b'followcopies', default=True, | |
895 | ) |
|
908 | ) | |
896 | coreconfigitem( |
|
909 | coreconfigitem( | |
897 | b'merge', b'on-failure', default=b'continue', |
|
910 | b'merge', b'on-failure', default=b'continue', | |
898 | ) |
|
911 | ) | |
899 | coreconfigitem( |
|
912 | coreconfigitem( | |
900 | b'merge', b'preferancestor', default=lambda: [b'*'], experimental=True, |
|
913 | b'merge', b'preferancestor', default=lambda: [b'*'], experimental=True, | |
901 | ) |
|
914 | ) | |
902 | coreconfigitem( |
|
915 | coreconfigitem( | |
903 | b'merge', b'strict-capability-check', default=False, |
|
916 | b'merge', b'strict-capability-check', default=False, | |
904 | ) |
|
917 | ) | |
905 | coreconfigitem( |
|
918 | coreconfigitem( | |
906 | b'merge-tools', b'.*', default=None, generic=True, |
|
919 | b'merge-tools', b'.*', default=None, generic=True, | |
907 | ) |
|
920 | ) | |
908 | coreconfigitem( |
|
921 | coreconfigitem( | |
909 | b'merge-tools', |
|
922 | b'merge-tools', | |
910 | br'.*\.args$', |
|
923 | br'.*\.args$', | |
911 | default=b"$local $base $other", |
|
924 | default=b"$local $base $other", | |
912 | generic=True, |
|
925 | generic=True, | |
913 | priority=-1, |
|
926 | priority=-1, | |
914 | ) |
|
927 | ) | |
915 | coreconfigitem( |
|
928 | coreconfigitem( | |
916 | b'merge-tools', br'.*\.binary$', default=False, generic=True, priority=-1, |
|
929 | b'merge-tools', br'.*\.binary$', default=False, generic=True, priority=-1, | |
917 | ) |
|
930 | ) | |
918 | coreconfigitem( |
|
931 | coreconfigitem( | |
919 | b'merge-tools', br'.*\.check$', default=list, generic=True, priority=-1, |
|
932 | b'merge-tools', br'.*\.check$', default=list, generic=True, priority=-1, | |
920 | ) |
|
933 | ) | |
921 | coreconfigitem( |
|
934 | coreconfigitem( | |
922 | b'merge-tools', |
|
935 | b'merge-tools', | |
923 | br'.*\.checkchanged$', |
|
936 | br'.*\.checkchanged$', | |
924 | default=False, |
|
937 | default=False, | |
925 | generic=True, |
|
938 | generic=True, | |
926 | priority=-1, |
|
939 | priority=-1, | |
927 | ) |
|
940 | ) | |
928 | coreconfigitem( |
|
941 | coreconfigitem( | |
929 | b'merge-tools', |
|
942 | b'merge-tools', | |
930 | br'.*\.executable$', |
|
943 | br'.*\.executable$', | |
931 | default=dynamicdefault, |
|
944 | default=dynamicdefault, | |
932 | generic=True, |
|
945 | generic=True, | |
933 | priority=-1, |
|
946 | priority=-1, | |
934 | ) |
|
947 | ) | |
935 | coreconfigitem( |
|
948 | coreconfigitem( | |
936 | b'merge-tools', br'.*\.fixeol$', default=False, generic=True, priority=-1, |
|
949 | b'merge-tools', br'.*\.fixeol$', default=False, generic=True, priority=-1, | |
937 | ) |
|
950 | ) | |
938 | coreconfigitem( |
|
951 | coreconfigitem( | |
939 | b'merge-tools', br'.*\.gui$', default=False, generic=True, priority=-1, |
|
952 | b'merge-tools', br'.*\.gui$', default=False, generic=True, priority=-1, | |
940 | ) |
|
953 | ) | |
941 | coreconfigitem( |
|
954 | coreconfigitem( | |
942 | b'merge-tools', |
|
955 | b'merge-tools', | |
943 | br'.*\.mergemarkers$', |
|
956 | br'.*\.mergemarkers$', | |
944 | default=b'basic', |
|
957 | default=b'basic', | |
945 | generic=True, |
|
958 | generic=True, | |
946 | priority=-1, |
|
959 | priority=-1, | |
947 | ) |
|
960 | ) | |
948 | coreconfigitem( |
|
961 | coreconfigitem( | |
949 | b'merge-tools', |
|
962 | b'merge-tools', | |
950 | br'.*\.mergemarkertemplate$', |
|
963 | br'.*\.mergemarkertemplate$', | |
951 |
default=dynamicdefault, # take from |
|
964 | default=dynamicdefault, # take from command-templates.mergemarker | |
952 | generic=True, |
|
965 | generic=True, | |
953 | priority=-1, |
|
966 | priority=-1, | |
954 | ) |
|
967 | ) | |
955 | coreconfigitem( |
|
968 | coreconfigitem( | |
956 | b'merge-tools', br'.*\.priority$', default=0, generic=True, priority=-1, |
|
969 | b'merge-tools', br'.*\.priority$', default=0, generic=True, priority=-1, | |
957 | ) |
|
970 | ) | |
958 | coreconfigitem( |
|
971 | coreconfigitem( | |
959 | b'merge-tools', |
|
972 | b'merge-tools', | |
960 | br'.*\.premerge$', |
|
973 | br'.*\.premerge$', | |
961 | default=dynamicdefault, |
|
974 | default=dynamicdefault, | |
962 | generic=True, |
|
975 | generic=True, | |
963 | priority=-1, |
|
976 | priority=-1, | |
964 | ) |
|
977 | ) | |
965 | coreconfigitem( |
|
978 | coreconfigitem( | |
966 | b'merge-tools', br'.*\.symlink$', default=False, generic=True, priority=-1, |
|
979 | b'merge-tools', br'.*\.symlink$', default=False, generic=True, priority=-1, | |
967 | ) |
|
980 | ) | |
968 | coreconfigitem( |
|
981 | coreconfigitem( | |
969 | b'pager', b'attend-.*', default=dynamicdefault, generic=True, |
|
982 | b'pager', b'attend-.*', default=dynamicdefault, generic=True, | |
970 | ) |
|
983 | ) | |
971 | coreconfigitem( |
|
984 | coreconfigitem( | |
972 | b'pager', b'ignore', default=list, |
|
985 | b'pager', b'ignore', default=list, | |
973 | ) |
|
986 | ) | |
974 | coreconfigitem( |
|
987 | coreconfigitem( | |
975 | b'pager', b'pager', default=dynamicdefault, |
|
988 | b'pager', b'pager', default=dynamicdefault, | |
976 | ) |
|
989 | ) | |
977 | coreconfigitem( |
|
990 | coreconfigitem( | |
978 | b'patch', b'eol', default=b'strict', |
|
991 | b'patch', b'eol', default=b'strict', | |
979 | ) |
|
992 | ) | |
980 | coreconfigitem( |
|
993 | coreconfigitem( | |
981 | b'patch', b'fuzz', default=2, |
|
994 | b'patch', b'fuzz', default=2, | |
982 | ) |
|
995 | ) | |
983 | coreconfigitem( |
|
996 | coreconfigitem( | |
984 | b'paths', b'default', default=None, |
|
997 | b'paths', b'default', default=None, | |
985 | ) |
|
998 | ) | |
986 | coreconfigitem( |
|
999 | coreconfigitem( | |
987 | b'paths', b'default-push', default=None, |
|
1000 | b'paths', b'default-push', default=None, | |
988 | ) |
|
1001 | ) | |
989 | coreconfigitem( |
|
1002 | coreconfigitem( | |
990 | b'paths', b'.*', default=None, generic=True, |
|
1003 | b'paths', b'.*', default=None, generic=True, | |
991 | ) |
|
1004 | ) | |
992 | coreconfigitem( |
|
1005 | coreconfigitem( | |
993 | b'phases', b'checksubrepos', default=b'follow', |
|
1006 | b'phases', b'checksubrepos', default=b'follow', | |
994 | ) |
|
1007 | ) | |
995 | coreconfigitem( |
|
1008 | coreconfigitem( | |
996 | b'phases', b'new-commit', default=b'draft', |
|
1009 | b'phases', b'new-commit', default=b'draft', | |
997 | ) |
|
1010 | ) | |
998 | coreconfigitem( |
|
1011 | coreconfigitem( | |
999 | b'phases', b'publish', default=True, |
|
1012 | b'phases', b'publish', default=True, | |
1000 | ) |
|
1013 | ) | |
1001 | coreconfigitem( |
|
1014 | coreconfigitem( | |
1002 | b'profiling', b'enabled', default=False, |
|
1015 | b'profiling', b'enabled', default=False, | |
1003 | ) |
|
1016 | ) | |
1004 | coreconfigitem( |
|
1017 | coreconfigitem( | |
1005 | b'profiling', b'format', default=b'text', |
|
1018 | b'profiling', b'format', default=b'text', | |
1006 | ) |
|
1019 | ) | |
1007 | coreconfigitem( |
|
1020 | coreconfigitem( | |
1008 | b'profiling', b'freq', default=1000, |
|
1021 | b'profiling', b'freq', default=1000, | |
1009 | ) |
|
1022 | ) | |
1010 | coreconfigitem( |
|
1023 | coreconfigitem( | |
1011 | b'profiling', b'limit', default=30, |
|
1024 | b'profiling', b'limit', default=30, | |
1012 | ) |
|
1025 | ) | |
1013 | coreconfigitem( |
|
1026 | coreconfigitem( | |
1014 | b'profiling', b'nested', default=0, |
|
1027 | b'profiling', b'nested', default=0, | |
1015 | ) |
|
1028 | ) | |
1016 | coreconfigitem( |
|
1029 | coreconfigitem( | |
1017 | b'profiling', b'output', default=None, |
|
1030 | b'profiling', b'output', default=None, | |
1018 | ) |
|
1031 | ) | |
1019 | coreconfigitem( |
|
1032 | coreconfigitem( | |
1020 | b'profiling', b'showmax', default=0.999, |
|
1033 | b'profiling', b'showmax', default=0.999, | |
1021 | ) |
|
1034 | ) | |
1022 | coreconfigitem( |
|
1035 | coreconfigitem( | |
1023 | b'profiling', b'showmin', default=dynamicdefault, |
|
1036 | b'profiling', b'showmin', default=dynamicdefault, | |
1024 | ) |
|
1037 | ) | |
1025 | coreconfigitem( |
|
1038 | coreconfigitem( | |
1026 | b'profiling', b'showtime', default=True, |
|
1039 | b'profiling', b'showtime', default=True, | |
1027 | ) |
|
1040 | ) | |
1028 | coreconfigitem( |
|
1041 | coreconfigitem( | |
1029 | b'profiling', b'sort', default=b'inlinetime', |
|
1042 | b'profiling', b'sort', default=b'inlinetime', | |
1030 | ) |
|
1043 | ) | |
1031 | coreconfigitem( |
|
1044 | coreconfigitem( | |
1032 | b'profiling', b'statformat', default=b'hotpath', |
|
1045 | b'profiling', b'statformat', default=b'hotpath', | |
1033 | ) |
|
1046 | ) | |
1034 | coreconfigitem( |
|
1047 | coreconfigitem( | |
1035 | b'profiling', b'time-track', default=dynamicdefault, |
|
1048 | b'profiling', b'time-track', default=dynamicdefault, | |
1036 | ) |
|
1049 | ) | |
1037 | coreconfigitem( |
|
1050 | coreconfigitem( | |
1038 | b'profiling', b'type', default=b'stat', |
|
1051 | b'profiling', b'type', default=b'stat', | |
1039 | ) |
|
1052 | ) | |
1040 | coreconfigitem( |
|
1053 | coreconfigitem( | |
1041 | b'progress', b'assume-tty', default=False, |
|
1054 | b'progress', b'assume-tty', default=False, | |
1042 | ) |
|
1055 | ) | |
1043 | coreconfigitem( |
|
1056 | coreconfigitem( | |
1044 | b'progress', b'changedelay', default=1, |
|
1057 | b'progress', b'changedelay', default=1, | |
1045 | ) |
|
1058 | ) | |
1046 | coreconfigitem( |
|
1059 | coreconfigitem( | |
1047 | b'progress', b'clear-complete', default=True, |
|
1060 | b'progress', b'clear-complete', default=True, | |
1048 | ) |
|
1061 | ) | |
1049 | coreconfigitem( |
|
1062 | coreconfigitem( | |
1050 | b'progress', b'debug', default=False, |
|
1063 | b'progress', b'debug', default=False, | |
1051 | ) |
|
1064 | ) | |
1052 | coreconfigitem( |
|
1065 | coreconfigitem( | |
1053 | b'progress', b'delay', default=3, |
|
1066 | b'progress', b'delay', default=3, | |
1054 | ) |
|
1067 | ) | |
1055 | coreconfigitem( |
|
1068 | coreconfigitem( | |
1056 | b'progress', b'disable', default=False, |
|
1069 | b'progress', b'disable', default=False, | |
1057 | ) |
|
1070 | ) | |
1058 | coreconfigitem( |
|
1071 | coreconfigitem( | |
1059 | b'progress', b'estimateinterval', default=60.0, |
|
1072 | b'progress', b'estimateinterval', default=60.0, | |
1060 | ) |
|
1073 | ) | |
1061 | coreconfigitem( |
|
1074 | coreconfigitem( | |
1062 | b'progress', |
|
1075 | b'progress', | |
1063 | b'format', |
|
1076 | b'format', | |
1064 | default=lambda: [b'topic', b'bar', b'number', b'estimate'], |
|
1077 | default=lambda: [b'topic', b'bar', b'number', b'estimate'], | |
1065 | ) |
|
1078 | ) | |
1066 | coreconfigitem( |
|
1079 | coreconfigitem( | |
1067 | b'progress', b'refresh', default=0.1, |
|
1080 | b'progress', b'refresh', default=0.1, | |
1068 | ) |
|
1081 | ) | |
1069 | coreconfigitem( |
|
1082 | coreconfigitem( | |
1070 | b'progress', b'width', default=dynamicdefault, |
|
1083 | b'progress', b'width', default=dynamicdefault, | |
1071 | ) |
|
1084 | ) | |
1072 | coreconfigitem( |
|
1085 | coreconfigitem( | |
1073 | b'pull', b'confirm', default=False, |
|
1086 | b'pull', b'confirm', default=False, | |
1074 | ) |
|
1087 | ) | |
1075 | coreconfigitem( |
|
1088 | coreconfigitem( | |
1076 | b'push', b'pushvars.server', default=False, |
|
1089 | b'push', b'pushvars.server', default=False, | |
1077 | ) |
|
1090 | ) | |
1078 | coreconfigitem( |
|
1091 | coreconfigitem( | |
1079 | b'rewrite', |
|
1092 | b'rewrite', | |
1080 | b'backup-bundle', |
|
1093 | b'backup-bundle', | |
1081 | default=True, |
|
1094 | default=True, | |
1082 | alias=[(b'ui', b'history-editing-backup')], |
|
1095 | alias=[(b'ui', b'history-editing-backup')], | |
1083 | ) |
|
1096 | ) | |
1084 | coreconfigitem( |
|
1097 | coreconfigitem( | |
1085 | b'rewrite', b'update-timestamp', default=False, |
|
1098 | b'rewrite', b'update-timestamp', default=False, | |
1086 | ) |
|
1099 | ) | |
1087 | coreconfigitem( |
|
1100 | coreconfigitem( | |
1088 | b'rewrite', b'empty-successor', default=b'skip', experimental=True, |
|
1101 | b'rewrite', b'empty-successor', default=b'skip', experimental=True, | |
1089 | ) |
|
1102 | ) | |
1090 | coreconfigitem( |
|
1103 | coreconfigitem( | |
1091 | b'storage', b'new-repo-backend', default=b'revlogv1', experimental=True, |
|
1104 | b'storage', b'new-repo-backend', default=b'revlogv1', experimental=True, | |
1092 | ) |
|
1105 | ) | |
1093 | coreconfigitem( |
|
1106 | coreconfigitem( | |
1094 | b'storage', |
|
1107 | b'storage', | |
1095 | b'revlog.optimize-delta-parent-choice', |
|
1108 | b'revlog.optimize-delta-parent-choice', | |
1096 | default=True, |
|
1109 | default=True, | |
1097 | alias=[(b'format', b'aggressivemergedeltas')], |
|
1110 | alias=[(b'format', b'aggressivemergedeltas')], | |
1098 | ) |
|
1111 | ) | |
1099 | # experimental as long as rust is experimental (or a C version is implemented) |
|
1112 | # experimental as long as rust is experimental (or a C version is implemented) | |
1100 | coreconfigitem( |
|
1113 | coreconfigitem( | |
1101 | b'storage', b'revlog.nodemap.mmap', default=True, experimental=True |
|
1114 | b'storage', b'revlog.nodemap.mmap', default=True, experimental=True | |
1102 | ) |
|
1115 | ) | |
1103 | # experimental as long as format.use-persistent-nodemap is. |
|
1116 | # experimental as long as format.use-persistent-nodemap is. | |
1104 | coreconfigitem( |
|
1117 | coreconfigitem( | |
1105 | b'storage', b'revlog.nodemap.mode', default=b'compat', experimental=True |
|
1118 | b'storage', b'revlog.nodemap.mode', default=b'compat', experimental=True | |
1106 | ) |
|
1119 | ) | |
1107 | coreconfigitem( |
|
1120 | coreconfigitem( | |
1108 | b'storage', b'revlog.reuse-external-delta', default=True, |
|
1121 | b'storage', b'revlog.reuse-external-delta', default=True, | |
1109 | ) |
|
1122 | ) | |
1110 | coreconfigitem( |
|
1123 | coreconfigitem( | |
1111 | b'storage', b'revlog.reuse-external-delta-parent', default=None, |
|
1124 | b'storage', b'revlog.reuse-external-delta-parent', default=None, | |
1112 | ) |
|
1125 | ) | |
1113 | coreconfigitem( |
|
1126 | coreconfigitem( | |
1114 | b'storage', b'revlog.zlib.level', default=None, |
|
1127 | b'storage', b'revlog.zlib.level', default=None, | |
1115 | ) |
|
1128 | ) | |
1116 | coreconfigitem( |
|
1129 | coreconfigitem( | |
1117 | b'storage', b'revlog.zstd.level', default=None, |
|
1130 | b'storage', b'revlog.zstd.level', default=None, | |
1118 | ) |
|
1131 | ) | |
1119 | coreconfigitem( |
|
1132 | coreconfigitem( | |
1120 | b'server', b'bookmarks-pushkey-compat', default=True, |
|
1133 | b'server', b'bookmarks-pushkey-compat', default=True, | |
1121 | ) |
|
1134 | ) | |
1122 | coreconfigitem( |
|
1135 | coreconfigitem( | |
1123 | b'server', b'bundle1', default=True, |
|
1136 | b'server', b'bundle1', default=True, | |
1124 | ) |
|
1137 | ) | |
1125 | coreconfigitem( |
|
1138 | coreconfigitem( | |
1126 | b'server', b'bundle1gd', default=None, |
|
1139 | b'server', b'bundle1gd', default=None, | |
1127 | ) |
|
1140 | ) | |
1128 | coreconfigitem( |
|
1141 | coreconfigitem( | |
1129 | b'server', b'bundle1.pull', default=None, |
|
1142 | b'server', b'bundle1.pull', default=None, | |
1130 | ) |
|
1143 | ) | |
1131 | coreconfigitem( |
|
1144 | coreconfigitem( | |
1132 | b'server', b'bundle1gd.pull', default=None, |
|
1145 | b'server', b'bundle1gd.pull', default=None, | |
1133 | ) |
|
1146 | ) | |
1134 | coreconfigitem( |
|
1147 | coreconfigitem( | |
1135 | b'server', b'bundle1.push', default=None, |
|
1148 | b'server', b'bundle1.push', default=None, | |
1136 | ) |
|
1149 | ) | |
1137 | coreconfigitem( |
|
1150 | coreconfigitem( | |
1138 | b'server', b'bundle1gd.push', default=None, |
|
1151 | b'server', b'bundle1gd.push', default=None, | |
1139 | ) |
|
1152 | ) | |
1140 | coreconfigitem( |
|
1153 | coreconfigitem( | |
1141 | b'server', |
|
1154 | b'server', | |
1142 | b'bundle2.stream', |
|
1155 | b'bundle2.stream', | |
1143 | default=True, |
|
1156 | default=True, | |
1144 | alias=[(b'experimental', b'bundle2.stream')], |
|
1157 | alias=[(b'experimental', b'bundle2.stream')], | |
1145 | ) |
|
1158 | ) | |
1146 | coreconfigitem( |
|
1159 | coreconfigitem( | |
1147 | b'server', b'compressionengines', default=list, |
|
1160 | b'server', b'compressionengines', default=list, | |
1148 | ) |
|
1161 | ) | |
1149 | coreconfigitem( |
|
1162 | coreconfigitem( | |
1150 | b'server', b'concurrent-push-mode', default=b'check-related', |
|
1163 | b'server', b'concurrent-push-mode', default=b'check-related', | |
1151 | ) |
|
1164 | ) | |
1152 | coreconfigitem( |
|
1165 | coreconfigitem( | |
1153 | b'server', b'disablefullbundle', default=False, |
|
1166 | b'server', b'disablefullbundle', default=False, | |
1154 | ) |
|
1167 | ) | |
1155 | coreconfigitem( |
|
1168 | coreconfigitem( | |
1156 | b'server', b'maxhttpheaderlen', default=1024, |
|
1169 | b'server', b'maxhttpheaderlen', default=1024, | |
1157 | ) |
|
1170 | ) | |
1158 | coreconfigitem( |
|
1171 | coreconfigitem( | |
1159 | b'server', b'pullbundle', default=False, |
|
1172 | b'server', b'pullbundle', default=False, | |
1160 | ) |
|
1173 | ) | |
1161 | coreconfigitem( |
|
1174 | coreconfigitem( | |
1162 | b'server', b'preferuncompressed', default=False, |
|
1175 | b'server', b'preferuncompressed', default=False, | |
1163 | ) |
|
1176 | ) | |
1164 | coreconfigitem( |
|
1177 | coreconfigitem( | |
1165 | b'server', b'streamunbundle', default=False, |
|
1178 | b'server', b'streamunbundle', default=False, | |
1166 | ) |
|
1179 | ) | |
1167 | coreconfigitem( |
|
1180 | coreconfigitem( | |
1168 | b'server', b'uncompressed', default=True, |
|
1181 | b'server', b'uncompressed', default=True, | |
1169 | ) |
|
1182 | ) | |
1170 | coreconfigitem( |
|
1183 | coreconfigitem( | |
1171 | b'server', b'uncompressedallowsecret', default=False, |
|
1184 | b'server', b'uncompressedallowsecret', default=False, | |
1172 | ) |
|
1185 | ) | |
1173 | coreconfigitem( |
|
1186 | coreconfigitem( | |
1174 | b'server', b'view', default=b'served', |
|
1187 | b'server', b'view', default=b'served', | |
1175 | ) |
|
1188 | ) | |
1176 | coreconfigitem( |
|
1189 | coreconfigitem( | |
1177 | b'server', b'validate', default=False, |
|
1190 | b'server', b'validate', default=False, | |
1178 | ) |
|
1191 | ) | |
1179 | coreconfigitem( |
|
1192 | coreconfigitem( | |
1180 | b'server', b'zliblevel', default=-1, |
|
1193 | b'server', b'zliblevel', default=-1, | |
1181 | ) |
|
1194 | ) | |
1182 | coreconfigitem( |
|
1195 | coreconfigitem( | |
1183 | b'server', b'zstdlevel', default=3, |
|
1196 | b'server', b'zstdlevel', default=3, | |
1184 | ) |
|
1197 | ) | |
1185 | coreconfigitem( |
|
1198 | coreconfigitem( | |
1186 | b'share', b'pool', default=None, |
|
1199 | b'share', b'pool', default=None, | |
1187 | ) |
|
1200 | ) | |
1188 | coreconfigitem( |
|
1201 | coreconfigitem( | |
1189 | b'share', b'poolnaming', default=b'identity', |
|
1202 | b'share', b'poolnaming', default=b'identity', | |
1190 | ) |
|
1203 | ) | |
1191 | coreconfigitem( |
|
1204 | coreconfigitem( | |
1192 | b'shelve', b'maxbackups', default=10, |
|
1205 | b'shelve', b'maxbackups', default=10, | |
1193 | ) |
|
1206 | ) | |
1194 | coreconfigitem( |
|
1207 | coreconfigitem( | |
1195 | b'smtp', b'host', default=None, |
|
1208 | b'smtp', b'host', default=None, | |
1196 | ) |
|
1209 | ) | |
1197 | coreconfigitem( |
|
1210 | coreconfigitem( | |
1198 | b'smtp', b'local_hostname', default=None, |
|
1211 | b'smtp', b'local_hostname', default=None, | |
1199 | ) |
|
1212 | ) | |
1200 | coreconfigitem( |
|
1213 | coreconfigitem( | |
1201 | b'smtp', b'password', default=None, |
|
1214 | b'smtp', b'password', default=None, | |
1202 | ) |
|
1215 | ) | |
1203 | coreconfigitem( |
|
1216 | coreconfigitem( | |
1204 | b'smtp', b'port', default=dynamicdefault, |
|
1217 | b'smtp', b'port', default=dynamicdefault, | |
1205 | ) |
|
1218 | ) | |
1206 | coreconfigitem( |
|
1219 | coreconfigitem( | |
1207 | b'smtp', b'tls', default=b'none', |
|
1220 | b'smtp', b'tls', default=b'none', | |
1208 | ) |
|
1221 | ) | |
1209 | coreconfigitem( |
|
1222 | coreconfigitem( | |
1210 | b'smtp', b'username', default=None, |
|
1223 | b'smtp', b'username', default=None, | |
1211 | ) |
|
1224 | ) | |
1212 | coreconfigitem( |
|
1225 | coreconfigitem( | |
1213 | b'sparse', b'missingwarning', default=True, experimental=True, |
|
1226 | b'sparse', b'missingwarning', default=True, experimental=True, | |
1214 | ) |
|
1227 | ) | |
1215 | coreconfigitem( |
|
1228 | coreconfigitem( | |
1216 | b'subrepos', |
|
1229 | b'subrepos', | |
1217 | b'allowed', |
|
1230 | b'allowed', | |
1218 | default=dynamicdefault, # to make backporting simpler |
|
1231 | default=dynamicdefault, # to make backporting simpler | |
1219 | ) |
|
1232 | ) | |
1220 | coreconfigitem( |
|
1233 | coreconfigitem( | |
1221 | b'subrepos', b'hg:allowed', default=dynamicdefault, |
|
1234 | b'subrepos', b'hg:allowed', default=dynamicdefault, | |
1222 | ) |
|
1235 | ) | |
1223 | coreconfigitem( |
|
1236 | coreconfigitem( | |
1224 | b'subrepos', b'git:allowed', default=dynamicdefault, |
|
1237 | b'subrepos', b'git:allowed', default=dynamicdefault, | |
1225 | ) |
|
1238 | ) | |
1226 | coreconfigitem( |
|
1239 | coreconfigitem( | |
1227 | b'subrepos', b'svn:allowed', default=dynamicdefault, |
|
1240 | b'subrepos', b'svn:allowed', default=dynamicdefault, | |
1228 | ) |
|
1241 | ) | |
1229 | coreconfigitem( |
|
1242 | coreconfigitem( | |
1230 | b'templates', b'.*', default=None, generic=True, |
|
1243 | b'templates', b'.*', default=None, generic=True, | |
1231 | ) |
|
1244 | ) | |
1232 | coreconfigitem( |
|
1245 | coreconfigitem( | |
1233 | b'templateconfig', b'.*', default=dynamicdefault, generic=True, |
|
1246 | b'templateconfig', b'.*', default=dynamicdefault, generic=True, | |
1234 | ) |
|
1247 | ) | |
1235 | coreconfigitem( |
|
1248 | coreconfigitem( | |
1236 | b'trusted', b'groups', default=list, |
|
1249 | b'trusted', b'groups', default=list, | |
1237 | ) |
|
1250 | ) | |
1238 | coreconfigitem( |
|
1251 | coreconfigitem( | |
1239 | b'trusted', b'users', default=list, |
|
1252 | b'trusted', b'users', default=list, | |
1240 | ) |
|
1253 | ) | |
1241 | coreconfigitem( |
|
1254 | coreconfigitem( | |
1242 | b'ui', b'_usedassubrepo', default=False, |
|
1255 | b'ui', b'_usedassubrepo', default=False, | |
1243 | ) |
|
1256 | ) | |
1244 | coreconfigitem( |
|
1257 | coreconfigitem( | |
1245 | b'ui', b'allowemptycommit', default=False, |
|
1258 | b'ui', b'allowemptycommit', default=False, | |
1246 | ) |
|
1259 | ) | |
1247 | coreconfigitem( |
|
1260 | coreconfigitem( | |
1248 | b'ui', b'archivemeta', default=True, |
|
1261 | b'ui', b'archivemeta', default=True, | |
1249 | ) |
|
1262 | ) | |
1250 | coreconfigitem( |
|
1263 | coreconfigitem( | |
1251 | b'ui', b'askusername', default=False, |
|
1264 | b'ui', b'askusername', default=False, | |
1252 | ) |
|
1265 | ) | |
1253 | coreconfigitem( |
|
1266 | coreconfigitem( | |
1254 | b'ui', b'available-memory', default=None, |
|
1267 | b'ui', b'available-memory', default=None, | |
1255 | ) |
|
1268 | ) | |
1256 |
|
1269 | |||
1257 | coreconfigitem( |
|
1270 | coreconfigitem( | |
1258 | b'ui', b'clonebundlefallback', default=False, |
|
1271 | b'ui', b'clonebundlefallback', default=False, | |
1259 | ) |
|
1272 | ) | |
1260 | coreconfigitem( |
|
1273 | coreconfigitem( | |
1261 | b'ui', b'clonebundleprefers', default=list, |
|
1274 | b'ui', b'clonebundleprefers', default=list, | |
1262 | ) |
|
1275 | ) | |
1263 | coreconfigitem( |
|
1276 | coreconfigitem( | |
1264 | b'ui', b'clonebundles', default=True, |
|
1277 | b'ui', b'clonebundles', default=True, | |
1265 | ) |
|
1278 | ) | |
1266 | coreconfigitem( |
|
1279 | coreconfigitem( | |
1267 | b'ui', b'color', default=b'auto', |
|
1280 | b'ui', b'color', default=b'auto', | |
1268 | ) |
|
1281 | ) | |
1269 | coreconfigitem( |
|
1282 | coreconfigitem( | |
1270 | b'ui', b'commitsubrepos', default=False, |
|
1283 | b'ui', b'commitsubrepos', default=False, | |
1271 | ) |
|
1284 | ) | |
1272 | coreconfigitem( |
|
1285 | coreconfigitem( | |
1273 | b'ui', b'debug', default=False, |
|
1286 | b'ui', b'debug', default=False, | |
1274 | ) |
|
1287 | ) | |
1275 | coreconfigitem( |
|
1288 | coreconfigitem( | |
1276 | b'ui', b'debugger', default=None, |
|
1289 | b'ui', b'debugger', default=None, | |
1277 | ) |
|
1290 | ) | |
1278 | coreconfigitem( |
|
1291 | coreconfigitem( | |
1279 | b'ui', b'editor', default=dynamicdefault, |
|
1292 | b'ui', b'editor', default=dynamicdefault, | |
1280 | ) |
|
1293 | ) | |
1281 | coreconfigitem( |
|
1294 | coreconfigitem( | |
1282 | b'ui', b'fallbackencoding', default=None, |
|
1295 | b'ui', b'fallbackencoding', default=None, | |
1283 | ) |
|
1296 | ) | |
1284 | coreconfigitem( |
|
1297 | coreconfigitem( | |
1285 | b'ui', b'forcecwd', default=None, |
|
1298 | b'ui', b'forcecwd', default=None, | |
1286 | ) |
|
1299 | ) | |
1287 | coreconfigitem( |
|
1300 | coreconfigitem( | |
1288 | b'ui', b'forcemerge', default=None, |
|
1301 | b'ui', b'forcemerge', default=None, | |
1289 | ) |
|
1302 | ) | |
1290 | coreconfigitem( |
|
1303 | coreconfigitem( | |
1291 | b'ui', b'formatdebug', default=False, |
|
1304 | b'ui', b'formatdebug', default=False, | |
1292 | ) |
|
1305 | ) | |
1293 | coreconfigitem( |
|
1306 | coreconfigitem( | |
1294 | b'ui', b'formatjson', default=False, |
|
1307 | b'ui', b'formatjson', default=False, | |
1295 | ) |
|
1308 | ) | |
1296 | coreconfigitem( |
|
1309 | coreconfigitem( | |
1297 | b'ui', b'formatted', default=None, |
|
1310 | b'ui', b'formatted', default=None, | |
1298 | ) |
|
1311 | ) | |
1299 | coreconfigitem( |
|
1312 | coreconfigitem( | |
1300 | b'ui', b'interactive', default=None, |
|
1313 | b'ui', b'interactive', default=None, | |
1301 | ) |
|
1314 | ) | |
1302 | coreconfigitem( |
|
1315 | coreconfigitem( | |
1303 | b'ui', b'interface', default=None, |
|
1316 | b'ui', b'interface', default=None, | |
1304 | ) |
|
1317 | ) | |
1305 | coreconfigitem( |
|
1318 | coreconfigitem( | |
1306 | b'ui', b'interface.chunkselector', default=None, |
|
1319 | b'ui', b'interface.chunkselector', default=None, | |
1307 | ) |
|
1320 | ) | |
1308 | coreconfigitem( |
|
1321 | coreconfigitem( | |
1309 | b'ui', b'large-file-limit', default=10000000, |
|
1322 | b'ui', b'large-file-limit', default=10000000, | |
1310 | ) |
|
1323 | ) | |
1311 | coreconfigitem( |
|
1324 | coreconfigitem( | |
1312 | b'ui', b'logblockedtimes', default=False, |
|
1325 | b'ui', b'logblockedtimes', default=False, | |
1313 | ) |
|
1326 | ) | |
1314 | coreconfigitem( |
|
1327 | coreconfigitem( | |
1315 | b'ui', b'merge', default=None, |
|
1328 | b'ui', b'merge', default=None, | |
1316 | ) |
|
1329 | ) | |
1317 | coreconfigitem( |
|
1330 | coreconfigitem( | |
1318 | b'ui', b'mergemarkers', default=b'basic', |
|
1331 | b'ui', b'mergemarkers', default=b'basic', | |
1319 | ) |
|
1332 | ) | |
1320 | coreconfigitem( |
|
1333 | coreconfigitem( | |
1321 | b'ui', |
|
|||
1322 | b'mergemarkertemplate', |
|
|||
1323 | default=( |
|
|||
1324 | b'{node|short} ' |
|
|||
1325 | b'{ifeq(tags, "tip", "", ' |
|
|||
1326 | b'ifeq(tags, "", "", "{tags} "))}' |
|
|||
1327 | b'{if(bookmarks, "{bookmarks} ")}' |
|
|||
1328 | b'{ifeq(branch, "default", "", "{branch} ")}' |
|
|||
1329 | b'- {author|user}: {desc|firstline}' |
|
|||
1330 | ), |
|
|||
1331 | ) |
|
|||
1332 | coreconfigitem( |
|
|||
1333 | b'ui', b'message-output', default=b'stdio', |
|
1334 | b'ui', b'message-output', default=b'stdio', | |
1334 | ) |
|
1335 | ) | |
1335 | coreconfigitem( |
|
1336 | coreconfigitem( | |
1336 | b'ui', b'nontty', default=False, |
|
1337 | b'ui', b'nontty', default=False, | |
1337 | ) |
|
1338 | ) | |
1338 | coreconfigitem( |
|
1339 | coreconfigitem( | |
1339 | b'ui', b'origbackuppath', default=None, |
|
1340 | b'ui', b'origbackuppath', default=None, | |
1340 | ) |
|
1341 | ) | |
1341 | coreconfigitem( |
|
1342 | coreconfigitem( | |
1342 | b'ui', b'paginate', default=True, |
|
1343 | b'ui', b'paginate', default=True, | |
1343 | ) |
|
1344 | ) | |
1344 | coreconfigitem( |
|
1345 | coreconfigitem( | |
1345 | b'ui', b'patch', default=None, |
|
1346 | b'ui', b'patch', default=None, | |
1346 | ) |
|
1347 | ) | |
1347 | coreconfigitem( |
|
1348 | coreconfigitem( | |
1348 | b'ui', b'pre-merge-tool-output-template', default=None, |
|
1349 | b'ui', b'pre-merge-tool-output-template', default=None, | |
1349 | ) |
|
1350 | ) | |
1350 | coreconfigitem( |
|
1351 | coreconfigitem( | |
1351 | b'ui', b'portablefilenames', default=b'warn', |
|
1352 | b'ui', b'portablefilenames', default=b'warn', | |
1352 | ) |
|
1353 | ) | |
1353 | coreconfigitem( |
|
1354 | coreconfigitem( | |
1354 | b'ui', b'promptecho', default=False, |
|
1355 | b'ui', b'promptecho', default=False, | |
1355 | ) |
|
1356 | ) | |
1356 | coreconfigitem( |
|
1357 | coreconfigitem( | |
1357 | b'ui', b'quiet', default=False, |
|
1358 | b'ui', b'quiet', default=False, | |
1358 | ) |
|
1359 | ) | |
1359 | coreconfigitem( |
|
1360 | coreconfigitem( | |
1360 | b'ui', b'quietbookmarkmove', default=False, |
|
1361 | b'ui', b'quietbookmarkmove', default=False, | |
1361 | ) |
|
1362 | ) | |
1362 | coreconfigitem( |
|
1363 | coreconfigitem( | |
1363 | b'ui', b'relative-paths', default=b'legacy', |
|
1364 | b'ui', b'relative-paths', default=b'legacy', | |
1364 | ) |
|
1365 | ) | |
1365 | coreconfigitem( |
|
1366 | coreconfigitem( | |
1366 | b'ui', b'remotecmd', default=b'hg', |
|
1367 | b'ui', b'remotecmd', default=b'hg', | |
1367 | ) |
|
1368 | ) | |
1368 | coreconfigitem( |
|
1369 | coreconfigitem( | |
1369 | b'ui', b'report_untrusted', default=True, |
|
1370 | b'ui', b'report_untrusted', default=True, | |
1370 | ) |
|
1371 | ) | |
1371 | coreconfigitem( |
|
1372 | coreconfigitem( | |
1372 | b'ui', b'rollback', default=True, |
|
1373 | b'ui', b'rollback', default=True, | |
1373 | ) |
|
1374 | ) | |
1374 | coreconfigitem( |
|
1375 | coreconfigitem( | |
1375 | b'ui', b'signal-safe-lock', default=True, |
|
1376 | b'ui', b'signal-safe-lock', default=True, | |
1376 | ) |
|
1377 | ) | |
1377 | coreconfigitem( |
|
1378 | coreconfigitem( | |
1378 | b'ui', b'slash', default=False, |
|
1379 | b'ui', b'slash', default=False, | |
1379 | ) |
|
1380 | ) | |
1380 | coreconfigitem( |
|
1381 | coreconfigitem( | |
1381 | b'ui', b'ssh', default=b'ssh', |
|
1382 | b'ui', b'ssh', default=b'ssh', | |
1382 | ) |
|
1383 | ) | |
1383 | coreconfigitem( |
|
1384 | coreconfigitem( | |
1384 | b'ui', b'ssherrorhint', default=None, |
|
1385 | b'ui', b'ssherrorhint', default=None, | |
1385 | ) |
|
1386 | ) | |
1386 | coreconfigitem( |
|
1387 | coreconfigitem( | |
1387 | b'ui', b'statuscopies', default=False, |
|
1388 | b'ui', b'statuscopies', default=False, | |
1388 | ) |
|
1389 | ) | |
1389 | coreconfigitem( |
|
1390 | coreconfigitem( | |
1390 | b'ui', b'strict', default=False, |
|
1391 | b'ui', b'strict', default=False, | |
1391 | ) |
|
1392 | ) | |
1392 | coreconfigitem( |
|
1393 | coreconfigitem( | |
1393 | b'ui', b'style', default=b'', |
|
1394 | b'ui', b'style', default=b'', | |
1394 | ) |
|
1395 | ) | |
1395 | coreconfigitem( |
|
1396 | coreconfigitem( | |
1396 | b'ui', b'supportcontact', default=None, |
|
1397 | b'ui', b'supportcontact', default=None, | |
1397 | ) |
|
1398 | ) | |
1398 | coreconfigitem( |
|
1399 | coreconfigitem( | |
1399 | b'ui', b'textwidth', default=78, |
|
1400 | b'ui', b'textwidth', default=78, | |
1400 | ) |
|
1401 | ) | |
1401 | coreconfigitem( |
|
1402 | coreconfigitem( | |
1402 | b'ui', b'timeout', default=b'600', |
|
1403 | b'ui', b'timeout', default=b'600', | |
1403 | ) |
|
1404 | ) | |
1404 | coreconfigitem( |
|
1405 | coreconfigitem( | |
1405 | b'ui', b'timeout.warn', default=0, |
|
1406 | b'ui', b'timeout.warn', default=0, | |
1406 | ) |
|
1407 | ) | |
1407 | coreconfigitem( |
|
1408 | coreconfigitem( | |
1408 | b'ui', b'timestamp-output', default=False, |
|
1409 | b'ui', b'timestamp-output', default=False, | |
1409 | ) |
|
1410 | ) | |
1410 | coreconfigitem( |
|
1411 | coreconfigitem( | |
1411 | b'ui', b'traceback', default=False, |
|
1412 | b'ui', b'traceback', default=False, | |
1412 | ) |
|
1413 | ) | |
1413 | coreconfigitem( |
|
1414 | coreconfigitem( | |
1414 | b'ui', b'tweakdefaults', default=False, |
|
1415 | b'ui', b'tweakdefaults', default=False, | |
1415 | ) |
|
1416 | ) | |
1416 | coreconfigitem(b'ui', b'username', alias=[(b'ui', b'user')]) |
|
1417 | coreconfigitem(b'ui', b'username', alias=[(b'ui', b'user')]) | |
1417 | coreconfigitem( |
|
1418 | coreconfigitem( | |
1418 | b'ui', b'verbose', default=False, |
|
1419 | b'ui', b'verbose', default=False, | |
1419 | ) |
|
1420 | ) | |
1420 | coreconfigitem( |
|
1421 | coreconfigitem( | |
1421 | b'verify', b'skipflags', default=None, |
|
1422 | b'verify', b'skipflags', default=None, | |
1422 | ) |
|
1423 | ) | |
1423 | coreconfigitem( |
|
1424 | coreconfigitem( | |
1424 | b'web', b'allowbz2', default=False, |
|
1425 | b'web', b'allowbz2', default=False, | |
1425 | ) |
|
1426 | ) | |
1426 | coreconfigitem( |
|
1427 | coreconfigitem( | |
1427 | b'web', b'allowgz', default=False, |
|
1428 | b'web', b'allowgz', default=False, | |
1428 | ) |
|
1429 | ) | |
1429 | coreconfigitem( |
|
1430 | coreconfigitem( | |
1430 | b'web', b'allow-pull', alias=[(b'web', b'allowpull')], default=True, |
|
1431 | b'web', b'allow-pull', alias=[(b'web', b'allowpull')], default=True, | |
1431 | ) |
|
1432 | ) | |
1432 | coreconfigitem( |
|
1433 | coreconfigitem( | |
1433 | b'web', b'allow-push', alias=[(b'web', b'allow_push')], default=list, |
|
1434 | b'web', b'allow-push', alias=[(b'web', b'allow_push')], default=list, | |
1434 | ) |
|
1435 | ) | |
1435 | coreconfigitem( |
|
1436 | coreconfigitem( | |
1436 | b'web', b'allowzip', default=False, |
|
1437 | b'web', b'allowzip', default=False, | |
1437 | ) |
|
1438 | ) | |
1438 | coreconfigitem( |
|
1439 | coreconfigitem( | |
1439 | b'web', b'archivesubrepos', default=False, |
|
1440 | b'web', b'archivesubrepos', default=False, | |
1440 | ) |
|
1441 | ) | |
1441 | coreconfigitem( |
|
1442 | coreconfigitem( | |
1442 | b'web', b'cache', default=True, |
|
1443 | b'web', b'cache', default=True, | |
1443 | ) |
|
1444 | ) | |
1444 | coreconfigitem( |
|
1445 | coreconfigitem( | |
1445 | b'web', b'comparisoncontext', default=5, |
|
1446 | b'web', b'comparisoncontext', default=5, | |
1446 | ) |
|
1447 | ) | |
1447 | coreconfigitem( |
|
1448 | coreconfigitem( | |
1448 | b'web', b'contact', default=None, |
|
1449 | b'web', b'contact', default=None, | |
1449 | ) |
|
1450 | ) | |
1450 | coreconfigitem( |
|
1451 | coreconfigitem( | |
1451 | b'web', b'deny_push', default=list, |
|
1452 | b'web', b'deny_push', default=list, | |
1452 | ) |
|
1453 | ) | |
1453 | coreconfigitem( |
|
1454 | coreconfigitem( | |
1454 | b'web', b'guessmime', default=False, |
|
1455 | b'web', b'guessmime', default=False, | |
1455 | ) |
|
1456 | ) | |
1456 | coreconfigitem( |
|
1457 | coreconfigitem( | |
1457 | b'web', b'hidden', default=False, |
|
1458 | b'web', b'hidden', default=False, | |
1458 | ) |
|
1459 | ) | |
1459 | coreconfigitem( |
|
1460 | coreconfigitem( | |
1460 | b'web', b'labels', default=list, |
|
1461 | b'web', b'labels', default=list, | |
1461 | ) |
|
1462 | ) | |
1462 | coreconfigitem( |
|
1463 | coreconfigitem( | |
1463 | b'web', b'logoimg', default=b'hglogo.png', |
|
1464 | b'web', b'logoimg', default=b'hglogo.png', | |
1464 | ) |
|
1465 | ) | |
1465 | coreconfigitem( |
|
1466 | coreconfigitem( | |
1466 | b'web', b'logourl', default=b'https://mercurial-scm.org/', |
|
1467 | b'web', b'logourl', default=b'https://mercurial-scm.org/', | |
1467 | ) |
|
1468 | ) | |
1468 | coreconfigitem( |
|
1469 | coreconfigitem( | |
1469 | b'web', b'accesslog', default=b'-', |
|
1470 | b'web', b'accesslog', default=b'-', | |
1470 | ) |
|
1471 | ) | |
1471 | coreconfigitem( |
|
1472 | coreconfigitem( | |
1472 | b'web', b'address', default=b'', |
|
1473 | b'web', b'address', default=b'', | |
1473 | ) |
|
1474 | ) | |
1474 | coreconfigitem( |
|
1475 | coreconfigitem( | |
1475 | b'web', b'allow-archive', alias=[(b'web', b'allow_archive')], default=list, |
|
1476 | b'web', b'allow-archive', alias=[(b'web', b'allow_archive')], default=list, | |
1476 | ) |
|
1477 | ) | |
1477 | coreconfigitem( |
|
1478 | coreconfigitem( | |
1478 | b'web', b'allow_read', default=list, |
|
1479 | b'web', b'allow_read', default=list, | |
1479 | ) |
|
1480 | ) | |
1480 | coreconfigitem( |
|
1481 | coreconfigitem( | |
1481 | b'web', b'baseurl', default=None, |
|
1482 | b'web', b'baseurl', default=None, | |
1482 | ) |
|
1483 | ) | |
1483 | coreconfigitem( |
|
1484 | coreconfigitem( | |
1484 | b'web', b'cacerts', default=None, |
|
1485 | b'web', b'cacerts', default=None, | |
1485 | ) |
|
1486 | ) | |
1486 | coreconfigitem( |
|
1487 | coreconfigitem( | |
1487 | b'web', b'certificate', default=None, |
|
1488 | b'web', b'certificate', default=None, | |
1488 | ) |
|
1489 | ) | |
1489 | coreconfigitem( |
|
1490 | coreconfigitem( | |
1490 | b'web', b'collapse', default=False, |
|
1491 | b'web', b'collapse', default=False, | |
1491 | ) |
|
1492 | ) | |
1492 | coreconfigitem( |
|
1493 | coreconfigitem( | |
1493 | b'web', b'csp', default=None, |
|
1494 | b'web', b'csp', default=None, | |
1494 | ) |
|
1495 | ) | |
1495 | coreconfigitem( |
|
1496 | coreconfigitem( | |
1496 | b'web', b'deny_read', default=list, |
|
1497 | b'web', b'deny_read', default=list, | |
1497 | ) |
|
1498 | ) | |
1498 | coreconfigitem( |
|
1499 | coreconfigitem( | |
1499 | b'web', b'descend', default=True, |
|
1500 | b'web', b'descend', default=True, | |
1500 | ) |
|
1501 | ) | |
1501 | coreconfigitem( |
|
1502 | coreconfigitem( | |
1502 | b'web', b'description', default=b"", |
|
1503 | b'web', b'description', default=b"", | |
1503 | ) |
|
1504 | ) | |
1504 | coreconfigitem( |
|
1505 | coreconfigitem( | |
1505 | b'web', b'encoding', default=lambda: encoding.encoding, |
|
1506 | b'web', b'encoding', default=lambda: encoding.encoding, | |
1506 | ) |
|
1507 | ) | |
1507 | coreconfigitem( |
|
1508 | coreconfigitem( | |
1508 | b'web', b'errorlog', default=b'-', |
|
1509 | b'web', b'errorlog', default=b'-', | |
1509 | ) |
|
1510 | ) | |
1510 | coreconfigitem( |
|
1511 | coreconfigitem( | |
1511 | b'web', b'ipv6', default=False, |
|
1512 | b'web', b'ipv6', default=False, | |
1512 | ) |
|
1513 | ) | |
1513 | coreconfigitem( |
|
1514 | coreconfigitem( | |
1514 | b'web', b'maxchanges', default=10, |
|
1515 | b'web', b'maxchanges', default=10, | |
1515 | ) |
|
1516 | ) | |
1516 | coreconfigitem( |
|
1517 | coreconfigitem( | |
1517 | b'web', b'maxfiles', default=10, |
|
1518 | b'web', b'maxfiles', default=10, | |
1518 | ) |
|
1519 | ) | |
1519 | coreconfigitem( |
|
1520 | coreconfigitem( | |
1520 | b'web', b'maxshortchanges', default=60, |
|
1521 | b'web', b'maxshortchanges', default=60, | |
1521 | ) |
|
1522 | ) | |
1522 | coreconfigitem( |
|
1523 | coreconfigitem( | |
1523 | b'web', b'motd', default=b'', |
|
1524 | b'web', b'motd', default=b'', | |
1524 | ) |
|
1525 | ) | |
1525 | coreconfigitem( |
|
1526 | coreconfigitem( | |
1526 | b'web', b'name', default=dynamicdefault, |
|
1527 | b'web', b'name', default=dynamicdefault, | |
1527 | ) |
|
1528 | ) | |
1528 | coreconfigitem( |
|
1529 | coreconfigitem( | |
1529 | b'web', b'port', default=8000, |
|
1530 | b'web', b'port', default=8000, | |
1530 | ) |
|
1531 | ) | |
1531 | coreconfigitem( |
|
1532 | coreconfigitem( | |
1532 | b'web', b'prefix', default=b'', |
|
1533 | b'web', b'prefix', default=b'', | |
1533 | ) |
|
1534 | ) | |
1534 | coreconfigitem( |
|
1535 | coreconfigitem( | |
1535 | b'web', b'push_ssl', default=True, |
|
1536 | b'web', b'push_ssl', default=True, | |
1536 | ) |
|
1537 | ) | |
1537 | coreconfigitem( |
|
1538 | coreconfigitem( | |
1538 | b'web', b'refreshinterval', default=20, |
|
1539 | b'web', b'refreshinterval', default=20, | |
1539 | ) |
|
1540 | ) | |
1540 | coreconfigitem( |
|
1541 | coreconfigitem( | |
1541 | b'web', b'server-header', default=None, |
|
1542 | b'web', b'server-header', default=None, | |
1542 | ) |
|
1543 | ) | |
1543 | coreconfigitem( |
|
1544 | coreconfigitem( | |
1544 | b'web', b'static', default=None, |
|
1545 | b'web', b'static', default=None, | |
1545 | ) |
|
1546 | ) | |
1546 | coreconfigitem( |
|
1547 | coreconfigitem( | |
1547 | b'web', b'staticurl', default=None, |
|
1548 | b'web', b'staticurl', default=None, | |
1548 | ) |
|
1549 | ) | |
1549 | coreconfigitem( |
|
1550 | coreconfigitem( | |
1550 | b'web', b'stripes', default=1, |
|
1551 | b'web', b'stripes', default=1, | |
1551 | ) |
|
1552 | ) | |
1552 | coreconfigitem( |
|
1553 | coreconfigitem( | |
1553 | b'web', b'style', default=b'paper', |
|
1554 | b'web', b'style', default=b'paper', | |
1554 | ) |
|
1555 | ) | |
1555 | coreconfigitem( |
|
1556 | coreconfigitem( | |
1556 | b'web', b'templates', default=None, |
|
1557 | b'web', b'templates', default=None, | |
1557 | ) |
|
1558 | ) | |
1558 | coreconfigitem( |
|
1559 | coreconfigitem( | |
1559 | b'web', b'view', default=b'served', experimental=True, |
|
1560 | b'web', b'view', default=b'served', experimental=True, | |
1560 | ) |
|
1561 | ) | |
1561 | coreconfigitem( |
|
1562 | coreconfigitem( | |
1562 | b'worker', b'backgroundclose', default=dynamicdefault, |
|
1563 | b'worker', b'backgroundclose', default=dynamicdefault, | |
1563 | ) |
|
1564 | ) | |
1564 | # Windows defaults to a limit of 512 open files. A buffer of 128 |
|
1565 | # Windows defaults to a limit of 512 open files. A buffer of 128 | |
1565 | # should give us enough headway. |
|
1566 | # should give us enough headway. | |
1566 | coreconfigitem( |
|
1567 | coreconfigitem( | |
1567 | b'worker', b'backgroundclosemaxqueue', default=384, |
|
1568 | b'worker', b'backgroundclosemaxqueue', default=384, | |
1568 | ) |
|
1569 | ) | |
1569 | coreconfigitem( |
|
1570 | coreconfigitem( | |
1570 | b'worker', b'backgroundcloseminfilecount', default=2048, |
|
1571 | b'worker', b'backgroundcloseminfilecount', default=2048, | |
1571 | ) |
|
1572 | ) | |
1572 | coreconfigitem( |
|
1573 | coreconfigitem( | |
1573 | b'worker', b'backgroundclosethreadcount', default=4, |
|
1574 | b'worker', b'backgroundclosethreadcount', default=4, | |
1574 | ) |
|
1575 | ) | |
1575 | coreconfigitem( |
|
1576 | coreconfigitem( | |
1576 | b'worker', b'enabled', default=True, |
|
1577 | b'worker', b'enabled', default=True, | |
1577 | ) |
|
1578 | ) | |
1578 | coreconfigitem( |
|
1579 | coreconfigitem( | |
1579 | b'worker', b'numcpus', default=None, |
|
1580 | b'worker', b'numcpus', default=None, | |
1580 | ) |
|
1581 | ) | |
1581 |
|
1582 | |||
1582 | # Rebase related configuration moved to core because other extension are doing |
|
1583 | # Rebase related configuration moved to core because other extension are doing | |
1583 | # strange things. For example, shelve import the extensions to reuse some bit |
|
1584 | # strange things. For example, shelve import the extensions to reuse some bit | |
1584 | # without formally loading it. |
|
1585 | # without formally loading it. | |
1585 | coreconfigitem( |
|
1586 | coreconfigitem( | |
1586 | b'commands', b'rebase.requiredest', default=False, |
|
1587 | b'commands', b'rebase.requiredest', default=False, | |
1587 | ) |
|
1588 | ) | |
1588 | coreconfigitem( |
|
1589 | coreconfigitem( | |
1589 | b'experimental', b'rebaseskipobsolete', default=True, |
|
1590 | b'experimental', b'rebaseskipobsolete', default=True, | |
1590 | ) |
|
1591 | ) | |
1591 | coreconfigitem( |
|
1592 | coreconfigitem( | |
1592 | b'rebase', b'singletransaction', default=False, |
|
1593 | b'rebase', b'singletransaction', default=False, | |
1593 | ) |
|
1594 | ) | |
1594 | coreconfigitem( |
|
1595 | coreconfigitem( | |
1595 | b'rebase', b'experimental.inmemory', default=False, |
|
1596 | b'rebase', b'experimental.inmemory', default=False, | |
1596 | ) |
|
1597 | ) |
@@ -1,1267 +1,1267 b'' | |||||
1 | # filemerge.py - file-level merge handling for Mercurial |
|
1 | # filemerge.py - file-level merge handling for Mercurial | |
2 | # |
|
2 | # | |
3 | # Copyright 2006, 2007, 2008 Matt Mackall <mpm@selenic.com> |
|
3 | # Copyright 2006, 2007, 2008 Matt Mackall <mpm@selenic.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 |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import contextlib |
|
10 | import contextlib | |
11 | import os |
|
11 | import os | |
12 | import re |
|
12 | import re | |
13 | import shutil |
|
13 | import shutil | |
14 |
|
14 | |||
15 | from .i18n import _ |
|
15 | from .i18n import _ | |
16 | from .node import ( |
|
16 | from .node import ( | |
17 | hex, |
|
17 | hex, | |
18 | nullid, |
|
18 | nullid, | |
19 | short, |
|
19 | short, | |
20 | ) |
|
20 | ) | |
21 | from .pycompat import ( |
|
21 | from .pycompat import ( | |
22 | getattr, |
|
22 | getattr, | |
23 | open, |
|
23 | open, | |
24 | ) |
|
24 | ) | |
25 |
|
25 | |||
26 | from . import ( |
|
26 | from . import ( | |
27 | encoding, |
|
27 | encoding, | |
28 | error, |
|
28 | error, | |
29 | formatter, |
|
29 | formatter, | |
30 | match, |
|
30 | match, | |
31 | pycompat, |
|
31 | pycompat, | |
32 | registrar, |
|
32 | registrar, | |
33 | scmutil, |
|
33 | scmutil, | |
34 | simplemerge, |
|
34 | simplemerge, | |
35 | tagmerge, |
|
35 | tagmerge, | |
36 | templatekw, |
|
36 | templatekw, | |
37 | templater, |
|
37 | templater, | |
38 | templateutil, |
|
38 | templateutil, | |
39 | util, |
|
39 | util, | |
40 | ) |
|
40 | ) | |
41 |
|
41 | |||
42 | from .utils import ( |
|
42 | from .utils import ( | |
43 | procutil, |
|
43 | procutil, | |
44 | stringutil, |
|
44 | stringutil, | |
45 | ) |
|
45 | ) | |
46 |
|
46 | |||
47 |
|
47 | |||
48 | def _toolstr(ui, tool, part, *args): |
|
48 | def _toolstr(ui, tool, part, *args): | |
49 | return ui.config(b"merge-tools", tool + b"." + part, *args) |
|
49 | return ui.config(b"merge-tools", tool + b"." + part, *args) | |
50 |
|
50 | |||
51 |
|
51 | |||
52 | def _toolbool(ui, tool, part, *args): |
|
52 | def _toolbool(ui, tool, part, *args): | |
53 | return ui.configbool(b"merge-tools", tool + b"." + part, *args) |
|
53 | return ui.configbool(b"merge-tools", tool + b"." + part, *args) | |
54 |
|
54 | |||
55 |
|
55 | |||
56 | def _toollist(ui, tool, part): |
|
56 | def _toollist(ui, tool, part): | |
57 | return ui.configlist(b"merge-tools", tool + b"." + part) |
|
57 | return ui.configlist(b"merge-tools", tool + b"." + part) | |
58 |
|
58 | |||
59 |
|
59 | |||
60 | internals = {} |
|
60 | internals = {} | |
61 | # Merge tools to document. |
|
61 | # Merge tools to document. | |
62 | internalsdoc = {} |
|
62 | internalsdoc = {} | |
63 |
|
63 | |||
64 | internaltool = registrar.internalmerge() |
|
64 | internaltool = registrar.internalmerge() | |
65 |
|
65 | |||
66 | # internal tool merge types |
|
66 | # internal tool merge types | |
67 | nomerge = internaltool.nomerge |
|
67 | nomerge = internaltool.nomerge | |
68 | mergeonly = internaltool.mergeonly # just the full merge, no premerge |
|
68 | mergeonly = internaltool.mergeonly # just the full merge, no premerge | |
69 | fullmerge = internaltool.fullmerge # both premerge and merge |
|
69 | fullmerge = internaltool.fullmerge # both premerge and merge | |
70 |
|
70 | |||
71 | # IMPORTANT: keep the last line of this prompt very short ("What do you want to |
|
71 | # IMPORTANT: keep the last line of this prompt very short ("What do you want to | |
72 | # do?") because of issue6158, ideally to <40 English characters (to allow other |
|
72 | # do?") because of issue6158, ideally to <40 English characters (to allow other | |
73 | # languages that may take more columns to still have a chance to fit in an |
|
73 | # languages that may take more columns to still have a chance to fit in an | |
74 | # 80-column screen). |
|
74 | # 80-column screen). | |
75 | _localchangedotherdeletedmsg = _( |
|
75 | _localchangedotherdeletedmsg = _( | |
76 | b"file '%(fd)s' was deleted in other%(o)s but was modified in local%(l)s.\n" |
|
76 | b"file '%(fd)s' was deleted in other%(o)s but was modified in local%(l)s.\n" | |
77 | b"You can use (c)hanged version, (d)elete, or leave (u)nresolved.\n" |
|
77 | b"You can use (c)hanged version, (d)elete, or leave (u)nresolved.\n" | |
78 | b"What do you want to do?" |
|
78 | b"What do you want to do?" | |
79 | b"$$ &Changed $$ &Delete $$ &Unresolved" |
|
79 | b"$$ &Changed $$ &Delete $$ &Unresolved" | |
80 | ) |
|
80 | ) | |
81 |
|
81 | |||
82 | _otherchangedlocaldeletedmsg = _( |
|
82 | _otherchangedlocaldeletedmsg = _( | |
83 | b"file '%(fd)s' was deleted in local%(l)s but was modified in other%(o)s.\n" |
|
83 | b"file '%(fd)s' was deleted in local%(l)s but was modified in other%(o)s.\n" | |
84 | b"You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.\n" |
|
84 | b"You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.\n" | |
85 | b"What do you want to do?" |
|
85 | b"What do you want to do?" | |
86 | b"$$ &Changed $$ &Deleted $$ &Unresolved" |
|
86 | b"$$ &Changed $$ &Deleted $$ &Unresolved" | |
87 | ) |
|
87 | ) | |
88 |
|
88 | |||
89 |
|
89 | |||
90 | class absentfilectx(object): |
|
90 | class absentfilectx(object): | |
91 | """Represents a file that's ostensibly in a context but is actually not |
|
91 | """Represents a file that's ostensibly in a context but is actually not | |
92 | present in it. |
|
92 | present in it. | |
93 |
|
93 | |||
94 | This is here because it's very specific to the filemerge code for now -- |
|
94 | This is here because it's very specific to the filemerge code for now -- | |
95 | other code is likely going to break with the values this returns.""" |
|
95 | other code is likely going to break with the values this returns.""" | |
96 |
|
96 | |||
97 | def __init__(self, ctx, f): |
|
97 | def __init__(self, ctx, f): | |
98 | self._ctx = ctx |
|
98 | self._ctx = ctx | |
99 | self._f = f |
|
99 | self._f = f | |
100 |
|
100 | |||
101 | def __bytes__(self): |
|
101 | def __bytes__(self): | |
102 | return b'absent file %s@%s' % (self._f, self._ctx) |
|
102 | return b'absent file %s@%s' % (self._f, self._ctx) | |
103 |
|
103 | |||
104 | def path(self): |
|
104 | def path(self): | |
105 | return self._f |
|
105 | return self._f | |
106 |
|
106 | |||
107 | def size(self): |
|
107 | def size(self): | |
108 | return None |
|
108 | return None | |
109 |
|
109 | |||
110 | def data(self): |
|
110 | def data(self): | |
111 | return None |
|
111 | return None | |
112 |
|
112 | |||
113 | def filenode(self): |
|
113 | def filenode(self): | |
114 | return nullid |
|
114 | return nullid | |
115 |
|
115 | |||
116 | _customcmp = True |
|
116 | _customcmp = True | |
117 |
|
117 | |||
118 | def cmp(self, fctx): |
|
118 | def cmp(self, fctx): | |
119 | """compare with other file context |
|
119 | """compare with other file context | |
120 |
|
120 | |||
121 | returns True if different from fctx. |
|
121 | returns True if different from fctx. | |
122 | """ |
|
122 | """ | |
123 | return not ( |
|
123 | return not ( | |
124 | fctx.isabsent() |
|
124 | fctx.isabsent() | |
125 | and fctx.changectx() == self.changectx() |
|
125 | and fctx.changectx() == self.changectx() | |
126 | and fctx.path() == self.path() |
|
126 | and fctx.path() == self.path() | |
127 | ) |
|
127 | ) | |
128 |
|
128 | |||
129 | def flags(self): |
|
129 | def flags(self): | |
130 | return b'' |
|
130 | return b'' | |
131 |
|
131 | |||
132 | def changectx(self): |
|
132 | def changectx(self): | |
133 | return self._ctx |
|
133 | return self._ctx | |
134 |
|
134 | |||
135 | def isbinary(self): |
|
135 | def isbinary(self): | |
136 | return False |
|
136 | return False | |
137 |
|
137 | |||
138 | def isabsent(self): |
|
138 | def isabsent(self): | |
139 | return True |
|
139 | return True | |
140 |
|
140 | |||
141 |
|
141 | |||
142 | def _findtool(ui, tool): |
|
142 | def _findtool(ui, tool): | |
143 | if tool in internals: |
|
143 | if tool in internals: | |
144 | return tool |
|
144 | return tool | |
145 | cmd = _toolstr(ui, tool, b"executable", tool) |
|
145 | cmd = _toolstr(ui, tool, b"executable", tool) | |
146 | if cmd.startswith(b'python:'): |
|
146 | if cmd.startswith(b'python:'): | |
147 | return cmd |
|
147 | return cmd | |
148 | return findexternaltool(ui, tool) |
|
148 | return findexternaltool(ui, tool) | |
149 |
|
149 | |||
150 |
|
150 | |||
151 | def _quotetoolpath(cmd): |
|
151 | def _quotetoolpath(cmd): | |
152 | if cmd.startswith(b'python:'): |
|
152 | if cmd.startswith(b'python:'): | |
153 | return cmd |
|
153 | return cmd | |
154 | return procutil.shellquote(cmd) |
|
154 | return procutil.shellquote(cmd) | |
155 |
|
155 | |||
156 |
|
156 | |||
157 | def findexternaltool(ui, tool): |
|
157 | def findexternaltool(ui, tool): | |
158 | for kn in (b"regkey", b"regkeyalt"): |
|
158 | for kn in (b"regkey", b"regkeyalt"): | |
159 | k = _toolstr(ui, tool, kn) |
|
159 | k = _toolstr(ui, tool, kn) | |
160 | if not k: |
|
160 | if not k: | |
161 | continue |
|
161 | continue | |
162 | p = util.lookupreg(k, _toolstr(ui, tool, b"regname")) |
|
162 | p = util.lookupreg(k, _toolstr(ui, tool, b"regname")) | |
163 | if p: |
|
163 | if p: | |
164 | p = procutil.findexe(p + _toolstr(ui, tool, b"regappend", b"")) |
|
164 | p = procutil.findexe(p + _toolstr(ui, tool, b"regappend", b"")) | |
165 | if p: |
|
165 | if p: | |
166 | return p |
|
166 | return p | |
167 | exe = _toolstr(ui, tool, b"executable", tool) |
|
167 | exe = _toolstr(ui, tool, b"executable", tool) | |
168 | return procutil.findexe(util.expandpath(exe)) |
|
168 | return procutil.findexe(util.expandpath(exe)) | |
169 |
|
169 | |||
170 |
|
170 | |||
171 | def _picktool(repo, ui, path, binary, symlink, changedelete): |
|
171 | def _picktool(repo, ui, path, binary, symlink, changedelete): | |
172 | strictcheck = ui.configbool(b'merge', b'strict-capability-check') |
|
172 | strictcheck = ui.configbool(b'merge', b'strict-capability-check') | |
173 |
|
173 | |||
174 | def hascapability(tool, capability, strict=False): |
|
174 | def hascapability(tool, capability, strict=False): | |
175 | if tool in internals: |
|
175 | if tool in internals: | |
176 | return strict and internals[tool].capabilities.get(capability) |
|
176 | return strict and internals[tool].capabilities.get(capability) | |
177 | return _toolbool(ui, tool, capability) |
|
177 | return _toolbool(ui, tool, capability) | |
178 |
|
178 | |||
179 | def supportscd(tool): |
|
179 | def supportscd(tool): | |
180 | return tool in internals and internals[tool].mergetype == nomerge |
|
180 | return tool in internals and internals[tool].mergetype == nomerge | |
181 |
|
181 | |||
182 | def check(tool, pat, symlink, binary, changedelete): |
|
182 | def check(tool, pat, symlink, binary, changedelete): | |
183 | tmsg = tool |
|
183 | tmsg = tool | |
184 | if pat: |
|
184 | if pat: | |
185 | tmsg = _(b"%s (for pattern %s)") % (tool, pat) |
|
185 | tmsg = _(b"%s (for pattern %s)") % (tool, pat) | |
186 | if not _findtool(ui, tool): |
|
186 | if not _findtool(ui, tool): | |
187 | if pat: # explicitly requested tool deserves a warning |
|
187 | if pat: # explicitly requested tool deserves a warning | |
188 | ui.warn(_(b"couldn't find merge tool %s\n") % tmsg) |
|
188 | ui.warn(_(b"couldn't find merge tool %s\n") % tmsg) | |
189 | else: # configured but non-existing tools are more silent |
|
189 | else: # configured but non-existing tools are more silent | |
190 | ui.note(_(b"couldn't find merge tool %s\n") % tmsg) |
|
190 | ui.note(_(b"couldn't find merge tool %s\n") % tmsg) | |
191 | elif symlink and not hascapability(tool, b"symlink", strictcheck): |
|
191 | elif symlink and not hascapability(tool, b"symlink", strictcheck): | |
192 | ui.warn(_(b"tool %s can't handle symlinks\n") % tmsg) |
|
192 | ui.warn(_(b"tool %s can't handle symlinks\n") % tmsg) | |
193 | elif binary and not hascapability(tool, b"binary", strictcheck): |
|
193 | elif binary and not hascapability(tool, b"binary", strictcheck): | |
194 | ui.warn(_(b"tool %s can't handle binary\n") % tmsg) |
|
194 | ui.warn(_(b"tool %s can't handle binary\n") % tmsg) | |
195 | elif changedelete and not supportscd(tool): |
|
195 | elif changedelete and not supportscd(tool): | |
196 | # the nomerge tools are the only tools that support change/delete |
|
196 | # the nomerge tools are the only tools that support change/delete | |
197 | # conflicts |
|
197 | # conflicts | |
198 | pass |
|
198 | pass | |
199 | elif not procutil.gui() and _toolbool(ui, tool, b"gui"): |
|
199 | elif not procutil.gui() and _toolbool(ui, tool, b"gui"): | |
200 | ui.warn(_(b"tool %s requires a GUI\n") % tmsg) |
|
200 | ui.warn(_(b"tool %s requires a GUI\n") % tmsg) | |
201 | else: |
|
201 | else: | |
202 | return True |
|
202 | return True | |
203 | return False |
|
203 | return False | |
204 |
|
204 | |||
205 | # internal config: ui.forcemerge |
|
205 | # internal config: ui.forcemerge | |
206 | # forcemerge comes from command line arguments, highest priority |
|
206 | # forcemerge comes from command line arguments, highest priority | |
207 | force = ui.config(b'ui', b'forcemerge') |
|
207 | force = ui.config(b'ui', b'forcemerge') | |
208 | if force: |
|
208 | if force: | |
209 | toolpath = _findtool(ui, force) |
|
209 | toolpath = _findtool(ui, force) | |
210 | if changedelete and not supportscd(toolpath): |
|
210 | if changedelete and not supportscd(toolpath): | |
211 | return b":prompt", None |
|
211 | return b":prompt", None | |
212 | else: |
|
212 | else: | |
213 | if toolpath: |
|
213 | if toolpath: | |
214 | return (force, _quotetoolpath(toolpath)) |
|
214 | return (force, _quotetoolpath(toolpath)) | |
215 | else: |
|
215 | else: | |
216 | # mimic HGMERGE if given tool not found |
|
216 | # mimic HGMERGE if given tool not found | |
217 | return (force, force) |
|
217 | return (force, force) | |
218 |
|
218 | |||
219 | # HGMERGE takes next precedence |
|
219 | # HGMERGE takes next precedence | |
220 | hgmerge = encoding.environ.get(b"HGMERGE") |
|
220 | hgmerge = encoding.environ.get(b"HGMERGE") | |
221 | if hgmerge: |
|
221 | if hgmerge: | |
222 | if changedelete and not supportscd(hgmerge): |
|
222 | if changedelete and not supportscd(hgmerge): | |
223 | return b":prompt", None |
|
223 | return b":prompt", None | |
224 | else: |
|
224 | else: | |
225 | return (hgmerge, hgmerge) |
|
225 | return (hgmerge, hgmerge) | |
226 |
|
226 | |||
227 | # then patterns |
|
227 | # then patterns | |
228 |
|
228 | |||
229 | # whether binary capability should be checked strictly |
|
229 | # whether binary capability should be checked strictly | |
230 | binarycap = binary and strictcheck |
|
230 | binarycap = binary and strictcheck | |
231 |
|
231 | |||
232 | for pat, tool in ui.configitems(b"merge-patterns"): |
|
232 | for pat, tool in ui.configitems(b"merge-patterns"): | |
233 | mf = match.match(repo.root, b'', [pat]) |
|
233 | mf = match.match(repo.root, b'', [pat]) | |
234 | if mf(path) and check(tool, pat, symlink, binarycap, changedelete): |
|
234 | if mf(path) and check(tool, pat, symlink, binarycap, changedelete): | |
235 | if binary and not hascapability(tool, b"binary", strict=True): |
|
235 | if binary and not hascapability(tool, b"binary", strict=True): | |
236 | ui.warn( |
|
236 | ui.warn( | |
237 | _( |
|
237 | _( | |
238 | b"warning: check merge-patterns configurations," |
|
238 | b"warning: check merge-patterns configurations," | |
239 | b" if %r for binary file %r is unintentional\n" |
|
239 | b" if %r for binary file %r is unintentional\n" | |
240 | b"(see 'hg help merge-tools'" |
|
240 | b"(see 'hg help merge-tools'" | |
241 | b" for binary files capability)\n" |
|
241 | b" for binary files capability)\n" | |
242 | ) |
|
242 | ) | |
243 | % (pycompat.bytestr(tool), pycompat.bytestr(path)) |
|
243 | % (pycompat.bytestr(tool), pycompat.bytestr(path)) | |
244 | ) |
|
244 | ) | |
245 | toolpath = _findtool(ui, tool) |
|
245 | toolpath = _findtool(ui, tool) | |
246 | return (tool, _quotetoolpath(toolpath)) |
|
246 | return (tool, _quotetoolpath(toolpath)) | |
247 |
|
247 | |||
248 | # then merge tools |
|
248 | # then merge tools | |
249 | tools = {} |
|
249 | tools = {} | |
250 | disabled = set() |
|
250 | disabled = set() | |
251 | for k, v in ui.configitems(b"merge-tools"): |
|
251 | for k, v in ui.configitems(b"merge-tools"): | |
252 | t = k.split(b'.')[0] |
|
252 | t = k.split(b'.')[0] | |
253 | if t not in tools: |
|
253 | if t not in tools: | |
254 | tools[t] = int(_toolstr(ui, t, b"priority")) |
|
254 | tools[t] = int(_toolstr(ui, t, b"priority")) | |
255 | if _toolbool(ui, t, b"disabled"): |
|
255 | if _toolbool(ui, t, b"disabled"): | |
256 | disabled.add(t) |
|
256 | disabled.add(t) | |
257 | names = tools.keys() |
|
257 | names = tools.keys() | |
258 | tools = sorted( |
|
258 | tools = sorted( | |
259 | [(-p, tool) for tool, p in tools.items() if tool not in disabled] |
|
259 | [(-p, tool) for tool, p in tools.items() if tool not in disabled] | |
260 | ) |
|
260 | ) | |
261 | uimerge = ui.config(b"ui", b"merge") |
|
261 | uimerge = ui.config(b"ui", b"merge") | |
262 | if uimerge: |
|
262 | if uimerge: | |
263 | # external tools defined in uimerge won't be able to handle |
|
263 | # external tools defined in uimerge won't be able to handle | |
264 | # change/delete conflicts |
|
264 | # change/delete conflicts | |
265 | if check(uimerge, path, symlink, binary, changedelete): |
|
265 | if check(uimerge, path, symlink, binary, changedelete): | |
266 | if uimerge not in names and not changedelete: |
|
266 | if uimerge not in names and not changedelete: | |
267 | return (uimerge, uimerge) |
|
267 | return (uimerge, uimerge) | |
268 | tools.insert(0, (None, uimerge)) # highest priority |
|
268 | tools.insert(0, (None, uimerge)) # highest priority | |
269 | tools.append((None, b"hgmerge")) # the old default, if found |
|
269 | tools.append((None, b"hgmerge")) # the old default, if found | |
270 | for p, t in tools: |
|
270 | for p, t in tools: | |
271 | if check(t, None, symlink, binary, changedelete): |
|
271 | if check(t, None, symlink, binary, changedelete): | |
272 | toolpath = _findtool(ui, t) |
|
272 | toolpath = _findtool(ui, t) | |
273 | return (t, _quotetoolpath(toolpath)) |
|
273 | return (t, _quotetoolpath(toolpath)) | |
274 |
|
274 | |||
275 | # internal merge or prompt as last resort |
|
275 | # internal merge or prompt as last resort | |
276 | if symlink or binary or changedelete: |
|
276 | if symlink or binary or changedelete: | |
277 | if not changedelete and len(tools): |
|
277 | if not changedelete and len(tools): | |
278 | # any tool is rejected by capability for symlink or binary |
|
278 | # any tool is rejected by capability for symlink or binary | |
279 | ui.warn(_(b"no tool found to merge %s\n") % path) |
|
279 | ui.warn(_(b"no tool found to merge %s\n") % path) | |
280 | return b":prompt", None |
|
280 | return b":prompt", None | |
281 | return b":merge", None |
|
281 | return b":merge", None | |
282 |
|
282 | |||
283 |
|
283 | |||
284 | def _eoltype(data): |
|
284 | def _eoltype(data): | |
285 | """Guess the EOL type of a file""" |
|
285 | """Guess the EOL type of a file""" | |
286 | if b'\0' in data: # binary |
|
286 | if b'\0' in data: # binary | |
287 | return None |
|
287 | return None | |
288 | if b'\r\n' in data: # Windows |
|
288 | if b'\r\n' in data: # Windows | |
289 | return b'\r\n' |
|
289 | return b'\r\n' | |
290 | if b'\r' in data: # Old Mac |
|
290 | if b'\r' in data: # Old Mac | |
291 | return b'\r' |
|
291 | return b'\r' | |
292 | if b'\n' in data: # UNIX |
|
292 | if b'\n' in data: # UNIX | |
293 | return b'\n' |
|
293 | return b'\n' | |
294 | return None # unknown |
|
294 | return None # unknown | |
295 |
|
295 | |||
296 |
|
296 | |||
297 | def _matcheol(file, back): |
|
297 | def _matcheol(file, back): | |
298 | """Convert EOL markers in a file to match origfile""" |
|
298 | """Convert EOL markers in a file to match origfile""" | |
299 | tostyle = _eoltype(back.data()) # No repo.wread filters? |
|
299 | tostyle = _eoltype(back.data()) # No repo.wread filters? | |
300 | if tostyle: |
|
300 | if tostyle: | |
301 | data = util.readfile(file) |
|
301 | data = util.readfile(file) | |
302 | style = _eoltype(data) |
|
302 | style = _eoltype(data) | |
303 | if style: |
|
303 | if style: | |
304 | newdata = data.replace(style, tostyle) |
|
304 | newdata = data.replace(style, tostyle) | |
305 | if newdata != data: |
|
305 | if newdata != data: | |
306 | util.writefile(file, newdata) |
|
306 | util.writefile(file, newdata) | |
307 |
|
307 | |||
308 |
|
308 | |||
309 | @internaltool(b'prompt', nomerge) |
|
309 | @internaltool(b'prompt', nomerge) | |
310 | def _iprompt(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): |
|
310 | def _iprompt(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): | |
311 | """Asks the user which of the local `p1()` or the other `p2()` version to |
|
311 | """Asks the user which of the local `p1()` or the other `p2()` version to | |
312 | keep as the merged version.""" |
|
312 | keep as the merged version.""" | |
313 | ui = repo.ui |
|
313 | ui = repo.ui | |
314 | fd = fcd.path() |
|
314 | fd = fcd.path() | |
315 | uipathfn = scmutil.getuipathfn(repo) |
|
315 | uipathfn = scmutil.getuipathfn(repo) | |
316 |
|
316 | |||
317 | # Avoid prompting during an in-memory merge since it doesn't support merge |
|
317 | # Avoid prompting during an in-memory merge since it doesn't support merge | |
318 | # conflicts. |
|
318 | # conflicts. | |
319 | if fcd.changectx().isinmemory(): |
|
319 | if fcd.changectx().isinmemory(): | |
320 | raise error.InMemoryMergeConflictsError( |
|
320 | raise error.InMemoryMergeConflictsError( | |
321 | b'in-memory merge does not support file conflicts' |
|
321 | b'in-memory merge does not support file conflicts' | |
322 | ) |
|
322 | ) | |
323 |
|
323 | |||
324 | prompts = partextras(labels) |
|
324 | prompts = partextras(labels) | |
325 | prompts[b'fd'] = uipathfn(fd) |
|
325 | prompts[b'fd'] = uipathfn(fd) | |
326 | try: |
|
326 | try: | |
327 | if fco.isabsent(): |
|
327 | if fco.isabsent(): | |
328 | index = ui.promptchoice(_localchangedotherdeletedmsg % prompts, 2) |
|
328 | index = ui.promptchoice(_localchangedotherdeletedmsg % prompts, 2) | |
329 | choice = [b'local', b'other', b'unresolved'][index] |
|
329 | choice = [b'local', b'other', b'unresolved'][index] | |
330 | elif fcd.isabsent(): |
|
330 | elif fcd.isabsent(): | |
331 | index = ui.promptchoice(_otherchangedlocaldeletedmsg % prompts, 2) |
|
331 | index = ui.promptchoice(_otherchangedlocaldeletedmsg % prompts, 2) | |
332 | choice = [b'other', b'local', b'unresolved'][index] |
|
332 | choice = [b'other', b'local', b'unresolved'][index] | |
333 | else: |
|
333 | else: | |
334 | # IMPORTANT: keep the last line of this prompt ("What do you want to |
|
334 | # IMPORTANT: keep the last line of this prompt ("What do you want to | |
335 | # do?") very short, see comment next to _localchangedotherdeletedmsg |
|
335 | # do?") very short, see comment next to _localchangedotherdeletedmsg | |
336 | # at the top of the file for details. |
|
336 | # at the top of the file for details. | |
337 | index = ui.promptchoice( |
|
337 | index = ui.promptchoice( | |
338 | _( |
|
338 | _( | |
339 | b"file '%(fd)s' needs to be resolved.\n" |
|
339 | b"file '%(fd)s' needs to be resolved.\n" | |
340 | b"You can keep (l)ocal%(l)s, take (o)ther%(o)s, or leave " |
|
340 | b"You can keep (l)ocal%(l)s, take (o)ther%(o)s, or leave " | |
341 | b"(u)nresolved.\n" |
|
341 | b"(u)nresolved.\n" | |
342 | b"What do you want to do?" |
|
342 | b"What do you want to do?" | |
343 | b"$$ &Local $$ &Other $$ &Unresolved" |
|
343 | b"$$ &Local $$ &Other $$ &Unresolved" | |
344 | ) |
|
344 | ) | |
345 | % prompts, |
|
345 | % prompts, | |
346 | 2, |
|
346 | 2, | |
347 | ) |
|
347 | ) | |
348 | choice = [b'local', b'other', b'unresolved'][index] |
|
348 | choice = [b'local', b'other', b'unresolved'][index] | |
349 |
|
349 | |||
350 | if choice == b'other': |
|
350 | if choice == b'other': | |
351 | return _iother(repo, mynode, orig, fcd, fco, fca, toolconf, labels) |
|
351 | return _iother(repo, mynode, orig, fcd, fco, fca, toolconf, labels) | |
352 | elif choice == b'local': |
|
352 | elif choice == b'local': | |
353 | return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf, labels) |
|
353 | return _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf, labels) | |
354 | elif choice == b'unresolved': |
|
354 | elif choice == b'unresolved': | |
355 | return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf, labels) |
|
355 | return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf, labels) | |
356 | except error.ResponseExpected: |
|
356 | except error.ResponseExpected: | |
357 | ui.write(b"\n") |
|
357 | ui.write(b"\n") | |
358 | return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf, labels) |
|
358 | return _ifail(repo, mynode, orig, fcd, fco, fca, toolconf, labels) | |
359 |
|
359 | |||
360 |
|
360 | |||
361 | @internaltool(b'local', nomerge) |
|
361 | @internaltool(b'local', nomerge) | |
362 | def _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): |
|
362 | def _ilocal(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): | |
363 | """Uses the local `p1()` version of files as the merged version.""" |
|
363 | """Uses the local `p1()` version of files as the merged version.""" | |
364 | return 0, fcd.isabsent() |
|
364 | return 0, fcd.isabsent() | |
365 |
|
365 | |||
366 |
|
366 | |||
367 | @internaltool(b'other', nomerge) |
|
367 | @internaltool(b'other', nomerge) | |
368 | def _iother(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): |
|
368 | def _iother(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): | |
369 | """Uses the other `p2()` version of files as the merged version.""" |
|
369 | """Uses the other `p2()` version of files as the merged version.""" | |
370 | if fco.isabsent(): |
|
370 | if fco.isabsent(): | |
371 | # local changed, remote deleted -- 'deleted' picked |
|
371 | # local changed, remote deleted -- 'deleted' picked | |
372 | _underlyingfctxifabsent(fcd).remove() |
|
372 | _underlyingfctxifabsent(fcd).remove() | |
373 | deleted = True |
|
373 | deleted = True | |
374 | else: |
|
374 | else: | |
375 | _underlyingfctxifabsent(fcd).write(fco.data(), fco.flags()) |
|
375 | _underlyingfctxifabsent(fcd).write(fco.data(), fco.flags()) | |
376 | deleted = False |
|
376 | deleted = False | |
377 | return 0, deleted |
|
377 | return 0, deleted | |
378 |
|
378 | |||
379 |
|
379 | |||
380 | @internaltool(b'fail', nomerge) |
|
380 | @internaltool(b'fail', nomerge) | |
381 | def _ifail(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): |
|
381 | def _ifail(repo, mynode, orig, fcd, fco, fca, toolconf, labels=None): | |
382 | """ |
|
382 | """ | |
383 | Rather than attempting to merge files that were modified on both |
|
383 | Rather than attempting to merge files that were modified on both | |
384 | branches, it marks them as unresolved. The resolve command must be |
|
384 | branches, it marks them as unresolved. The resolve command must be | |
385 | used to resolve these conflicts.""" |
|
385 | used to resolve these conflicts.""" | |
386 | # for change/delete conflicts write out the changed version, then fail |
|
386 | # for change/delete conflicts write out the changed version, then fail | |
387 | if fcd.isabsent(): |
|
387 | if fcd.isabsent(): | |
388 | _underlyingfctxifabsent(fcd).write(fco.data(), fco.flags()) |
|
388 | _underlyingfctxifabsent(fcd).write(fco.data(), fco.flags()) | |
389 | return 1, False |
|
389 | return 1, False | |
390 |
|
390 | |||
391 |
|
391 | |||
392 | def _underlyingfctxifabsent(filectx): |
|
392 | def _underlyingfctxifabsent(filectx): | |
393 | """Sometimes when resolving, our fcd is actually an absentfilectx, but |
|
393 | """Sometimes when resolving, our fcd is actually an absentfilectx, but | |
394 | we want to write to it (to do the resolve). This helper returns the |
|
394 | we want to write to it (to do the resolve). This helper returns the | |
395 | underyling workingfilectx in that case. |
|
395 | underyling workingfilectx in that case. | |
396 | """ |
|
396 | """ | |
397 | if filectx.isabsent(): |
|
397 | if filectx.isabsent(): | |
398 | return filectx.changectx()[filectx.path()] |
|
398 | return filectx.changectx()[filectx.path()] | |
399 | else: |
|
399 | else: | |
400 | return filectx |
|
400 | return filectx | |
401 |
|
401 | |||
402 |
|
402 | |||
403 | def _premerge(repo, fcd, fco, fca, toolconf, files, labels=None): |
|
403 | def _premerge(repo, fcd, fco, fca, toolconf, files, labels=None): | |
404 | tool, toolpath, binary, symlink, scriptfn = toolconf |
|
404 | tool, toolpath, binary, symlink, scriptfn = toolconf | |
405 | if symlink or fcd.isabsent() or fco.isabsent(): |
|
405 | if symlink or fcd.isabsent() or fco.isabsent(): | |
406 | return 1 |
|
406 | return 1 | |
407 | unused, unused, unused, back = files |
|
407 | unused, unused, unused, back = files | |
408 |
|
408 | |||
409 | ui = repo.ui |
|
409 | ui = repo.ui | |
410 |
|
410 | |||
411 | validkeep = [b'keep', b'keep-merge3'] |
|
411 | validkeep = [b'keep', b'keep-merge3'] | |
412 |
|
412 | |||
413 | # do we attempt to simplemerge first? |
|
413 | # do we attempt to simplemerge first? | |
414 | try: |
|
414 | try: | |
415 | premerge = _toolbool(ui, tool, b"premerge", not binary) |
|
415 | premerge = _toolbool(ui, tool, b"premerge", not binary) | |
416 | except error.ConfigError: |
|
416 | except error.ConfigError: | |
417 | premerge = _toolstr(ui, tool, b"premerge", b"").lower() |
|
417 | premerge = _toolstr(ui, tool, b"premerge", b"").lower() | |
418 | if premerge not in validkeep: |
|
418 | if premerge not in validkeep: | |
419 | _valid = b', '.join([b"'" + v + b"'" for v in validkeep]) |
|
419 | _valid = b', '.join([b"'" + v + b"'" for v in validkeep]) | |
420 | raise error.ConfigError( |
|
420 | raise error.ConfigError( | |
421 | _(b"%s.premerge not valid ('%s' is neither boolean nor %s)") |
|
421 | _(b"%s.premerge not valid ('%s' is neither boolean nor %s)") | |
422 | % (tool, premerge, _valid) |
|
422 | % (tool, premerge, _valid) | |
423 | ) |
|
423 | ) | |
424 |
|
424 | |||
425 | if premerge: |
|
425 | if premerge: | |
426 | if premerge == b'keep-merge3': |
|
426 | if premerge == b'keep-merge3': | |
427 | if not labels: |
|
427 | if not labels: | |
428 | labels = _defaultconflictlabels |
|
428 | labels = _defaultconflictlabels | |
429 | if len(labels) < 3: |
|
429 | if len(labels) < 3: | |
430 | labels.append(b'base') |
|
430 | labels.append(b'base') | |
431 | r = simplemerge.simplemerge(ui, fcd, fca, fco, quiet=True, label=labels) |
|
431 | r = simplemerge.simplemerge(ui, fcd, fca, fco, quiet=True, label=labels) | |
432 | if not r: |
|
432 | if not r: | |
433 | ui.debug(b" premerge successful\n") |
|
433 | ui.debug(b" premerge successful\n") | |
434 | return 0 |
|
434 | return 0 | |
435 | if premerge not in validkeep: |
|
435 | if premerge not in validkeep: | |
436 | # restore from backup and try again |
|
436 | # restore from backup and try again | |
437 | _restorebackup(fcd, back) |
|
437 | _restorebackup(fcd, back) | |
438 | return 1 # continue merging |
|
438 | return 1 # continue merging | |
439 |
|
439 | |||
440 |
|
440 | |||
441 | def _mergecheck(repo, mynode, orig, fcd, fco, fca, toolconf): |
|
441 | def _mergecheck(repo, mynode, orig, fcd, fco, fca, toolconf): | |
442 | tool, toolpath, binary, symlink, scriptfn = toolconf |
|
442 | tool, toolpath, binary, symlink, scriptfn = toolconf | |
443 | uipathfn = scmutil.getuipathfn(repo) |
|
443 | uipathfn = scmutil.getuipathfn(repo) | |
444 | if symlink: |
|
444 | if symlink: | |
445 | repo.ui.warn( |
|
445 | repo.ui.warn( | |
446 | _(b'warning: internal %s cannot merge symlinks for %s\n') |
|
446 | _(b'warning: internal %s cannot merge symlinks for %s\n') | |
447 | % (tool, uipathfn(fcd.path())) |
|
447 | % (tool, uipathfn(fcd.path())) | |
448 | ) |
|
448 | ) | |
449 | return False |
|
449 | return False | |
450 | if fcd.isabsent() or fco.isabsent(): |
|
450 | if fcd.isabsent() or fco.isabsent(): | |
451 | repo.ui.warn( |
|
451 | repo.ui.warn( | |
452 | _( |
|
452 | _( | |
453 | b'warning: internal %s cannot merge change/delete ' |
|
453 | b'warning: internal %s cannot merge change/delete ' | |
454 | b'conflict for %s\n' |
|
454 | b'conflict for %s\n' | |
455 | ) |
|
455 | ) | |
456 | % (tool, uipathfn(fcd.path())) |
|
456 | % (tool, uipathfn(fcd.path())) | |
457 | ) |
|
457 | ) | |
458 | return False |
|
458 | return False | |
459 | return True |
|
459 | return True | |
460 |
|
460 | |||
461 |
|
461 | |||
462 | def _merge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels, mode): |
|
462 | def _merge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels, mode): | |
463 | """ |
|
463 | """ | |
464 | Uses the internal non-interactive simple merge algorithm for merging |
|
464 | Uses the internal non-interactive simple merge algorithm for merging | |
465 | files. It will fail if there are any conflicts and leave markers in |
|
465 | files. It will fail if there are any conflicts and leave markers in | |
466 | the partially merged file. Markers will have two sections, one for each side |
|
466 | the partially merged file. Markers will have two sections, one for each side | |
467 | of merge, unless mode equals 'union' which suppresses the markers.""" |
|
467 | of merge, unless mode equals 'union' which suppresses the markers.""" | |
468 | ui = repo.ui |
|
468 | ui = repo.ui | |
469 |
|
469 | |||
470 | r = simplemerge.simplemerge(ui, fcd, fca, fco, label=labels, mode=mode) |
|
470 | r = simplemerge.simplemerge(ui, fcd, fca, fco, label=labels, mode=mode) | |
471 | return True, r, False |
|
471 | return True, r, False | |
472 |
|
472 | |||
473 |
|
473 | |||
474 | @internaltool( |
|
474 | @internaltool( | |
475 | b'union', |
|
475 | b'union', | |
476 | fullmerge, |
|
476 | fullmerge, | |
477 | _( |
|
477 | _( | |
478 | b"warning: conflicts while merging %s! " |
|
478 | b"warning: conflicts while merging %s! " | |
479 | b"(edit, then use 'hg resolve --mark')\n" |
|
479 | b"(edit, then use 'hg resolve --mark')\n" | |
480 | ), |
|
480 | ), | |
481 | precheck=_mergecheck, |
|
481 | precheck=_mergecheck, | |
482 | ) |
|
482 | ) | |
483 | def _iunion(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
483 | def _iunion(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
484 | """ |
|
484 | """ | |
485 | Uses the internal non-interactive simple merge algorithm for merging |
|
485 | Uses the internal non-interactive simple merge algorithm for merging | |
486 | files. It will use both left and right sides for conflict regions. |
|
486 | files. It will use both left and right sides for conflict regions. | |
487 | No markers are inserted.""" |
|
487 | No markers are inserted.""" | |
488 | return _merge( |
|
488 | return _merge( | |
489 | repo, mynode, orig, fcd, fco, fca, toolconf, files, labels, b'union' |
|
489 | repo, mynode, orig, fcd, fco, fca, toolconf, files, labels, b'union' | |
490 | ) |
|
490 | ) | |
491 |
|
491 | |||
492 |
|
492 | |||
493 | @internaltool( |
|
493 | @internaltool( | |
494 | b'merge', |
|
494 | b'merge', | |
495 | fullmerge, |
|
495 | fullmerge, | |
496 | _( |
|
496 | _( | |
497 | b"warning: conflicts while merging %s! " |
|
497 | b"warning: conflicts while merging %s! " | |
498 | b"(edit, then use 'hg resolve --mark')\n" |
|
498 | b"(edit, then use 'hg resolve --mark')\n" | |
499 | ), |
|
499 | ), | |
500 | precheck=_mergecheck, |
|
500 | precheck=_mergecheck, | |
501 | ) |
|
501 | ) | |
502 | def _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
502 | def _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
503 | """ |
|
503 | """ | |
504 | Uses the internal non-interactive simple merge algorithm for merging |
|
504 | Uses the internal non-interactive simple merge algorithm for merging | |
505 | files. It will fail if there are any conflicts and leave markers in |
|
505 | files. It will fail if there are any conflicts and leave markers in | |
506 | the partially merged file. Markers will have two sections, one for each side |
|
506 | the partially merged file. Markers will have two sections, one for each side | |
507 | of merge.""" |
|
507 | of merge.""" | |
508 | return _merge( |
|
508 | return _merge( | |
509 | repo, mynode, orig, fcd, fco, fca, toolconf, files, labels, b'merge' |
|
509 | repo, mynode, orig, fcd, fco, fca, toolconf, files, labels, b'merge' | |
510 | ) |
|
510 | ) | |
511 |
|
511 | |||
512 |
|
512 | |||
513 | @internaltool( |
|
513 | @internaltool( | |
514 | b'merge3', |
|
514 | b'merge3', | |
515 | fullmerge, |
|
515 | fullmerge, | |
516 | _( |
|
516 | _( | |
517 | b"warning: conflicts while merging %s! " |
|
517 | b"warning: conflicts while merging %s! " | |
518 | b"(edit, then use 'hg resolve --mark')\n" |
|
518 | b"(edit, then use 'hg resolve --mark')\n" | |
519 | ), |
|
519 | ), | |
520 | precheck=_mergecheck, |
|
520 | precheck=_mergecheck, | |
521 | ) |
|
521 | ) | |
522 | def _imerge3(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
522 | def _imerge3(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
523 | """ |
|
523 | """ | |
524 | Uses the internal non-interactive simple merge algorithm for merging |
|
524 | Uses the internal non-interactive simple merge algorithm for merging | |
525 | files. It will fail if there are any conflicts and leave markers in |
|
525 | files. It will fail if there are any conflicts and leave markers in | |
526 | the partially merged file. Marker will have three sections, one from each |
|
526 | the partially merged file. Marker will have three sections, one from each | |
527 | side of the merge and one for the base content.""" |
|
527 | side of the merge and one for the base content.""" | |
528 | if not labels: |
|
528 | if not labels: | |
529 | labels = _defaultconflictlabels |
|
529 | labels = _defaultconflictlabels | |
530 | if len(labels) < 3: |
|
530 | if len(labels) < 3: | |
531 | labels.append(b'base') |
|
531 | labels.append(b'base') | |
532 | return _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels) |
|
532 | return _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels) | |
533 |
|
533 | |||
534 |
|
534 | |||
535 | def _imergeauto( |
|
535 | def _imergeauto( | |
536 | repo, |
|
536 | repo, | |
537 | mynode, |
|
537 | mynode, | |
538 | orig, |
|
538 | orig, | |
539 | fcd, |
|
539 | fcd, | |
540 | fco, |
|
540 | fco, | |
541 | fca, |
|
541 | fca, | |
542 | toolconf, |
|
542 | toolconf, | |
543 | files, |
|
543 | files, | |
544 | labels=None, |
|
544 | labels=None, | |
545 | localorother=None, |
|
545 | localorother=None, | |
546 | ): |
|
546 | ): | |
547 | """ |
|
547 | """ | |
548 | Generic driver for _imergelocal and _imergeother |
|
548 | Generic driver for _imergelocal and _imergeother | |
549 | """ |
|
549 | """ | |
550 | assert localorother is not None |
|
550 | assert localorother is not None | |
551 | r = simplemerge.simplemerge( |
|
551 | r = simplemerge.simplemerge( | |
552 | repo.ui, fcd, fca, fco, label=labels, localorother=localorother |
|
552 | repo.ui, fcd, fca, fco, label=labels, localorother=localorother | |
553 | ) |
|
553 | ) | |
554 | return True, r |
|
554 | return True, r | |
555 |
|
555 | |||
556 |
|
556 | |||
557 | @internaltool(b'merge-local', mergeonly, precheck=_mergecheck) |
|
557 | @internaltool(b'merge-local', mergeonly, precheck=_mergecheck) | |
558 | def _imergelocal(*args, **kwargs): |
|
558 | def _imergelocal(*args, **kwargs): | |
559 | """ |
|
559 | """ | |
560 | Like :merge, but resolve all conflicts non-interactively in favor |
|
560 | Like :merge, but resolve all conflicts non-interactively in favor | |
561 | of the local `p1()` changes.""" |
|
561 | of the local `p1()` changes.""" | |
562 | success, status = _imergeauto(localorother=b'local', *args, **kwargs) |
|
562 | success, status = _imergeauto(localorother=b'local', *args, **kwargs) | |
563 | return success, status, False |
|
563 | return success, status, False | |
564 |
|
564 | |||
565 |
|
565 | |||
566 | @internaltool(b'merge-other', mergeonly, precheck=_mergecheck) |
|
566 | @internaltool(b'merge-other', mergeonly, precheck=_mergecheck) | |
567 | def _imergeother(*args, **kwargs): |
|
567 | def _imergeother(*args, **kwargs): | |
568 | """ |
|
568 | """ | |
569 | Like :merge, but resolve all conflicts non-interactively in favor |
|
569 | Like :merge, but resolve all conflicts non-interactively in favor | |
570 | of the other `p2()` changes.""" |
|
570 | of the other `p2()` changes.""" | |
571 | success, status = _imergeauto(localorother=b'other', *args, **kwargs) |
|
571 | success, status = _imergeauto(localorother=b'other', *args, **kwargs) | |
572 | return success, status, False |
|
572 | return success, status, False | |
573 |
|
573 | |||
574 |
|
574 | |||
575 | @internaltool( |
|
575 | @internaltool( | |
576 | b'tagmerge', |
|
576 | b'tagmerge', | |
577 | mergeonly, |
|
577 | mergeonly, | |
578 | _( |
|
578 | _( | |
579 | b"automatic tag merging of %s failed! " |
|
579 | b"automatic tag merging of %s failed! " | |
580 | b"(use 'hg resolve --tool :merge' or another merge " |
|
580 | b"(use 'hg resolve --tool :merge' or another merge " | |
581 | b"tool of your choice)\n" |
|
581 | b"tool of your choice)\n" | |
582 | ), |
|
582 | ), | |
583 | ) |
|
583 | ) | |
584 | def _itagmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
584 | def _itagmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
585 | """ |
|
585 | """ | |
586 | Uses the internal tag merge algorithm (experimental). |
|
586 | Uses the internal tag merge algorithm (experimental). | |
587 | """ |
|
587 | """ | |
588 | success, status = tagmerge.merge(repo, fcd, fco, fca) |
|
588 | success, status = tagmerge.merge(repo, fcd, fco, fca) | |
589 | return success, status, False |
|
589 | return success, status, False | |
590 |
|
590 | |||
591 |
|
591 | |||
592 | @internaltool(b'dump', fullmerge, binary=True, symlink=True) |
|
592 | @internaltool(b'dump', fullmerge, binary=True, symlink=True) | |
593 | def _idump(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
593 | def _idump(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
594 | """ |
|
594 | """ | |
595 | Creates three versions of the files to merge, containing the |
|
595 | Creates three versions of the files to merge, containing the | |
596 | contents of local, other and base. These files can then be used to |
|
596 | contents of local, other and base. These files can then be used to | |
597 | perform a merge manually. If the file to be merged is named |
|
597 | perform a merge manually. If the file to be merged is named | |
598 | ``a.txt``, these files will accordingly be named ``a.txt.local``, |
|
598 | ``a.txt``, these files will accordingly be named ``a.txt.local``, | |
599 | ``a.txt.other`` and ``a.txt.base`` and they will be placed in the |
|
599 | ``a.txt.other`` and ``a.txt.base`` and they will be placed in the | |
600 | same directory as ``a.txt``. |
|
600 | same directory as ``a.txt``. | |
601 |
|
601 | |||
602 | This implies premerge. Therefore, files aren't dumped, if premerge |
|
602 | This implies premerge. Therefore, files aren't dumped, if premerge | |
603 | runs successfully. Use :forcedump to forcibly write files out. |
|
603 | runs successfully. Use :forcedump to forcibly write files out. | |
604 | """ |
|
604 | """ | |
605 | a = _workingpath(repo, fcd) |
|
605 | a = _workingpath(repo, fcd) | |
606 | fd = fcd.path() |
|
606 | fd = fcd.path() | |
607 |
|
607 | |||
608 | from . import context |
|
608 | from . import context | |
609 |
|
609 | |||
610 | if isinstance(fcd, context.overlayworkingfilectx): |
|
610 | if isinstance(fcd, context.overlayworkingfilectx): | |
611 | raise error.InMemoryMergeConflictsError( |
|
611 | raise error.InMemoryMergeConflictsError( | |
612 | b'in-memory merge does not support the :dump tool.' |
|
612 | b'in-memory merge does not support the :dump tool.' | |
613 | ) |
|
613 | ) | |
614 |
|
614 | |||
615 | util.writefile(a + b".local", fcd.decodeddata()) |
|
615 | util.writefile(a + b".local", fcd.decodeddata()) | |
616 | repo.wwrite(fd + b".other", fco.data(), fco.flags()) |
|
616 | repo.wwrite(fd + b".other", fco.data(), fco.flags()) | |
617 | repo.wwrite(fd + b".base", fca.data(), fca.flags()) |
|
617 | repo.wwrite(fd + b".base", fca.data(), fca.flags()) | |
618 | return False, 1, False |
|
618 | return False, 1, False | |
619 |
|
619 | |||
620 |
|
620 | |||
621 | @internaltool(b'forcedump', mergeonly, binary=True, symlink=True) |
|
621 | @internaltool(b'forcedump', mergeonly, binary=True, symlink=True) | |
622 | def _forcedump(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
622 | def _forcedump(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
623 | """ |
|
623 | """ | |
624 | Creates three versions of the files as same as :dump, but omits premerge. |
|
624 | Creates three versions of the files as same as :dump, but omits premerge. | |
625 | """ |
|
625 | """ | |
626 | return _idump( |
|
626 | return _idump( | |
627 | repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=labels |
|
627 | repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=labels | |
628 | ) |
|
628 | ) | |
629 |
|
629 | |||
630 |
|
630 | |||
631 | def _xmergeimm(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): |
|
631 | def _xmergeimm(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None): | |
632 | # In-memory merge simply raises an exception on all external merge tools, |
|
632 | # In-memory merge simply raises an exception on all external merge tools, | |
633 | # for now. |
|
633 | # for now. | |
634 | # |
|
634 | # | |
635 | # It would be possible to run most tools with temporary files, but this |
|
635 | # It would be possible to run most tools with temporary files, but this | |
636 | # raises the question of what to do if the user only partially resolves the |
|
636 | # raises the question of what to do if the user only partially resolves the | |
637 | # file -- we can't leave a merge state. (Copy to somewhere in the .hg/ |
|
637 | # file -- we can't leave a merge state. (Copy to somewhere in the .hg/ | |
638 | # directory and tell the user how to get it is my best idea, but it's |
|
638 | # directory and tell the user how to get it is my best idea, but it's | |
639 | # clunky.) |
|
639 | # clunky.) | |
640 | raise error.InMemoryMergeConflictsError( |
|
640 | raise error.InMemoryMergeConflictsError( | |
641 | b'in-memory merge does not support external merge tools' |
|
641 | b'in-memory merge does not support external merge tools' | |
642 | ) |
|
642 | ) | |
643 |
|
643 | |||
644 |
|
644 | |||
645 | def _describemerge(ui, repo, mynode, fcl, fcb, fco, env, toolpath, args): |
|
645 | def _describemerge(ui, repo, mynode, fcl, fcb, fco, env, toolpath, args): | |
646 | tmpl = ui.config(b'ui', b'pre-merge-tool-output-template') |
|
646 | tmpl = ui.config(b'ui', b'pre-merge-tool-output-template') | |
647 | if not tmpl: |
|
647 | if not tmpl: | |
648 | return |
|
648 | return | |
649 |
|
649 | |||
650 | mappingdict = templateutil.mappingdict |
|
650 | mappingdict = templateutil.mappingdict | |
651 | props = { |
|
651 | props = { | |
652 | b'ctx': fcl.changectx(), |
|
652 | b'ctx': fcl.changectx(), | |
653 | b'node': hex(mynode), |
|
653 | b'node': hex(mynode), | |
654 | b'path': fcl.path(), |
|
654 | b'path': fcl.path(), | |
655 | b'local': mappingdict( |
|
655 | b'local': mappingdict( | |
656 | { |
|
656 | { | |
657 | b'ctx': fcl.changectx(), |
|
657 | b'ctx': fcl.changectx(), | |
658 | b'fctx': fcl, |
|
658 | b'fctx': fcl, | |
659 | b'node': hex(mynode), |
|
659 | b'node': hex(mynode), | |
660 | b'name': _(b'local'), |
|
660 | b'name': _(b'local'), | |
661 | b'islink': b'l' in fcl.flags(), |
|
661 | b'islink': b'l' in fcl.flags(), | |
662 | b'label': env[b'HG_MY_LABEL'], |
|
662 | b'label': env[b'HG_MY_LABEL'], | |
663 | } |
|
663 | } | |
664 | ), |
|
664 | ), | |
665 | b'base': mappingdict( |
|
665 | b'base': mappingdict( | |
666 | { |
|
666 | { | |
667 | b'ctx': fcb.changectx(), |
|
667 | b'ctx': fcb.changectx(), | |
668 | b'fctx': fcb, |
|
668 | b'fctx': fcb, | |
669 | b'name': _(b'base'), |
|
669 | b'name': _(b'base'), | |
670 | b'islink': b'l' in fcb.flags(), |
|
670 | b'islink': b'l' in fcb.flags(), | |
671 | b'label': env[b'HG_BASE_LABEL'], |
|
671 | b'label': env[b'HG_BASE_LABEL'], | |
672 | } |
|
672 | } | |
673 | ), |
|
673 | ), | |
674 | b'other': mappingdict( |
|
674 | b'other': mappingdict( | |
675 | { |
|
675 | { | |
676 | b'ctx': fco.changectx(), |
|
676 | b'ctx': fco.changectx(), | |
677 | b'fctx': fco, |
|
677 | b'fctx': fco, | |
678 | b'name': _(b'other'), |
|
678 | b'name': _(b'other'), | |
679 | b'islink': b'l' in fco.flags(), |
|
679 | b'islink': b'l' in fco.flags(), | |
680 | b'label': env[b'HG_OTHER_LABEL'], |
|
680 | b'label': env[b'HG_OTHER_LABEL'], | |
681 | } |
|
681 | } | |
682 | ), |
|
682 | ), | |
683 | b'toolpath': toolpath, |
|
683 | b'toolpath': toolpath, | |
684 | b'toolargs': args, |
|
684 | b'toolargs': args, | |
685 | } |
|
685 | } | |
686 |
|
686 | |||
687 | # TODO: make all of this something that can be specified on a per-tool basis |
|
687 | # TODO: make all of this something that can be specified on a per-tool basis | |
688 | tmpl = templater.unquotestring(tmpl) |
|
688 | tmpl = templater.unquotestring(tmpl) | |
689 |
|
689 | |||
690 | # Not using cmdutil.rendertemplate here since it causes errors importing |
|
690 | # Not using cmdutil.rendertemplate here since it causes errors importing | |
691 | # things for us to import cmdutil. |
|
691 | # things for us to import cmdutil. | |
692 | tres = formatter.templateresources(ui, repo) |
|
692 | tres = formatter.templateresources(ui, repo) | |
693 | t = formatter.maketemplater( |
|
693 | t = formatter.maketemplater( | |
694 | ui, tmpl, defaults=templatekw.keywords, resources=tres |
|
694 | ui, tmpl, defaults=templatekw.keywords, resources=tres | |
695 | ) |
|
695 | ) | |
696 | ui.status(t.renderdefault(props)) |
|
696 | ui.status(t.renderdefault(props)) | |
697 |
|
697 | |||
698 |
|
698 | |||
699 | def _xmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels): |
|
699 | def _xmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels): | |
700 | tool, toolpath, binary, symlink, scriptfn = toolconf |
|
700 | tool, toolpath, binary, symlink, scriptfn = toolconf | |
701 | uipathfn = scmutil.getuipathfn(repo) |
|
701 | uipathfn = scmutil.getuipathfn(repo) | |
702 | if fcd.isabsent() or fco.isabsent(): |
|
702 | if fcd.isabsent() or fco.isabsent(): | |
703 | repo.ui.warn( |
|
703 | repo.ui.warn( | |
704 | _(b'warning: %s cannot merge change/delete conflict for %s\n') |
|
704 | _(b'warning: %s cannot merge change/delete conflict for %s\n') | |
705 | % (tool, uipathfn(fcd.path())) |
|
705 | % (tool, uipathfn(fcd.path())) | |
706 | ) |
|
706 | ) | |
707 | return False, 1, None |
|
707 | return False, 1, None | |
708 | unused, unused, unused, back = files |
|
708 | unused, unused, unused, back = files | |
709 | localpath = _workingpath(repo, fcd) |
|
709 | localpath = _workingpath(repo, fcd) | |
710 | args = _toolstr(repo.ui, tool, b"args") |
|
710 | args = _toolstr(repo.ui, tool, b"args") | |
711 |
|
711 | |||
712 | with _maketempfiles( |
|
712 | with _maketempfiles( | |
713 | repo, fco, fca, repo.wvfs.join(back.path()), b"$output" in args |
|
713 | repo, fco, fca, repo.wvfs.join(back.path()), b"$output" in args | |
714 | ) as temppaths: |
|
714 | ) as temppaths: | |
715 | basepath, otherpath, localoutputpath = temppaths |
|
715 | basepath, otherpath, localoutputpath = temppaths | |
716 | outpath = b"" |
|
716 | outpath = b"" | |
717 | mylabel, otherlabel = labels[:2] |
|
717 | mylabel, otherlabel = labels[:2] | |
718 | if len(labels) >= 3: |
|
718 | if len(labels) >= 3: | |
719 | baselabel = labels[2] |
|
719 | baselabel = labels[2] | |
720 | else: |
|
720 | else: | |
721 | baselabel = b'base' |
|
721 | baselabel = b'base' | |
722 | env = { |
|
722 | env = { | |
723 | b'HG_FILE': fcd.path(), |
|
723 | b'HG_FILE': fcd.path(), | |
724 | b'HG_MY_NODE': short(mynode), |
|
724 | b'HG_MY_NODE': short(mynode), | |
725 | b'HG_OTHER_NODE': short(fco.changectx().node()), |
|
725 | b'HG_OTHER_NODE': short(fco.changectx().node()), | |
726 | b'HG_BASE_NODE': short(fca.changectx().node()), |
|
726 | b'HG_BASE_NODE': short(fca.changectx().node()), | |
727 | b'HG_MY_ISLINK': b'l' in fcd.flags(), |
|
727 | b'HG_MY_ISLINK': b'l' in fcd.flags(), | |
728 | b'HG_OTHER_ISLINK': b'l' in fco.flags(), |
|
728 | b'HG_OTHER_ISLINK': b'l' in fco.flags(), | |
729 | b'HG_BASE_ISLINK': b'l' in fca.flags(), |
|
729 | b'HG_BASE_ISLINK': b'l' in fca.flags(), | |
730 | b'HG_MY_LABEL': mylabel, |
|
730 | b'HG_MY_LABEL': mylabel, | |
731 | b'HG_OTHER_LABEL': otherlabel, |
|
731 | b'HG_OTHER_LABEL': otherlabel, | |
732 | b'HG_BASE_LABEL': baselabel, |
|
732 | b'HG_BASE_LABEL': baselabel, | |
733 | } |
|
733 | } | |
734 | ui = repo.ui |
|
734 | ui = repo.ui | |
735 |
|
735 | |||
736 | if b"$output" in args: |
|
736 | if b"$output" in args: | |
737 | # read input from backup, write to original |
|
737 | # read input from backup, write to original | |
738 | outpath = localpath |
|
738 | outpath = localpath | |
739 | localpath = localoutputpath |
|
739 | localpath = localoutputpath | |
740 | replace = { |
|
740 | replace = { | |
741 | b'local': localpath, |
|
741 | b'local': localpath, | |
742 | b'base': basepath, |
|
742 | b'base': basepath, | |
743 | b'other': otherpath, |
|
743 | b'other': otherpath, | |
744 | b'output': outpath, |
|
744 | b'output': outpath, | |
745 | b'labellocal': mylabel, |
|
745 | b'labellocal': mylabel, | |
746 | b'labelother': otherlabel, |
|
746 | b'labelother': otherlabel, | |
747 | b'labelbase': baselabel, |
|
747 | b'labelbase': baselabel, | |
748 | } |
|
748 | } | |
749 | args = util.interpolate( |
|
749 | args = util.interpolate( | |
750 | br'\$', |
|
750 | br'\$', | |
751 | replace, |
|
751 | replace, | |
752 | args, |
|
752 | args, | |
753 | lambda s: procutil.shellquote(util.localpath(s)), |
|
753 | lambda s: procutil.shellquote(util.localpath(s)), | |
754 | ) |
|
754 | ) | |
755 | if _toolbool(ui, tool, b"gui"): |
|
755 | if _toolbool(ui, tool, b"gui"): | |
756 | repo.ui.status( |
|
756 | repo.ui.status( | |
757 | _(b'running merge tool %s for file %s\n') |
|
757 | _(b'running merge tool %s for file %s\n') | |
758 | % (tool, uipathfn(fcd.path())) |
|
758 | % (tool, uipathfn(fcd.path())) | |
759 | ) |
|
759 | ) | |
760 | if scriptfn is None: |
|
760 | if scriptfn is None: | |
761 | cmd = toolpath + b' ' + args |
|
761 | cmd = toolpath + b' ' + args | |
762 | repo.ui.debug(b'launching merge tool: %s\n' % cmd) |
|
762 | repo.ui.debug(b'launching merge tool: %s\n' % cmd) | |
763 | _describemerge(ui, repo, mynode, fcd, fca, fco, env, toolpath, args) |
|
763 | _describemerge(ui, repo, mynode, fcd, fca, fco, env, toolpath, args) | |
764 | r = ui.system( |
|
764 | r = ui.system( | |
765 | cmd, cwd=repo.root, environ=env, blockedtag=b'mergetool' |
|
765 | cmd, cwd=repo.root, environ=env, blockedtag=b'mergetool' | |
766 | ) |
|
766 | ) | |
767 | else: |
|
767 | else: | |
768 | repo.ui.debug( |
|
768 | repo.ui.debug( | |
769 | b'launching python merge script: %s:%s\n' % (toolpath, scriptfn) |
|
769 | b'launching python merge script: %s:%s\n' % (toolpath, scriptfn) | |
770 | ) |
|
770 | ) | |
771 | r = 0 |
|
771 | r = 0 | |
772 | try: |
|
772 | try: | |
773 | # avoid cycle cmdutil->merge->filemerge->extensions->cmdutil |
|
773 | # avoid cycle cmdutil->merge->filemerge->extensions->cmdutil | |
774 | from . import extensions |
|
774 | from . import extensions | |
775 |
|
775 | |||
776 | mod = extensions.loadpath(toolpath, b'hgmerge.%s' % tool) |
|
776 | mod = extensions.loadpath(toolpath, b'hgmerge.%s' % tool) | |
777 | except Exception: |
|
777 | except Exception: | |
778 | raise error.Abort( |
|
778 | raise error.Abort( | |
779 | _(b"loading python merge script failed: %s") % toolpath |
|
779 | _(b"loading python merge script failed: %s") % toolpath | |
780 | ) |
|
780 | ) | |
781 | mergefn = getattr(mod, scriptfn, None) |
|
781 | mergefn = getattr(mod, scriptfn, None) | |
782 | if mergefn is None: |
|
782 | if mergefn is None: | |
783 | raise error.Abort( |
|
783 | raise error.Abort( | |
784 | _(b"%s does not have function: %s") % (toolpath, scriptfn) |
|
784 | _(b"%s does not have function: %s") % (toolpath, scriptfn) | |
785 | ) |
|
785 | ) | |
786 | argslist = procutil.shellsplit(args) |
|
786 | argslist = procutil.shellsplit(args) | |
787 | # avoid cycle cmdutil->merge->filemerge->hook->extensions->cmdutil |
|
787 | # avoid cycle cmdutil->merge->filemerge->hook->extensions->cmdutil | |
788 | from . import hook |
|
788 | from . import hook | |
789 |
|
789 | |||
790 | ret, raised = hook.pythonhook( |
|
790 | ret, raised = hook.pythonhook( | |
791 | ui, repo, b"merge", toolpath, mergefn, {b'args': argslist}, True |
|
791 | ui, repo, b"merge", toolpath, mergefn, {b'args': argslist}, True | |
792 | ) |
|
792 | ) | |
793 | if raised: |
|
793 | if raised: | |
794 | r = 1 |
|
794 | r = 1 | |
795 | repo.ui.debug(b'merge tool returned: %d\n' % r) |
|
795 | repo.ui.debug(b'merge tool returned: %d\n' % r) | |
796 | return True, r, False |
|
796 | return True, r, False | |
797 |
|
797 | |||
798 |
|
798 | |||
799 | def _formatconflictmarker(ctx, template, label, pad): |
|
799 | def _formatconflictmarker(ctx, template, label, pad): | |
800 | """Applies the given template to the ctx, prefixed by the label. |
|
800 | """Applies the given template to the ctx, prefixed by the label. | |
801 |
|
801 | |||
802 | Pad is the minimum width of the label prefix, so that multiple markers |
|
802 | Pad is the minimum width of the label prefix, so that multiple markers | |
803 | can have aligned templated parts. |
|
803 | can have aligned templated parts. | |
804 | """ |
|
804 | """ | |
805 | if ctx.node() is None: |
|
805 | if ctx.node() is None: | |
806 | ctx = ctx.p1() |
|
806 | ctx = ctx.p1() | |
807 |
|
807 | |||
808 | props = {b'ctx': ctx} |
|
808 | props = {b'ctx': ctx} | |
809 | templateresult = template.renderdefault(props) |
|
809 | templateresult = template.renderdefault(props) | |
810 |
|
810 | |||
811 | label = (b'%s:' % label).ljust(pad + 1) |
|
811 | label = (b'%s:' % label).ljust(pad + 1) | |
812 | mark = b'%s %s' % (label, templateresult) |
|
812 | mark = b'%s %s' % (label, templateresult) | |
813 |
|
813 | |||
814 | if mark: |
|
814 | if mark: | |
815 | mark = mark.splitlines()[0] # split for safety |
|
815 | mark = mark.splitlines()[0] # split for safety | |
816 |
|
816 | |||
817 | # 8 for the prefix of conflict marker lines (e.g. '<<<<<<< ') |
|
817 | # 8 for the prefix of conflict marker lines (e.g. '<<<<<<< ') | |
818 | return stringutil.ellipsis(mark, 80 - 8) |
|
818 | return stringutil.ellipsis(mark, 80 - 8) | |
819 |
|
819 | |||
820 |
|
820 | |||
821 | _defaultconflictlabels = [b'local', b'other'] |
|
821 | _defaultconflictlabels = [b'local', b'other'] | |
822 |
|
822 | |||
823 |
|
823 | |||
824 | def _formatlabels(repo, fcd, fco, fca, labels, tool=None): |
|
824 | def _formatlabels(repo, fcd, fco, fca, labels, tool=None): | |
825 | """Formats the given labels using the conflict marker template. |
|
825 | """Formats the given labels using the conflict marker template. | |
826 |
|
826 | |||
827 | Returns a list of formatted labels. |
|
827 | Returns a list of formatted labels. | |
828 | """ |
|
828 | """ | |
829 | cd = fcd.changectx() |
|
829 | cd = fcd.changectx() | |
830 | co = fco.changectx() |
|
830 | co = fco.changectx() | |
831 | ca = fca.changectx() |
|
831 | ca = fca.changectx() | |
832 |
|
832 | |||
833 | ui = repo.ui |
|
833 | ui = repo.ui | |
834 |
template = ui.config(b' |
|
834 | template = ui.config(b'command-templates', b'mergemarker') | |
835 | if tool is not None: |
|
835 | if tool is not None: | |
836 | template = _toolstr(ui, tool, b'mergemarkertemplate', template) |
|
836 | template = _toolstr(ui, tool, b'mergemarkertemplate', template) | |
837 | template = templater.unquotestring(template) |
|
837 | template = templater.unquotestring(template) | |
838 | tres = formatter.templateresources(ui, repo) |
|
838 | tres = formatter.templateresources(ui, repo) | |
839 | tmpl = formatter.maketemplater( |
|
839 | tmpl = formatter.maketemplater( | |
840 | ui, template, defaults=templatekw.keywords, resources=tres |
|
840 | ui, template, defaults=templatekw.keywords, resources=tres | |
841 | ) |
|
841 | ) | |
842 |
|
842 | |||
843 | pad = max(len(l) for l in labels) |
|
843 | pad = max(len(l) for l in labels) | |
844 |
|
844 | |||
845 | newlabels = [ |
|
845 | newlabels = [ | |
846 | _formatconflictmarker(cd, tmpl, labels[0], pad), |
|
846 | _formatconflictmarker(cd, tmpl, labels[0], pad), | |
847 | _formatconflictmarker(co, tmpl, labels[1], pad), |
|
847 | _formatconflictmarker(co, tmpl, labels[1], pad), | |
848 | ] |
|
848 | ] | |
849 | if len(labels) > 2: |
|
849 | if len(labels) > 2: | |
850 | newlabels.append(_formatconflictmarker(ca, tmpl, labels[2], pad)) |
|
850 | newlabels.append(_formatconflictmarker(ca, tmpl, labels[2], pad)) | |
851 | return newlabels |
|
851 | return newlabels | |
852 |
|
852 | |||
853 |
|
853 | |||
854 | def partextras(labels): |
|
854 | def partextras(labels): | |
855 | """Return a dictionary of extra labels for use in prompts to the user |
|
855 | """Return a dictionary of extra labels for use in prompts to the user | |
856 |
|
856 | |||
857 | Intended use is in strings of the form "(l)ocal%(l)s". |
|
857 | Intended use is in strings of the form "(l)ocal%(l)s". | |
858 | """ |
|
858 | """ | |
859 | if labels is None: |
|
859 | if labels is None: | |
860 | return { |
|
860 | return { | |
861 | b"l": b"", |
|
861 | b"l": b"", | |
862 | b"o": b"", |
|
862 | b"o": b"", | |
863 | } |
|
863 | } | |
864 |
|
864 | |||
865 | return { |
|
865 | return { | |
866 | b"l": b" [%s]" % labels[0], |
|
866 | b"l": b" [%s]" % labels[0], | |
867 | b"o": b" [%s]" % labels[1], |
|
867 | b"o": b" [%s]" % labels[1], | |
868 | } |
|
868 | } | |
869 |
|
869 | |||
870 |
|
870 | |||
871 | def _restorebackup(fcd, back): |
|
871 | def _restorebackup(fcd, back): | |
872 | # TODO: Add a workingfilectx.write(otherfilectx) path so we can use |
|
872 | # TODO: Add a workingfilectx.write(otherfilectx) path so we can use | |
873 | # util.copy here instead. |
|
873 | # util.copy here instead. | |
874 | fcd.write(back.data(), fcd.flags()) |
|
874 | fcd.write(back.data(), fcd.flags()) | |
875 |
|
875 | |||
876 |
|
876 | |||
877 | def _makebackup(repo, ui, wctx, fcd, premerge): |
|
877 | def _makebackup(repo, ui, wctx, fcd, premerge): | |
878 | """Makes and returns a filectx-like object for ``fcd``'s backup file. |
|
878 | """Makes and returns a filectx-like object for ``fcd``'s backup file. | |
879 |
|
879 | |||
880 | In addition to preserving the user's pre-existing modifications to `fcd` |
|
880 | In addition to preserving the user's pre-existing modifications to `fcd` | |
881 | (if any), the backup is used to undo certain premerges, confirm whether a |
|
881 | (if any), the backup is used to undo certain premerges, confirm whether a | |
882 | merge changed anything, and determine what line endings the new file should |
|
882 | merge changed anything, and determine what line endings the new file should | |
883 | have. |
|
883 | have. | |
884 |
|
884 | |||
885 | Backups only need to be written once (right before the premerge) since their |
|
885 | Backups only need to be written once (right before the premerge) since their | |
886 | content doesn't change afterwards. |
|
886 | content doesn't change afterwards. | |
887 | """ |
|
887 | """ | |
888 | if fcd.isabsent(): |
|
888 | if fcd.isabsent(): | |
889 | return None |
|
889 | return None | |
890 | # TODO: Break this import cycle somehow. (filectx -> ctx -> fileset -> |
|
890 | # TODO: Break this import cycle somehow. (filectx -> ctx -> fileset -> | |
891 | # merge -> filemerge). (I suspect the fileset import is the weakest link) |
|
891 | # merge -> filemerge). (I suspect the fileset import is the weakest link) | |
892 | from . import context |
|
892 | from . import context | |
893 |
|
893 | |||
894 | back = scmutil.backuppath(ui, repo, fcd.path()) |
|
894 | back = scmutil.backuppath(ui, repo, fcd.path()) | |
895 | inworkingdir = back.startswith(repo.wvfs.base) and not back.startswith( |
|
895 | inworkingdir = back.startswith(repo.wvfs.base) and not back.startswith( | |
896 | repo.vfs.base |
|
896 | repo.vfs.base | |
897 | ) |
|
897 | ) | |
898 | if isinstance(fcd, context.overlayworkingfilectx) and inworkingdir: |
|
898 | if isinstance(fcd, context.overlayworkingfilectx) and inworkingdir: | |
899 | # If the backup file is to be in the working directory, and we're |
|
899 | # If the backup file is to be in the working directory, and we're | |
900 | # merging in-memory, we must redirect the backup to the memory context |
|
900 | # merging in-memory, we must redirect the backup to the memory context | |
901 | # so we don't disturb the working directory. |
|
901 | # so we don't disturb the working directory. | |
902 | relpath = back[len(repo.wvfs.base) + 1 :] |
|
902 | relpath = back[len(repo.wvfs.base) + 1 :] | |
903 | if premerge: |
|
903 | if premerge: | |
904 | wctx[relpath].write(fcd.data(), fcd.flags()) |
|
904 | wctx[relpath].write(fcd.data(), fcd.flags()) | |
905 | return wctx[relpath] |
|
905 | return wctx[relpath] | |
906 | else: |
|
906 | else: | |
907 | if premerge: |
|
907 | if premerge: | |
908 | # Otherwise, write to wherever path the user specified the backups |
|
908 | # Otherwise, write to wherever path the user specified the backups | |
909 | # should go. We still need to switch based on whether the source is |
|
909 | # should go. We still need to switch based on whether the source is | |
910 | # in-memory so we can use the fast path of ``util.copy`` if both are |
|
910 | # in-memory so we can use the fast path of ``util.copy`` if both are | |
911 | # on disk. |
|
911 | # on disk. | |
912 | if isinstance(fcd, context.overlayworkingfilectx): |
|
912 | if isinstance(fcd, context.overlayworkingfilectx): | |
913 | util.writefile(back, fcd.data()) |
|
913 | util.writefile(back, fcd.data()) | |
914 | else: |
|
914 | else: | |
915 | a = _workingpath(repo, fcd) |
|
915 | a = _workingpath(repo, fcd) | |
916 | util.copyfile(a, back) |
|
916 | util.copyfile(a, back) | |
917 | # A arbitraryfilectx is returned, so we can run the same functions on |
|
917 | # A arbitraryfilectx is returned, so we can run the same functions on | |
918 | # the backup context regardless of where it lives. |
|
918 | # the backup context regardless of where it lives. | |
919 | return context.arbitraryfilectx(back, repo=repo) |
|
919 | return context.arbitraryfilectx(back, repo=repo) | |
920 |
|
920 | |||
921 |
|
921 | |||
922 | @contextlib.contextmanager |
|
922 | @contextlib.contextmanager | |
923 | def _maketempfiles(repo, fco, fca, localpath, uselocalpath): |
|
923 | def _maketempfiles(repo, fco, fca, localpath, uselocalpath): | |
924 | """Writes out `fco` and `fca` as temporary files, and (if uselocalpath) |
|
924 | """Writes out `fco` and `fca` as temporary files, and (if uselocalpath) | |
925 | copies `localpath` to another temporary file, so an external merge tool may |
|
925 | copies `localpath` to another temporary file, so an external merge tool may | |
926 | use them. |
|
926 | use them. | |
927 | """ |
|
927 | """ | |
928 | tmproot = None |
|
928 | tmproot = None | |
929 | tmprootprefix = repo.ui.config(b'experimental', b'mergetempdirprefix') |
|
929 | tmprootprefix = repo.ui.config(b'experimental', b'mergetempdirprefix') | |
930 | if tmprootprefix: |
|
930 | if tmprootprefix: | |
931 | tmproot = pycompat.mkdtemp(prefix=tmprootprefix) |
|
931 | tmproot = pycompat.mkdtemp(prefix=tmprootprefix) | |
932 |
|
932 | |||
933 | def maketempfrompath(prefix, path): |
|
933 | def maketempfrompath(prefix, path): | |
934 | fullbase, ext = os.path.splitext(path) |
|
934 | fullbase, ext = os.path.splitext(path) | |
935 | pre = b"%s~%s" % (os.path.basename(fullbase), prefix) |
|
935 | pre = b"%s~%s" % (os.path.basename(fullbase), prefix) | |
936 | if tmproot: |
|
936 | if tmproot: | |
937 | name = os.path.join(tmproot, pre) |
|
937 | name = os.path.join(tmproot, pre) | |
938 | if ext: |
|
938 | if ext: | |
939 | name += ext |
|
939 | name += ext | |
940 | f = open(name, "wb") |
|
940 | f = open(name, "wb") | |
941 | else: |
|
941 | else: | |
942 | fd, name = pycompat.mkstemp(prefix=pre + b'.', suffix=ext) |
|
942 | fd, name = pycompat.mkstemp(prefix=pre + b'.', suffix=ext) | |
943 | f = os.fdopen(fd, "wb") |
|
943 | f = os.fdopen(fd, "wb") | |
944 | return f, name |
|
944 | return f, name | |
945 |
|
945 | |||
946 | def tempfromcontext(prefix, ctx): |
|
946 | def tempfromcontext(prefix, ctx): | |
947 | f, name = maketempfrompath(prefix, ctx.path()) |
|
947 | f, name = maketempfrompath(prefix, ctx.path()) | |
948 | data = repo.wwritedata(ctx.path(), ctx.data()) |
|
948 | data = repo.wwritedata(ctx.path(), ctx.data()) | |
949 | f.write(data) |
|
949 | f.write(data) | |
950 | f.close() |
|
950 | f.close() | |
951 | return name |
|
951 | return name | |
952 |
|
952 | |||
953 | b = tempfromcontext(b"base", fca) |
|
953 | b = tempfromcontext(b"base", fca) | |
954 | c = tempfromcontext(b"other", fco) |
|
954 | c = tempfromcontext(b"other", fco) | |
955 | d = localpath |
|
955 | d = localpath | |
956 | if uselocalpath: |
|
956 | if uselocalpath: | |
957 | # We start off with this being the backup filename, so remove the .orig |
|
957 | # We start off with this being the backup filename, so remove the .orig | |
958 | # to make syntax-highlighting more likely. |
|
958 | # to make syntax-highlighting more likely. | |
959 | if d.endswith(b'.orig'): |
|
959 | if d.endswith(b'.orig'): | |
960 | d, _ = os.path.splitext(d) |
|
960 | d, _ = os.path.splitext(d) | |
961 | f, d = maketempfrompath(b"local", d) |
|
961 | f, d = maketempfrompath(b"local", d) | |
962 | with open(localpath, b'rb') as src: |
|
962 | with open(localpath, b'rb') as src: | |
963 | f.write(src.read()) |
|
963 | f.write(src.read()) | |
964 | f.close() |
|
964 | f.close() | |
965 |
|
965 | |||
966 | try: |
|
966 | try: | |
967 | yield b, c, d |
|
967 | yield b, c, d | |
968 | finally: |
|
968 | finally: | |
969 | if tmproot: |
|
969 | if tmproot: | |
970 | shutil.rmtree(tmproot) |
|
970 | shutil.rmtree(tmproot) | |
971 | else: |
|
971 | else: | |
972 | util.unlink(b) |
|
972 | util.unlink(b) | |
973 | util.unlink(c) |
|
973 | util.unlink(c) | |
974 | # if not uselocalpath, d is the 'orig'/backup file which we |
|
974 | # if not uselocalpath, d is the 'orig'/backup file which we | |
975 | # shouldn't delete. |
|
975 | # shouldn't delete. | |
976 | if d and uselocalpath: |
|
976 | if d and uselocalpath: | |
977 | util.unlink(d) |
|
977 | util.unlink(d) | |
978 |
|
978 | |||
979 |
|
979 | |||
980 | def _filemerge(premerge, repo, wctx, mynode, orig, fcd, fco, fca, labels=None): |
|
980 | def _filemerge(premerge, repo, wctx, mynode, orig, fcd, fco, fca, labels=None): | |
981 | """perform a 3-way merge in the working directory |
|
981 | """perform a 3-way merge in the working directory | |
982 |
|
982 | |||
983 | premerge = whether this is a premerge |
|
983 | premerge = whether this is a premerge | |
984 | mynode = parent node before merge |
|
984 | mynode = parent node before merge | |
985 | orig = original local filename before merge |
|
985 | orig = original local filename before merge | |
986 | fco = other file context |
|
986 | fco = other file context | |
987 | fca = ancestor file context |
|
987 | fca = ancestor file context | |
988 | fcd = local file context for current/destination file |
|
988 | fcd = local file context for current/destination file | |
989 |
|
989 | |||
990 | Returns whether the merge is complete, the return value of the merge, and |
|
990 | Returns whether the merge is complete, the return value of the merge, and | |
991 | a boolean indicating whether the file was deleted from disk.""" |
|
991 | a boolean indicating whether the file was deleted from disk.""" | |
992 |
|
992 | |||
993 | if not fco.cmp(fcd): # files identical? |
|
993 | if not fco.cmp(fcd): # files identical? | |
994 | return True, None, False |
|
994 | return True, None, False | |
995 |
|
995 | |||
996 | ui = repo.ui |
|
996 | ui = repo.ui | |
997 | fd = fcd.path() |
|
997 | fd = fcd.path() | |
998 | uipathfn = scmutil.getuipathfn(repo) |
|
998 | uipathfn = scmutil.getuipathfn(repo) | |
999 | fduipath = uipathfn(fd) |
|
999 | fduipath = uipathfn(fd) | |
1000 | binary = fcd.isbinary() or fco.isbinary() or fca.isbinary() |
|
1000 | binary = fcd.isbinary() or fco.isbinary() or fca.isbinary() | |
1001 | symlink = b'l' in fcd.flags() + fco.flags() |
|
1001 | symlink = b'l' in fcd.flags() + fco.flags() | |
1002 | changedelete = fcd.isabsent() or fco.isabsent() |
|
1002 | changedelete = fcd.isabsent() or fco.isabsent() | |
1003 | tool, toolpath = _picktool(repo, ui, fd, binary, symlink, changedelete) |
|
1003 | tool, toolpath = _picktool(repo, ui, fd, binary, symlink, changedelete) | |
1004 | scriptfn = None |
|
1004 | scriptfn = None | |
1005 | if tool in internals and tool.startswith(b'internal:'): |
|
1005 | if tool in internals and tool.startswith(b'internal:'): | |
1006 | # normalize to new-style names (':merge' etc) |
|
1006 | # normalize to new-style names (':merge' etc) | |
1007 | tool = tool[len(b'internal') :] |
|
1007 | tool = tool[len(b'internal') :] | |
1008 | if toolpath and toolpath.startswith(b'python:'): |
|
1008 | if toolpath and toolpath.startswith(b'python:'): | |
1009 | invalidsyntax = False |
|
1009 | invalidsyntax = False | |
1010 | if toolpath.count(b':') >= 2: |
|
1010 | if toolpath.count(b':') >= 2: | |
1011 | script, scriptfn = toolpath[7:].rsplit(b':', 1) |
|
1011 | script, scriptfn = toolpath[7:].rsplit(b':', 1) | |
1012 | if not scriptfn: |
|
1012 | if not scriptfn: | |
1013 | invalidsyntax = True |
|
1013 | invalidsyntax = True | |
1014 | # missing :callable can lead to spliting on windows drive letter |
|
1014 | # missing :callable can lead to spliting on windows drive letter | |
1015 | if b'\\' in scriptfn or b'/' in scriptfn: |
|
1015 | if b'\\' in scriptfn or b'/' in scriptfn: | |
1016 | invalidsyntax = True |
|
1016 | invalidsyntax = True | |
1017 | else: |
|
1017 | else: | |
1018 | invalidsyntax = True |
|
1018 | invalidsyntax = True | |
1019 | if invalidsyntax: |
|
1019 | if invalidsyntax: | |
1020 | raise error.Abort(_(b"invalid 'python:' syntax: %s") % toolpath) |
|
1020 | raise error.Abort(_(b"invalid 'python:' syntax: %s") % toolpath) | |
1021 | toolpath = script |
|
1021 | toolpath = script | |
1022 | ui.debug( |
|
1022 | ui.debug( | |
1023 | b"picked tool '%s' for %s (binary %s symlink %s changedelete %s)\n" |
|
1023 | b"picked tool '%s' for %s (binary %s symlink %s changedelete %s)\n" | |
1024 | % ( |
|
1024 | % ( | |
1025 | tool, |
|
1025 | tool, | |
1026 | fduipath, |
|
1026 | fduipath, | |
1027 | pycompat.bytestr(binary), |
|
1027 | pycompat.bytestr(binary), | |
1028 | pycompat.bytestr(symlink), |
|
1028 | pycompat.bytestr(symlink), | |
1029 | pycompat.bytestr(changedelete), |
|
1029 | pycompat.bytestr(changedelete), | |
1030 | ) |
|
1030 | ) | |
1031 | ) |
|
1031 | ) | |
1032 |
|
1032 | |||
1033 | if tool in internals: |
|
1033 | if tool in internals: | |
1034 | func = internals[tool] |
|
1034 | func = internals[tool] | |
1035 | mergetype = func.mergetype |
|
1035 | mergetype = func.mergetype | |
1036 | onfailure = func.onfailure |
|
1036 | onfailure = func.onfailure | |
1037 | precheck = func.precheck |
|
1037 | precheck = func.precheck | |
1038 | isexternal = False |
|
1038 | isexternal = False | |
1039 | else: |
|
1039 | else: | |
1040 | if wctx.isinmemory(): |
|
1040 | if wctx.isinmemory(): | |
1041 | func = _xmergeimm |
|
1041 | func = _xmergeimm | |
1042 | else: |
|
1042 | else: | |
1043 | func = _xmerge |
|
1043 | func = _xmerge | |
1044 | mergetype = fullmerge |
|
1044 | mergetype = fullmerge | |
1045 | onfailure = _(b"merging %s failed!\n") |
|
1045 | onfailure = _(b"merging %s failed!\n") | |
1046 | precheck = None |
|
1046 | precheck = None | |
1047 | isexternal = True |
|
1047 | isexternal = True | |
1048 |
|
1048 | |||
1049 | toolconf = tool, toolpath, binary, symlink, scriptfn |
|
1049 | toolconf = tool, toolpath, binary, symlink, scriptfn | |
1050 |
|
1050 | |||
1051 | if mergetype == nomerge: |
|
1051 | if mergetype == nomerge: | |
1052 | r, deleted = func(repo, mynode, orig, fcd, fco, fca, toolconf, labels) |
|
1052 | r, deleted = func(repo, mynode, orig, fcd, fco, fca, toolconf, labels) | |
1053 | return True, r, deleted |
|
1053 | return True, r, deleted | |
1054 |
|
1054 | |||
1055 | if premerge: |
|
1055 | if premerge: | |
1056 | if orig != fco.path(): |
|
1056 | if orig != fco.path(): | |
1057 | ui.status( |
|
1057 | ui.status( | |
1058 | _(b"merging %s and %s to %s\n") |
|
1058 | _(b"merging %s and %s to %s\n") | |
1059 | % (uipathfn(orig), uipathfn(fco.path()), fduipath) |
|
1059 | % (uipathfn(orig), uipathfn(fco.path()), fduipath) | |
1060 | ) |
|
1060 | ) | |
1061 | else: |
|
1061 | else: | |
1062 | ui.status(_(b"merging %s\n") % fduipath) |
|
1062 | ui.status(_(b"merging %s\n") % fduipath) | |
1063 |
|
1063 | |||
1064 | ui.debug(b"my %s other %s ancestor %s\n" % (fcd, fco, fca)) |
|
1064 | ui.debug(b"my %s other %s ancestor %s\n" % (fcd, fco, fca)) | |
1065 |
|
1065 | |||
1066 | if precheck and not precheck(repo, mynode, orig, fcd, fco, fca, toolconf): |
|
1066 | if precheck and not precheck(repo, mynode, orig, fcd, fco, fca, toolconf): | |
1067 | if onfailure: |
|
1067 | if onfailure: | |
1068 | if wctx.isinmemory(): |
|
1068 | if wctx.isinmemory(): | |
1069 | raise error.InMemoryMergeConflictsError( |
|
1069 | raise error.InMemoryMergeConflictsError( | |
1070 | b'in-memory merge does not support merge conflicts' |
|
1070 | b'in-memory merge does not support merge conflicts' | |
1071 | ) |
|
1071 | ) | |
1072 | ui.warn(onfailure % fduipath) |
|
1072 | ui.warn(onfailure % fduipath) | |
1073 | return True, 1, False |
|
1073 | return True, 1, False | |
1074 |
|
1074 | |||
1075 | back = _makebackup(repo, ui, wctx, fcd, premerge) |
|
1075 | back = _makebackup(repo, ui, wctx, fcd, premerge) | |
1076 | files = (None, None, None, back) |
|
1076 | files = (None, None, None, back) | |
1077 | r = 1 |
|
1077 | r = 1 | |
1078 | try: |
|
1078 | try: | |
1079 | internalmarkerstyle = ui.config(b'ui', b'mergemarkers') |
|
1079 | internalmarkerstyle = ui.config(b'ui', b'mergemarkers') | |
1080 | if isexternal: |
|
1080 | if isexternal: | |
1081 | markerstyle = _toolstr(ui, tool, b'mergemarkers') |
|
1081 | markerstyle = _toolstr(ui, tool, b'mergemarkers') | |
1082 | else: |
|
1082 | else: | |
1083 | markerstyle = internalmarkerstyle |
|
1083 | markerstyle = internalmarkerstyle | |
1084 |
|
1084 | |||
1085 | if not labels: |
|
1085 | if not labels: | |
1086 | labels = _defaultconflictlabels |
|
1086 | labels = _defaultconflictlabels | |
1087 | formattedlabels = labels |
|
1087 | formattedlabels = labels | |
1088 | if markerstyle != b'basic': |
|
1088 | if markerstyle != b'basic': | |
1089 | formattedlabels = _formatlabels( |
|
1089 | formattedlabels = _formatlabels( | |
1090 | repo, fcd, fco, fca, labels, tool=tool |
|
1090 | repo, fcd, fco, fca, labels, tool=tool | |
1091 | ) |
|
1091 | ) | |
1092 |
|
1092 | |||
1093 | if premerge and mergetype == fullmerge: |
|
1093 | if premerge and mergetype == fullmerge: | |
1094 | # conflict markers generated by premerge will use 'detailed' |
|
1094 | # conflict markers generated by premerge will use 'detailed' | |
1095 | # settings if either ui.mergemarkers or the tool's mergemarkers |
|
1095 | # settings if either ui.mergemarkers or the tool's mergemarkers | |
1096 | # setting is 'detailed'. This way tools can have basic labels in |
|
1096 | # setting is 'detailed'. This way tools can have basic labels in | |
1097 | # space-constrained areas of the UI, but still get full information |
|
1097 | # space-constrained areas of the UI, but still get full information | |
1098 | # in conflict markers if premerge is 'keep' or 'keep-merge3'. |
|
1098 | # in conflict markers if premerge is 'keep' or 'keep-merge3'. | |
1099 | premergelabels = labels |
|
1099 | premergelabels = labels | |
1100 | labeltool = None |
|
1100 | labeltool = None | |
1101 | if markerstyle != b'basic': |
|
1101 | if markerstyle != b'basic': | |
1102 | # respect 'tool's mergemarkertemplate (which defaults to |
|
1102 | # respect 'tool's mergemarkertemplate (which defaults to | |
1103 |
# |
|
1103 | # command-templates.mergemarker) | |
1104 | labeltool = tool |
|
1104 | labeltool = tool | |
1105 | if internalmarkerstyle != b'basic' or markerstyle != b'basic': |
|
1105 | if internalmarkerstyle != b'basic' or markerstyle != b'basic': | |
1106 | premergelabels = _formatlabels( |
|
1106 | premergelabels = _formatlabels( | |
1107 | repo, fcd, fco, fca, premergelabels, tool=labeltool |
|
1107 | repo, fcd, fco, fca, premergelabels, tool=labeltool | |
1108 | ) |
|
1108 | ) | |
1109 |
|
1109 | |||
1110 | r = _premerge( |
|
1110 | r = _premerge( | |
1111 | repo, fcd, fco, fca, toolconf, files, labels=premergelabels |
|
1111 | repo, fcd, fco, fca, toolconf, files, labels=premergelabels | |
1112 | ) |
|
1112 | ) | |
1113 | # complete if premerge successful (r is 0) |
|
1113 | # complete if premerge successful (r is 0) | |
1114 | return not r, r, False |
|
1114 | return not r, r, False | |
1115 |
|
1115 | |||
1116 | needcheck, r, deleted = func( |
|
1116 | needcheck, r, deleted = func( | |
1117 | repo, |
|
1117 | repo, | |
1118 | mynode, |
|
1118 | mynode, | |
1119 | orig, |
|
1119 | orig, | |
1120 | fcd, |
|
1120 | fcd, | |
1121 | fco, |
|
1121 | fco, | |
1122 | fca, |
|
1122 | fca, | |
1123 | toolconf, |
|
1123 | toolconf, | |
1124 | files, |
|
1124 | files, | |
1125 | labels=formattedlabels, |
|
1125 | labels=formattedlabels, | |
1126 | ) |
|
1126 | ) | |
1127 |
|
1127 | |||
1128 | if needcheck: |
|
1128 | if needcheck: | |
1129 | r = _check(repo, r, ui, tool, fcd, files) |
|
1129 | r = _check(repo, r, ui, tool, fcd, files) | |
1130 |
|
1130 | |||
1131 | if r: |
|
1131 | if r: | |
1132 | if onfailure: |
|
1132 | if onfailure: | |
1133 | if wctx.isinmemory(): |
|
1133 | if wctx.isinmemory(): | |
1134 | raise error.InMemoryMergeConflictsError( |
|
1134 | raise error.InMemoryMergeConflictsError( | |
1135 | b'in-memory merge ' |
|
1135 | b'in-memory merge ' | |
1136 | b'does not support ' |
|
1136 | b'does not support ' | |
1137 | b'merge conflicts' |
|
1137 | b'merge conflicts' | |
1138 | ) |
|
1138 | ) | |
1139 | ui.warn(onfailure % fduipath) |
|
1139 | ui.warn(onfailure % fduipath) | |
1140 | _onfilemergefailure(ui) |
|
1140 | _onfilemergefailure(ui) | |
1141 |
|
1141 | |||
1142 | return True, r, deleted |
|
1142 | return True, r, deleted | |
1143 | finally: |
|
1143 | finally: | |
1144 | if not r and back is not None: |
|
1144 | if not r and back is not None: | |
1145 | back.remove() |
|
1145 | back.remove() | |
1146 |
|
1146 | |||
1147 |
|
1147 | |||
1148 | def _haltmerge(): |
|
1148 | def _haltmerge(): | |
1149 | msg = _(b'merge halted after failed merge (see hg resolve)') |
|
1149 | msg = _(b'merge halted after failed merge (see hg resolve)') | |
1150 | raise error.InterventionRequired(msg) |
|
1150 | raise error.InterventionRequired(msg) | |
1151 |
|
1151 | |||
1152 |
|
1152 | |||
1153 | def _onfilemergefailure(ui): |
|
1153 | def _onfilemergefailure(ui): | |
1154 | action = ui.config(b'merge', b'on-failure') |
|
1154 | action = ui.config(b'merge', b'on-failure') | |
1155 | if action == b'prompt': |
|
1155 | if action == b'prompt': | |
1156 | msg = _(b'continue merge operation (yn)?$$ &Yes $$ &No') |
|
1156 | msg = _(b'continue merge operation (yn)?$$ &Yes $$ &No') | |
1157 | if ui.promptchoice(msg, 0) == 1: |
|
1157 | if ui.promptchoice(msg, 0) == 1: | |
1158 | _haltmerge() |
|
1158 | _haltmerge() | |
1159 | if action == b'halt': |
|
1159 | if action == b'halt': | |
1160 | _haltmerge() |
|
1160 | _haltmerge() | |
1161 | # default action is 'continue', in which case we neither prompt nor halt |
|
1161 | # default action is 'continue', in which case we neither prompt nor halt | |
1162 |
|
1162 | |||
1163 |
|
1163 | |||
1164 | def hasconflictmarkers(data): |
|
1164 | def hasconflictmarkers(data): | |
1165 | return bool( |
|
1165 | return bool( | |
1166 | re.search(b"^(<<<<<<< .*|=======|>>>>>>> .*)$", data, re.MULTILINE) |
|
1166 | re.search(b"^(<<<<<<< .*|=======|>>>>>>> .*)$", data, re.MULTILINE) | |
1167 | ) |
|
1167 | ) | |
1168 |
|
1168 | |||
1169 |
|
1169 | |||
1170 | def _check(repo, r, ui, tool, fcd, files): |
|
1170 | def _check(repo, r, ui, tool, fcd, files): | |
1171 | fd = fcd.path() |
|
1171 | fd = fcd.path() | |
1172 | uipathfn = scmutil.getuipathfn(repo) |
|
1172 | uipathfn = scmutil.getuipathfn(repo) | |
1173 | unused, unused, unused, back = files |
|
1173 | unused, unused, unused, back = files | |
1174 |
|
1174 | |||
1175 | if not r and ( |
|
1175 | if not r and ( | |
1176 | _toolbool(ui, tool, b"checkconflicts") |
|
1176 | _toolbool(ui, tool, b"checkconflicts") | |
1177 | or b'conflicts' in _toollist(ui, tool, b"check") |
|
1177 | or b'conflicts' in _toollist(ui, tool, b"check") | |
1178 | ): |
|
1178 | ): | |
1179 | if hasconflictmarkers(fcd.data()): |
|
1179 | if hasconflictmarkers(fcd.data()): | |
1180 | r = 1 |
|
1180 | r = 1 | |
1181 |
|
1181 | |||
1182 | checked = False |
|
1182 | checked = False | |
1183 | if b'prompt' in _toollist(ui, tool, b"check"): |
|
1183 | if b'prompt' in _toollist(ui, tool, b"check"): | |
1184 | checked = True |
|
1184 | checked = True | |
1185 | if ui.promptchoice( |
|
1185 | if ui.promptchoice( | |
1186 | _(b"was merge of '%s' successful (yn)?$$ &Yes $$ &No") |
|
1186 | _(b"was merge of '%s' successful (yn)?$$ &Yes $$ &No") | |
1187 | % uipathfn(fd), |
|
1187 | % uipathfn(fd), | |
1188 | 1, |
|
1188 | 1, | |
1189 | ): |
|
1189 | ): | |
1190 | r = 1 |
|
1190 | r = 1 | |
1191 |
|
1191 | |||
1192 | if ( |
|
1192 | if ( | |
1193 | not r |
|
1193 | not r | |
1194 | and not checked |
|
1194 | and not checked | |
1195 | and ( |
|
1195 | and ( | |
1196 | _toolbool(ui, tool, b"checkchanged") |
|
1196 | _toolbool(ui, tool, b"checkchanged") | |
1197 | or b'changed' in _toollist(ui, tool, b"check") |
|
1197 | or b'changed' in _toollist(ui, tool, b"check") | |
1198 | ) |
|
1198 | ) | |
1199 | ): |
|
1199 | ): | |
1200 | if back is not None and not fcd.cmp(back): |
|
1200 | if back is not None and not fcd.cmp(back): | |
1201 | if ui.promptchoice( |
|
1201 | if ui.promptchoice( | |
1202 | _( |
|
1202 | _( | |
1203 | b" output file %s appears unchanged\n" |
|
1203 | b" output file %s appears unchanged\n" | |
1204 | b"was merge successful (yn)?" |
|
1204 | b"was merge successful (yn)?" | |
1205 | b"$$ &Yes $$ &No" |
|
1205 | b"$$ &Yes $$ &No" | |
1206 | ) |
|
1206 | ) | |
1207 | % uipathfn(fd), |
|
1207 | % uipathfn(fd), | |
1208 | 1, |
|
1208 | 1, | |
1209 | ): |
|
1209 | ): | |
1210 | r = 1 |
|
1210 | r = 1 | |
1211 |
|
1211 | |||
1212 | if back is not None and _toolbool(ui, tool, b"fixeol"): |
|
1212 | if back is not None and _toolbool(ui, tool, b"fixeol"): | |
1213 | _matcheol(_workingpath(repo, fcd), back) |
|
1213 | _matcheol(_workingpath(repo, fcd), back) | |
1214 |
|
1214 | |||
1215 | return r |
|
1215 | return r | |
1216 |
|
1216 | |||
1217 |
|
1217 | |||
1218 | def _workingpath(repo, ctx): |
|
1218 | def _workingpath(repo, ctx): | |
1219 | return repo.wjoin(ctx.path()) |
|
1219 | return repo.wjoin(ctx.path()) | |
1220 |
|
1220 | |||
1221 |
|
1221 | |||
1222 | def premerge(repo, wctx, mynode, orig, fcd, fco, fca, labels=None): |
|
1222 | def premerge(repo, wctx, mynode, orig, fcd, fco, fca, labels=None): | |
1223 | return _filemerge( |
|
1223 | return _filemerge( | |
1224 | True, repo, wctx, mynode, orig, fcd, fco, fca, labels=labels |
|
1224 | True, repo, wctx, mynode, orig, fcd, fco, fca, labels=labels | |
1225 | ) |
|
1225 | ) | |
1226 |
|
1226 | |||
1227 |
|
1227 | |||
1228 | def filemerge(repo, wctx, mynode, orig, fcd, fco, fca, labels=None): |
|
1228 | def filemerge(repo, wctx, mynode, orig, fcd, fco, fca, labels=None): | |
1229 | return _filemerge( |
|
1229 | return _filemerge( | |
1230 | False, repo, wctx, mynode, orig, fcd, fco, fca, labels=labels |
|
1230 | False, repo, wctx, mynode, orig, fcd, fco, fca, labels=labels | |
1231 | ) |
|
1231 | ) | |
1232 |
|
1232 | |||
1233 |
|
1233 | |||
1234 | def loadinternalmerge(ui, extname, registrarobj): |
|
1234 | def loadinternalmerge(ui, extname, registrarobj): | |
1235 | """Load internal merge tool from specified registrarobj |
|
1235 | """Load internal merge tool from specified registrarobj | |
1236 | """ |
|
1236 | """ | |
1237 | for name, func in pycompat.iteritems(registrarobj._table): |
|
1237 | for name, func in pycompat.iteritems(registrarobj._table): | |
1238 | fullname = b':' + name |
|
1238 | fullname = b':' + name | |
1239 | internals[fullname] = func |
|
1239 | internals[fullname] = func | |
1240 | internals[b'internal:' + name] = func |
|
1240 | internals[b'internal:' + name] = func | |
1241 | internalsdoc[fullname] = func |
|
1241 | internalsdoc[fullname] = func | |
1242 |
|
1242 | |||
1243 | capabilities = sorted([k for k, v in func.capabilities.items() if v]) |
|
1243 | capabilities = sorted([k for k, v in func.capabilities.items() if v]) | |
1244 | if capabilities: |
|
1244 | if capabilities: | |
1245 | capdesc = b" (actual capabilities: %s)" % b', '.join( |
|
1245 | capdesc = b" (actual capabilities: %s)" % b', '.join( | |
1246 | capabilities |
|
1246 | capabilities | |
1247 | ) |
|
1247 | ) | |
1248 | func.__doc__ = func.__doc__ + pycompat.sysstr(b"\n\n%s" % capdesc) |
|
1248 | func.__doc__ = func.__doc__ + pycompat.sysstr(b"\n\n%s" % capdesc) | |
1249 |
|
1249 | |||
1250 | # to put i18n comments into hg.pot for automatically generated texts |
|
1250 | # to put i18n comments into hg.pot for automatically generated texts | |
1251 |
|
1251 | |||
1252 | # i18n: "binary" and "symlink" are keywords |
|
1252 | # i18n: "binary" and "symlink" are keywords | |
1253 | # i18n: this text is added automatically |
|
1253 | # i18n: this text is added automatically | |
1254 | _(b" (actual capabilities: binary, symlink)") |
|
1254 | _(b" (actual capabilities: binary, symlink)") | |
1255 | # i18n: "binary" is keyword |
|
1255 | # i18n: "binary" is keyword | |
1256 | # i18n: this text is added automatically |
|
1256 | # i18n: this text is added automatically | |
1257 | _(b" (actual capabilities: binary)") |
|
1257 | _(b" (actual capabilities: binary)") | |
1258 | # i18n: "symlink" is keyword |
|
1258 | # i18n: "symlink" is keyword | |
1259 | # i18n: this text is added automatically |
|
1259 | # i18n: this text is added automatically | |
1260 | _(b" (actual capabilities: symlink)") |
|
1260 | _(b" (actual capabilities: symlink)") | |
1261 |
|
1261 | |||
1262 |
|
1262 | |||
1263 | # load built-in merge tools explicitly to setup internalsdoc |
|
1263 | # load built-in merge tools explicitly to setup internalsdoc | |
1264 | loadinternalmerge(None, None, internaltool) |
|
1264 | loadinternalmerge(None, None, internaltool) | |
1265 |
|
1265 | |||
1266 | # tell hggettext to extract docstrings from these functions: |
|
1266 | # tell hggettext to extract docstrings from these functions: | |
1267 | i18nfunctions = internals.values() |
|
1267 | i18nfunctions = internals.values() |
@@ -1,2919 +1,2922 b'' | |||||
1 | The Mercurial system uses a set of configuration files to control |
|
1 | The Mercurial system uses a set of configuration files to control | |
2 | aspects of its behavior. |
|
2 | aspects of its behavior. | |
3 |
|
3 | |||
4 | Troubleshooting |
|
4 | Troubleshooting | |
5 | =============== |
|
5 | =============== | |
6 |
|
6 | |||
7 | If you're having problems with your configuration, |
|
7 | If you're having problems with your configuration, | |
8 | :hg:`config --debug` can help you understand what is introducing |
|
8 | :hg:`config --debug` can help you understand what is introducing | |
9 | a setting into your environment. |
|
9 | a setting into your environment. | |
10 |
|
10 | |||
11 | See :hg:`help config.syntax` and :hg:`help config.files` |
|
11 | See :hg:`help config.syntax` and :hg:`help config.files` | |
12 | for information about how and where to override things. |
|
12 | for information about how and where to override things. | |
13 |
|
13 | |||
14 | Structure |
|
14 | Structure | |
15 | ========= |
|
15 | ========= | |
16 |
|
16 | |||
17 | The configuration files use a simple ini-file format. A configuration |
|
17 | The configuration files use a simple ini-file format. A configuration | |
18 | file consists of sections, led by a ``[section]`` header and followed |
|
18 | file consists of sections, led by a ``[section]`` header and followed | |
19 | by ``name = value`` entries:: |
|
19 | by ``name = value`` entries:: | |
20 |
|
20 | |||
21 | [ui] |
|
21 | [ui] | |
22 | username = Firstname Lastname <firstname.lastname@example.net> |
|
22 | username = Firstname Lastname <firstname.lastname@example.net> | |
23 | verbose = True |
|
23 | verbose = True | |
24 |
|
24 | |||
25 | The above entries will be referred to as ``ui.username`` and |
|
25 | The above entries will be referred to as ``ui.username`` and | |
26 | ``ui.verbose``, respectively. See :hg:`help config.syntax`. |
|
26 | ``ui.verbose``, respectively. See :hg:`help config.syntax`. | |
27 |
|
27 | |||
28 | Files |
|
28 | Files | |
29 | ===== |
|
29 | ===== | |
30 |
|
30 | |||
31 | Mercurial reads configuration data from several files, if they exist. |
|
31 | Mercurial reads configuration data from several files, if they exist. | |
32 | These files do not exist by default and you will have to create the |
|
32 | These files do not exist by default and you will have to create the | |
33 | appropriate configuration files yourself: |
|
33 | appropriate configuration files yourself: | |
34 |
|
34 | |||
35 | Local configuration is put into the per-repository ``<repo>/.hg/hgrc`` file. |
|
35 | Local configuration is put into the per-repository ``<repo>/.hg/hgrc`` file. | |
36 |
|
36 | |||
37 | Global configuration like the username setting is typically put into: |
|
37 | Global configuration like the username setting is typically put into: | |
38 |
|
38 | |||
39 | .. container:: windows |
|
39 | .. container:: windows | |
40 |
|
40 | |||
41 | - ``%USERPROFILE%\mercurial.ini`` (on Windows) |
|
41 | - ``%USERPROFILE%\mercurial.ini`` (on Windows) | |
42 |
|
42 | |||
43 | .. container:: unix.plan9 |
|
43 | .. container:: unix.plan9 | |
44 |
|
44 | |||
45 | - ``$HOME/.hgrc`` (on Unix, Plan9) |
|
45 | - ``$HOME/.hgrc`` (on Unix, Plan9) | |
46 |
|
46 | |||
47 | The names of these files depend on the system on which Mercurial is |
|
47 | The names of these files depend on the system on which Mercurial is | |
48 | installed. ``*.rc`` files from a single directory are read in |
|
48 | installed. ``*.rc`` files from a single directory are read in | |
49 | alphabetical order, later ones overriding earlier ones. Where multiple |
|
49 | alphabetical order, later ones overriding earlier ones. Where multiple | |
50 | paths are given below, settings from earlier paths override later |
|
50 | paths are given below, settings from earlier paths override later | |
51 | ones. |
|
51 | ones. | |
52 |
|
52 | |||
53 | .. container:: verbose.unix |
|
53 | .. container:: verbose.unix | |
54 |
|
54 | |||
55 | On Unix, the following files are consulted: |
|
55 | On Unix, the following files are consulted: | |
56 |
|
56 | |||
57 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
57 | - ``<repo>/.hg/hgrc`` (per-repository) | |
58 | - ``$HOME/.hgrc`` (per-user) |
|
58 | - ``$HOME/.hgrc`` (per-user) | |
59 | - ``${XDG_CONFIG_HOME:-$HOME/.config}/hg/hgrc`` (per-user) |
|
59 | - ``${XDG_CONFIG_HOME:-$HOME/.config}/hg/hgrc`` (per-user) | |
60 | - ``<install-root>/etc/mercurial/hgrc`` (per-installation) |
|
60 | - ``<install-root>/etc/mercurial/hgrc`` (per-installation) | |
61 | - ``<install-root>/etc/mercurial/hgrc.d/*.rc`` (per-installation) |
|
61 | - ``<install-root>/etc/mercurial/hgrc.d/*.rc`` (per-installation) | |
62 | - ``/etc/mercurial/hgrc`` (per-system) |
|
62 | - ``/etc/mercurial/hgrc`` (per-system) | |
63 | - ``/etc/mercurial/hgrc.d/*.rc`` (per-system) |
|
63 | - ``/etc/mercurial/hgrc.d/*.rc`` (per-system) | |
64 | - ``<internal>/*.rc`` (defaults) |
|
64 | - ``<internal>/*.rc`` (defaults) | |
65 |
|
65 | |||
66 | .. container:: verbose.windows |
|
66 | .. container:: verbose.windows | |
67 |
|
67 | |||
68 | On Windows, the following files are consulted: |
|
68 | On Windows, the following files are consulted: | |
69 |
|
69 | |||
70 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
70 | - ``<repo>/.hg/hgrc`` (per-repository) | |
71 | - ``%USERPROFILE%\.hgrc`` (per-user) |
|
71 | - ``%USERPROFILE%\.hgrc`` (per-user) | |
72 | - ``%USERPROFILE%\Mercurial.ini`` (per-user) |
|
72 | - ``%USERPROFILE%\Mercurial.ini`` (per-user) | |
73 | - ``%HOME%\.hgrc`` (per-user) |
|
73 | - ``%HOME%\.hgrc`` (per-user) | |
74 | - ``%HOME%\Mercurial.ini`` (per-user) |
|
74 | - ``%HOME%\Mercurial.ini`` (per-user) | |
75 | - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (per-system) |
|
75 | - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (per-system) | |
76 | - ``<install-dir>\hgrc.d\*.rc`` (per-installation) |
|
76 | - ``<install-dir>\hgrc.d\*.rc`` (per-installation) | |
77 | - ``<install-dir>\Mercurial.ini`` (per-installation) |
|
77 | - ``<install-dir>\Mercurial.ini`` (per-installation) | |
78 | - ``%PROGRAMDATA%\Mercurial\hgrc`` (per-system) |
|
78 | - ``%PROGRAMDATA%\Mercurial\hgrc`` (per-system) | |
79 | - ``%PROGRAMDATA%\Mercurial\Mercurial.ini`` (per-system) |
|
79 | - ``%PROGRAMDATA%\Mercurial\Mercurial.ini`` (per-system) | |
80 | - ``%PROGRAMDATA%\Mercurial\hgrc.d\*.rc`` (per-system) |
|
80 | - ``%PROGRAMDATA%\Mercurial\hgrc.d\*.rc`` (per-system) | |
81 | - ``<internal>/*.rc`` (defaults) |
|
81 | - ``<internal>/*.rc`` (defaults) | |
82 |
|
82 | |||
83 | .. note:: |
|
83 | .. note:: | |
84 |
|
84 | |||
85 | The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial`` |
|
85 | The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial`` | |
86 | is used when running 32-bit Python on 64-bit Windows. |
|
86 | is used when running 32-bit Python on 64-bit Windows. | |
87 |
|
87 | |||
88 | .. container:: verbose.plan9 |
|
88 | .. container:: verbose.plan9 | |
89 |
|
89 | |||
90 | On Plan9, the following files are consulted: |
|
90 | On Plan9, the following files are consulted: | |
91 |
|
91 | |||
92 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
92 | - ``<repo>/.hg/hgrc`` (per-repository) | |
93 | - ``$home/lib/hgrc`` (per-user) |
|
93 | - ``$home/lib/hgrc`` (per-user) | |
94 | - ``<install-root>/lib/mercurial/hgrc`` (per-installation) |
|
94 | - ``<install-root>/lib/mercurial/hgrc`` (per-installation) | |
95 | - ``<install-root>/lib/mercurial/hgrc.d/*.rc`` (per-installation) |
|
95 | - ``<install-root>/lib/mercurial/hgrc.d/*.rc`` (per-installation) | |
96 | - ``/lib/mercurial/hgrc`` (per-system) |
|
96 | - ``/lib/mercurial/hgrc`` (per-system) | |
97 | - ``/lib/mercurial/hgrc.d/*.rc`` (per-system) |
|
97 | - ``/lib/mercurial/hgrc.d/*.rc`` (per-system) | |
98 | - ``<internal>/*.rc`` (defaults) |
|
98 | - ``<internal>/*.rc`` (defaults) | |
99 |
|
99 | |||
100 | Per-repository configuration options only apply in a |
|
100 | Per-repository configuration options only apply in a | |
101 | particular repository. This file is not version-controlled, and |
|
101 | particular repository. This file is not version-controlled, and | |
102 | will not get transferred during a "clone" operation. Options in |
|
102 | will not get transferred during a "clone" operation. Options in | |
103 | this file override options in all other configuration files. |
|
103 | this file override options in all other configuration files. | |
104 |
|
104 | |||
105 | .. container:: unix.plan9 |
|
105 | .. container:: unix.plan9 | |
106 |
|
106 | |||
107 | On Plan 9 and Unix, most of this file will be ignored if it doesn't |
|
107 | On Plan 9 and Unix, most of this file will be ignored if it doesn't | |
108 | belong to a trusted user or to a trusted group. See |
|
108 | belong to a trusted user or to a trusted group. See | |
109 | :hg:`help config.trusted` for more details. |
|
109 | :hg:`help config.trusted` for more details. | |
110 |
|
110 | |||
111 | Per-user configuration file(s) are for the user running Mercurial. Options |
|
111 | Per-user configuration file(s) are for the user running Mercurial. Options | |
112 | in these files apply to all Mercurial commands executed by this user in any |
|
112 | in these files apply to all Mercurial commands executed by this user in any | |
113 | directory. Options in these files override per-system and per-installation |
|
113 | directory. Options in these files override per-system and per-installation | |
114 | options. |
|
114 | options. | |
115 |
|
115 | |||
116 | Per-installation configuration files are searched for in the |
|
116 | Per-installation configuration files are searched for in the | |
117 | directory where Mercurial is installed. ``<install-root>`` is the |
|
117 | directory where Mercurial is installed. ``<install-root>`` is the | |
118 | parent directory of the **hg** executable (or symlink) being run. |
|
118 | parent directory of the **hg** executable (or symlink) being run. | |
119 |
|
119 | |||
120 | .. container:: unix.plan9 |
|
120 | .. container:: unix.plan9 | |
121 |
|
121 | |||
122 | For example, if installed in ``/shared/tools/bin/hg``, Mercurial |
|
122 | For example, if installed in ``/shared/tools/bin/hg``, Mercurial | |
123 | will look in ``/shared/tools/etc/mercurial/hgrc``. Options in these |
|
123 | will look in ``/shared/tools/etc/mercurial/hgrc``. Options in these | |
124 | files apply to all Mercurial commands executed by any user in any |
|
124 | files apply to all Mercurial commands executed by any user in any | |
125 | directory. |
|
125 | directory. | |
126 |
|
126 | |||
127 | Per-installation configuration files are for the system on |
|
127 | Per-installation configuration files are for the system on | |
128 | which Mercurial is running. Options in these files apply to all |
|
128 | which Mercurial is running. Options in these files apply to all | |
129 | Mercurial commands executed by any user in any directory. Registry |
|
129 | Mercurial commands executed by any user in any directory. Registry | |
130 | keys contain PATH-like strings, every part of which must reference |
|
130 | keys contain PATH-like strings, every part of which must reference | |
131 | a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will |
|
131 | a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will | |
132 | be read. Mercurial checks each of these locations in the specified |
|
132 | be read. Mercurial checks each of these locations in the specified | |
133 | order until one or more configuration files are detected. |
|
133 | order until one or more configuration files are detected. | |
134 |
|
134 | |||
135 | Per-system configuration files are for the system on which Mercurial |
|
135 | Per-system configuration files are for the system on which Mercurial | |
136 | is running. Options in these files apply to all Mercurial commands |
|
136 | is running. Options in these files apply to all Mercurial commands | |
137 | executed by any user in any directory. Options in these files |
|
137 | executed by any user in any directory. Options in these files | |
138 | override per-installation options. |
|
138 | override per-installation options. | |
139 |
|
139 | |||
140 | Mercurial comes with some default configuration. The default configuration |
|
140 | Mercurial comes with some default configuration. The default configuration | |
141 | files are installed with Mercurial and will be overwritten on upgrades. Default |
|
141 | files are installed with Mercurial and will be overwritten on upgrades. Default | |
142 | configuration files should never be edited by users or administrators but can |
|
142 | configuration files should never be edited by users or administrators but can | |
143 | be overridden in other configuration files. So far the directory only contains |
|
143 | be overridden in other configuration files. So far the directory only contains | |
144 | merge tool configuration but packagers can also put other default configuration |
|
144 | merge tool configuration but packagers can also put other default configuration | |
145 | there. |
|
145 | there. | |
146 |
|
146 | |||
147 | Syntax |
|
147 | Syntax | |
148 | ====== |
|
148 | ====== | |
149 |
|
149 | |||
150 | A configuration file consists of sections, led by a ``[section]`` header |
|
150 | A configuration file consists of sections, led by a ``[section]`` header | |
151 | and followed by ``name = value`` entries (sometimes called |
|
151 | and followed by ``name = value`` entries (sometimes called | |
152 | ``configuration keys``):: |
|
152 | ``configuration keys``):: | |
153 |
|
153 | |||
154 | [spam] |
|
154 | [spam] | |
155 | eggs=ham |
|
155 | eggs=ham | |
156 | green= |
|
156 | green= | |
157 | eggs |
|
157 | eggs | |
158 |
|
158 | |||
159 | Each line contains one entry. If the lines that follow are indented, |
|
159 | Each line contains one entry. If the lines that follow are indented, | |
160 | they are treated as continuations of that entry. Leading whitespace is |
|
160 | they are treated as continuations of that entry. Leading whitespace is | |
161 | removed from values. Empty lines are skipped. Lines beginning with |
|
161 | removed from values. Empty lines are skipped. Lines beginning with | |
162 | ``#`` or ``;`` are ignored and may be used to provide comments. |
|
162 | ``#`` or ``;`` are ignored and may be used to provide comments. | |
163 |
|
163 | |||
164 | Configuration keys can be set multiple times, in which case Mercurial |
|
164 | Configuration keys can be set multiple times, in which case Mercurial | |
165 | will use the value that was configured last. As an example:: |
|
165 | will use the value that was configured last. As an example:: | |
166 |
|
166 | |||
167 | [spam] |
|
167 | [spam] | |
168 | eggs=large |
|
168 | eggs=large | |
169 | ham=serrano |
|
169 | ham=serrano | |
170 | eggs=small |
|
170 | eggs=small | |
171 |
|
171 | |||
172 | This would set the configuration key named ``eggs`` to ``small``. |
|
172 | This would set the configuration key named ``eggs`` to ``small``. | |
173 |
|
173 | |||
174 | It is also possible to define a section multiple times. A section can |
|
174 | It is also possible to define a section multiple times. A section can | |
175 | be redefined on the same and/or on different configuration files. For |
|
175 | be redefined on the same and/or on different configuration files. For | |
176 | example:: |
|
176 | example:: | |
177 |
|
177 | |||
178 | [foo] |
|
178 | [foo] | |
179 | eggs=large |
|
179 | eggs=large | |
180 | ham=serrano |
|
180 | ham=serrano | |
181 | eggs=small |
|
181 | eggs=small | |
182 |
|
182 | |||
183 | [bar] |
|
183 | [bar] | |
184 | eggs=ham |
|
184 | eggs=ham | |
185 | green= |
|
185 | green= | |
186 | eggs |
|
186 | eggs | |
187 |
|
187 | |||
188 | [foo] |
|
188 | [foo] | |
189 | ham=prosciutto |
|
189 | ham=prosciutto | |
190 | eggs=medium |
|
190 | eggs=medium | |
191 | bread=toasted |
|
191 | bread=toasted | |
192 |
|
192 | |||
193 | This would set the ``eggs``, ``ham``, and ``bread`` configuration keys |
|
193 | This would set the ``eggs``, ``ham``, and ``bread`` configuration keys | |
194 | of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``, |
|
194 | of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``, | |
195 | respectively. As you can see there only thing that matters is the last |
|
195 | respectively. As you can see there only thing that matters is the last | |
196 | value that was set for each of the configuration keys. |
|
196 | value that was set for each of the configuration keys. | |
197 |
|
197 | |||
198 | If a configuration key is set multiple times in different |
|
198 | If a configuration key is set multiple times in different | |
199 | configuration files the final value will depend on the order in which |
|
199 | configuration files the final value will depend on the order in which | |
200 | the different configuration files are read, with settings from earlier |
|
200 | the different configuration files are read, with settings from earlier | |
201 | paths overriding later ones as described on the ``Files`` section |
|
201 | paths overriding later ones as described on the ``Files`` section | |
202 | above. |
|
202 | above. | |
203 |
|
203 | |||
204 | A line of the form ``%include file`` will include ``file`` into the |
|
204 | A line of the form ``%include file`` will include ``file`` into the | |
205 | current configuration file. The inclusion is recursive, which means |
|
205 | current configuration file. The inclusion is recursive, which means | |
206 | that included files can include other files. Filenames are relative to |
|
206 | that included files can include other files. Filenames are relative to | |
207 | the configuration file in which the ``%include`` directive is found. |
|
207 | the configuration file in which the ``%include`` directive is found. | |
208 | Environment variables and ``~user`` constructs are expanded in |
|
208 | Environment variables and ``~user`` constructs are expanded in | |
209 | ``file``. This lets you do something like:: |
|
209 | ``file``. This lets you do something like:: | |
210 |
|
210 | |||
211 | %include ~/.hgrc.d/$HOST.rc |
|
211 | %include ~/.hgrc.d/$HOST.rc | |
212 |
|
212 | |||
213 | to include a different configuration file on each computer you use. |
|
213 | to include a different configuration file on each computer you use. | |
214 |
|
214 | |||
215 | A line with ``%unset name`` will remove ``name`` from the current |
|
215 | A line with ``%unset name`` will remove ``name`` from the current | |
216 | section, if it has been set previously. |
|
216 | section, if it has been set previously. | |
217 |
|
217 | |||
218 | The values are either free-form text strings, lists of text strings, |
|
218 | The values are either free-form text strings, lists of text strings, | |
219 | or Boolean values. Boolean values can be set to true using any of "1", |
|
219 | or Boolean values. Boolean values can be set to true using any of "1", | |
220 | "yes", "true", or "on" and to false using "0", "no", "false", or "off" |
|
220 | "yes", "true", or "on" and to false using "0", "no", "false", or "off" | |
221 | (all case insensitive). |
|
221 | (all case insensitive). | |
222 |
|
222 | |||
223 | List values are separated by whitespace or comma, except when values are |
|
223 | List values are separated by whitespace or comma, except when values are | |
224 | placed in double quotation marks:: |
|
224 | placed in double quotation marks:: | |
225 |
|
225 | |||
226 | allow_read = "John Doe, PhD", brian, betty |
|
226 | allow_read = "John Doe, PhD", brian, betty | |
227 |
|
227 | |||
228 | Quotation marks can be escaped by prefixing them with a backslash. Only |
|
228 | Quotation marks can be escaped by prefixing them with a backslash. Only | |
229 | quotation marks at the beginning of a word is counted as a quotation |
|
229 | quotation marks at the beginning of a word is counted as a quotation | |
230 | (e.g., ``foo"bar baz`` is the list of ``foo"bar`` and ``baz``). |
|
230 | (e.g., ``foo"bar baz`` is the list of ``foo"bar`` and ``baz``). | |
231 |
|
231 | |||
232 | Sections |
|
232 | Sections | |
233 | ======== |
|
233 | ======== | |
234 |
|
234 | |||
235 | This section describes the different sections that may appear in a |
|
235 | This section describes the different sections that may appear in a | |
236 | Mercurial configuration file, the purpose of each section, its possible |
|
236 | Mercurial configuration file, the purpose of each section, its possible | |
237 | keys, and their possible values. |
|
237 | keys, and their possible values. | |
238 |
|
238 | |||
239 | ``alias`` |
|
239 | ``alias`` | |
240 | --------- |
|
240 | --------- | |
241 |
|
241 | |||
242 | Defines command aliases. |
|
242 | Defines command aliases. | |
243 |
|
243 | |||
244 | Aliases allow you to define your own commands in terms of other |
|
244 | Aliases allow you to define your own commands in terms of other | |
245 | commands (or aliases), optionally including arguments. Positional |
|
245 | commands (or aliases), optionally including arguments. Positional | |
246 | arguments in the form of ``$1``, ``$2``, etc. in the alias definition |
|
246 | arguments in the form of ``$1``, ``$2``, etc. in the alias definition | |
247 | are expanded by Mercurial before execution. Positional arguments not |
|
247 | are expanded by Mercurial before execution. Positional arguments not | |
248 | already used by ``$N`` in the definition are put at the end of the |
|
248 | already used by ``$N`` in the definition are put at the end of the | |
249 | command to be executed. |
|
249 | command to be executed. | |
250 |
|
250 | |||
251 | Alias definitions consist of lines of the form:: |
|
251 | Alias definitions consist of lines of the form:: | |
252 |
|
252 | |||
253 | <alias> = <command> [<argument>]... |
|
253 | <alias> = <command> [<argument>]... | |
254 |
|
254 | |||
255 | For example, this definition:: |
|
255 | For example, this definition:: | |
256 |
|
256 | |||
257 | latest = log --limit 5 |
|
257 | latest = log --limit 5 | |
258 |
|
258 | |||
259 | creates a new command ``latest`` that shows only the five most recent |
|
259 | creates a new command ``latest`` that shows only the five most recent | |
260 | changesets. You can define subsequent aliases using earlier ones:: |
|
260 | changesets. You can define subsequent aliases using earlier ones:: | |
261 |
|
261 | |||
262 | stable5 = latest -b stable |
|
262 | stable5 = latest -b stable | |
263 |
|
263 | |||
264 | .. note:: |
|
264 | .. note:: | |
265 |
|
265 | |||
266 | It is possible to create aliases with the same names as |
|
266 | It is possible to create aliases with the same names as | |
267 | existing commands, which will then override the original |
|
267 | existing commands, which will then override the original | |
268 | definitions. This is almost always a bad idea! |
|
268 | definitions. This is almost always a bad idea! | |
269 |
|
269 | |||
270 | An alias can start with an exclamation point (``!``) to make it a |
|
270 | An alias can start with an exclamation point (``!``) to make it a | |
271 | shell alias. A shell alias is executed with the shell and will let you |
|
271 | shell alias. A shell alias is executed with the shell and will let you | |
272 | run arbitrary commands. As an example, :: |
|
272 | run arbitrary commands. As an example, :: | |
273 |
|
273 | |||
274 | echo = !echo $@ |
|
274 | echo = !echo $@ | |
275 |
|
275 | |||
276 | will let you do ``hg echo foo`` to have ``foo`` printed in your |
|
276 | will let you do ``hg echo foo`` to have ``foo`` printed in your | |
277 | terminal. A better example might be:: |
|
277 | terminal. A better example might be:: | |
278 |
|
278 | |||
279 | purge = !$HG status --no-status --unknown -0 re: | xargs -0 rm -f |
|
279 | purge = !$HG status --no-status --unknown -0 re: | xargs -0 rm -f | |
280 |
|
280 | |||
281 | which will make ``hg purge`` delete all unknown files in the |
|
281 | which will make ``hg purge`` delete all unknown files in the | |
282 | repository in the same manner as the purge extension. |
|
282 | repository in the same manner as the purge extension. | |
283 |
|
283 | |||
284 | Positional arguments like ``$1``, ``$2``, etc. in the alias definition |
|
284 | Positional arguments like ``$1``, ``$2``, etc. in the alias definition | |
285 | expand to the command arguments. Unmatched arguments are |
|
285 | expand to the command arguments. Unmatched arguments are | |
286 | removed. ``$0`` expands to the alias name and ``$@`` expands to all |
|
286 | removed. ``$0`` expands to the alias name and ``$@`` expands to all | |
287 | arguments separated by a space. ``"$@"`` (with quotes) expands to all |
|
287 | arguments separated by a space. ``"$@"`` (with quotes) expands to all | |
288 | arguments quoted individually and separated by a space. These expansions |
|
288 | arguments quoted individually and separated by a space. These expansions | |
289 | happen before the command is passed to the shell. |
|
289 | happen before the command is passed to the shell. | |
290 |
|
290 | |||
291 | Shell aliases are executed in an environment where ``$HG`` expands to |
|
291 | Shell aliases are executed in an environment where ``$HG`` expands to | |
292 | the path of the Mercurial that was used to execute the alias. This is |
|
292 | the path of the Mercurial that was used to execute the alias. This is | |
293 | useful when you want to call further Mercurial commands in a shell |
|
293 | useful when you want to call further Mercurial commands in a shell | |
294 | alias, as was done above for the purge alias. In addition, |
|
294 | alias, as was done above for the purge alias. In addition, | |
295 | ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg |
|
295 | ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg | |
296 | echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``. |
|
296 | echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``. | |
297 |
|
297 | |||
298 | .. note:: |
|
298 | .. note:: | |
299 |
|
299 | |||
300 | Some global configuration options such as ``-R`` are |
|
300 | Some global configuration options such as ``-R`` are | |
301 | processed before shell aliases and will thus not be passed to |
|
301 | processed before shell aliases and will thus not be passed to | |
302 | aliases. |
|
302 | aliases. | |
303 |
|
303 | |||
304 |
|
304 | |||
305 | ``annotate`` |
|
305 | ``annotate`` | |
306 | ------------ |
|
306 | ------------ | |
307 |
|
307 | |||
308 | Settings used when displaying file annotations. All values are |
|
308 | Settings used when displaying file annotations. All values are | |
309 | Booleans and default to False. See :hg:`help config.diff` for |
|
309 | Booleans and default to False. See :hg:`help config.diff` for | |
310 | related options for the diff command. |
|
310 | related options for the diff command. | |
311 |
|
311 | |||
312 | ``ignorews`` |
|
312 | ``ignorews`` | |
313 | Ignore white space when comparing lines. |
|
313 | Ignore white space when comparing lines. | |
314 |
|
314 | |||
315 | ``ignorewseol`` |
|
315 | ``ignorewseol`` | |
316 | Ignore white space at the end of a line when comparing lines. |
|
316 | Ignore white space at the end of a line when comparing lines. | |
317 |
|
317 | |||
318 | ``ignorewsamount`` |
|
318 | ``ignorewsamount`` | |
319 | Ignore changes in the amount of white space. |
|
319 | Ignore changes in the amount of white space. | |
320 |
|
320 | |||
321 | ``ignoreblanklines`` |
|
321 | ``ignoreblanklines`` | |
322 | Ignore changes whose lines are all blank. |
|
322 | Ignore changes whose lines are all blank. | |
323 |
|
323 | |||
324 |
|
324 | |||
325 | ``auth`` |
|
325 | ``auth`` | |
326 | -------- |
|
326 | -------- | |
327 |
|
327 | |||
328 | Authentication credentials and other authentication-like configuration |
|
328 | Authentication credentials and other authentication-like configuration | |
329 | for HTTP connections. This section allows you to store usernames and |
|
329 | for HTTP connections. This section allows you to store usernames and | |
330 | passwords for use when logging *into* HTTP servers. See |
|
330 | passwords for use when logging *into* HTTP servers. See | |
331 | :hg:`help config.web` if you want to configure *who* can login to |
|
331 | :hg:`help config.web` if you want to configure *who* can login to | |
332 | your HTTP server. |
|
332 | your HTTP server. | |
333 |
|
333 | |||
334 | The following options apply to all hosts. |
|
334 | The following options apply to all hosts. | |
335 |
|
335 | |||
336 | ``cookiefile`` |
|
336 | ``cookiefile`` | |
337 | Path to a file containing HTTP cookie lines. Cookies matching a |
|
337 | Path to a file containing HTTP cookie lines. Cookies matching a | |
338 | host will be sent automatically. |
|
338 | host will be sent automatically. | |
339 |
|
339 | |||
340 | The file format uses the Mozilla cookies.txt format, which defines cookies |
|
340 | The file format uses the Mozilla cookies.txt format, which defines cookies | |
341 | on their own lines. Each line contains 7 fields delimited by the tab |
|
341 | on their own lines. Each line contains 7 fields delimited by the tab | |
342 | character (domain, is_domain_cookie, path, is_secure, expires, name, |
|
342 | character (domain, is_domain_cookie, path, is_secure, expires, name, | |
343 | value). For more info, do an Internet search for "Netscape cookies.txt |
|
343 | value). For more info, do an Internet search for "Netscape cookies.txt | |
344 | format." |
|
344 | format." | |
345 |
|
345 | |||
346 | Note: the cookies parser does not handle port numbers on domains. You |
|
346 | Note: the cookies parser does not handle port numbers on domains. You | |
347 | will need to remove ports from the domain for the cookie to be recognized. |
|
347 | will need to remove ports from the domain for the cookie to be recognized. | |
348 | This could result in a cookie being disclosed to an unwanted server. |
|
348 | This could result in a cookie being disclosed to an unwanted server. | |
349 |
|
349 | |||
350 | The cookies file is read-only. |
|
350 | The cookies file is read-only. | |
351 |
|
351 | |||
352 | Other options in this section are grouped by name and have the following |
|
352 | Other options in this section are grouped by name and have the following | |
353 | format:: |
|
353 | format:: | |
354 |
|
354 | |||
355 | <name>.<argument> = <value> |
|
355 | <name>.<argument> = <value> | |
356 |
|
356 | |||
357 | where ``<name>`` is used to group arguments into authentication |
|
357 | where ``<name>`` is used to group arguments into authentication | |
358 | entries. Example:: |
|
358 | entries. Example:: | |
359 |
|
359 | |||
360 | foo.prefix = hg.intevation.de/mercurial |
|
360 | foo.prefix = hg.intevation.de/mercurial | |
361 | foo.username = foo |
|
361 | foo.username = foo | |
362 | foo.password = bar |
|
362 | foo.password = bar | |
363 | foo.schemes = http https |
|
363 | foo.schemes = http https | |
364 |
|
364 | |||
365 | bar.prefix = secure.example.org |
|
365 | bar.prefix = secure.example.org | |
366 | bar.key = path/to/file.key |
|
366 | bar.key = path/to/file.key | |
367 | bar.cert = path/to/file.cert |
|
367 | bar.cert = path/to/file.cert | |
368 | bar.schemes = https |
|
368 | bar.schemes = https | |
369 |
|
369 | |||
370 | Supported arguments: |
|
370 | Supported arguments: | |
371 |
|
371 | |||
372 | ``prefix`` |
|
372 | ``prefix`` | |
373 | Either ``*`` or a URI prefix with or without the scheme part. |
|
373 | Either ``*`` or a URI prefix with or without the scheme part. | |
374 | The authentication entry with the longest matching prefix is used |
|
374 | The authentication entry with the longest matching prefix is used | |
375 | (where ``*`` matches everything and counts as a match of length |
|
375 | (where ``*`` matches everything and counts as a match of length | |
376 | 1). If the prefix doesn't include a scheme, the match is performed |
|
376 | 1). If the prefix doesn't include a scheme, the match is performed | |
377 | against the URI with its scheme stripped as well, and the schemes |
|
377 | against the URI with its scheme stripped as well, and the schemes | |
378 | argument, q.v., is then subsequently consulted. |
|
378 | argument, q.v., is then subsequently consulted. | |
379 |
|
379 | |||
380 | ``username`` |
|
380 | ``username`` | |
381 | Optional. Username to authenticate with. If not given, and the |
|
381 | Optional. Username to authenticate with. If not given, and the | |
382 | remote site requires basic or digest authentication, the user will |
|
382 | remote site requires basic or digest authentication, the user will | |
383 | be prompted for it. Environment variables are expanded in the |
|
383 | be prompted for it. Environment variables are expanded in the | |
384 | username letting you do ``foo.username = $USER``. If the URI |
|
384 | username letting you do ``foo.username = $USER``. If the URI | |
385 | includes a username, only ``[auth]`` entries with a matching |
|
385 | includes a username, only ``[auth]`` entries with a matching | |
386 | username or without a username will be considered. |
|
386 | username or without a username will be considered. | |
387 |
|
387 | |||
388 | ``password`` |
|
388 | ``password`` | |
389 | Optional. Password to authenticate with. If not given, and the |
|
389 | Optional. Password to authenticate with. If not given, and the | |
390 | remote site requires basic or digest authentication, the user |
|
390 | remote site requires basic or digest authentication, the user | |
391 | will be prompted for it. |
|
391 | will be prompted for it. | |
392 |
|
392 | |||
393 | ``key`` |
|
393 | ``key`` | |
394 | Optional. PEM encoded client certificate key file. Environment |
|
394 | Optional. PEM encoded client certificate key file. Environment | |
395 | variables are expanded in the filename. |
|
395 | variables are expanded in the filename. | |
396 |
|
396 | |||
397 | ``cert`` |
|
397 | ``cert`` | |
398 | Optional. PEM encoded client certificate chain file. Environment |
|
398 | Optional. PEM encoded client certificate chain file. Environment | |
399 | variables are expanded in the filename. |
|
399 | variables are expanded in the filename. | |
400 |
|
400 | |||
401 | ``schemes`` |
|
401 | ``schemes`` | |
402 | Optional. Space separated list of URI schemes to use this |
|
402 | Optional. Space separated list of URI schemes to use this | |
403 | authentication entry with. Only used if the prefix doesn't include |
|
403 | authentication entry with. Only used if the prefix doesn't include | |
404 | a scheme. Supported schemes are http and https. They will match |
|
404 | a scheme. Supported schemes are http and https. They will match | |
405 | static-http and static-https respectively, as well. |
|
405 | static-http and static-https respectively, as well. | |
406 | (default: https) |
|
406 | (default: https) | |
407 |
|
407 | |||
408 | If no suitable authentication entry is found, the user is prompted |
|
408 | If no suitable authentication entry is found, the user is prompted | |
409 | for credentials as usual if required by the remote. |
|
409 | for credentials as usual if required by the remote. | |
410 |
|
410 | |||
411 | ``cmdserver`` |
|
411 | ``cmdserver`` | |
412 | ------------- |
|
412 | ------------- | |
413 |
|
413 | |||
414 | Controls command server settings. (ADVANCED) |
|
414 | Controls command server settings. (ADVANCED) | |
415 |
|
415 | |||
416 | ``message-encodings`` |
|
416 | ``message-encodings`` | |
417 | List of encodings for the ``m`` (message) channel. The first encoding |
|
417 | List of encodings for the ``m`` (message) channel. The first encoding | |
418 | supported by the server will be selected and advertised in the hello |
|
418 | supported by the server will be selected and advertised in the hello | |
419 | message. This is useful only when ``ui.message-output`` is set to |
|
419 | message. This is useful only when ``ui.message-output`` is set to | |
420 | ``channel``. Supported encodings are ``cbor``. |
|
420 | ``channel``. Supported encodings are ``cbor``. | |
421 |
|
421 | |||
422 | ``shutdown-on-interrupt`` |
|
422 | ``shutdown-on-interrupt`` | |
423 | If set to false, the server's main loop will continue running after |
|
423 | If set to false, the server's main loop will continue running after | |
424 | SIGINT received. ``runcommand`` requests can still be interrupted by |
|
424 | SIGINT received. ``runcommand`` requests can still be interrupted by | |
425 | SIGINT. Close the write end of the pipe to shut down the server |
|
425 | SIGINT. Close the write end of the pipe to shut down the server | |
426 | process gracefully. |
|
426 | process gracefully. | |
427 | (default: True) |
|
427 | (default: True) | |
428 |
|
428 | |||
429 | ``color`` |
|
429 | ``color`` | |
430 | --------- |
|
430 | --------- | |
431 |
|
431 | |||
432 | Configure the Mercurial color mode. For details about how to define your custom |
|
432 | Configure the Mercurial color mode. For details about how to define your custom | |
433 | effect and style see :hg:`help color`. |
|
433 | effect and style see :hg:`help color`. | |
434 |
|
434 | |||
435 | ``mode`` |
|
435 | ``mode`` | |
436 | String: control the method used to output color. One of ``auto``, ``ansi``, |
|
436 | String: control the method used to output color. One of ``auto``, ``ansi``, | |
437 | ``win32``, ``terminfo`` or ``debug``. In auto mode, Mercurial will |
|
437 | ``win32``, ``terminfo`` or ``debug``. In auto mode, Mercurial will | |
438 | use ANSI mode by default (or win32 mode prior to Windows 10) if it detects a |
|
438 | use ANSI mode by default (or win32 mode prior to Windows 10) if it detects a | |
439 | terminal. Any invalid value will disable color. |
|
439 | terminal. Any invalid value will disable color. | |
440 |
|
440 | |||
441 | ``pagermode`` |
|
441 | ``pagermode`` | |
442 | String: optional override of ``color.mode`` used with pager. |
|
442 | String: optional override of ``color.mode`` used with pager. | |
443 |
|
443 | |||
444 | On some systems, terminfo mode may cause problems when using |
|
444 | On some systems, terminfo mode may cause problems when using | |
445 | color with ``less -R`` as a pager program. less with the -R option |
|
445 | color with ``less -R`` as a pager program. less with the -R option | |
446 | will only display ECMA-48 color codes, and terminfo mode may sometimes |
|
446 | will only display ECMA-48 color codes, and terminfo mode may sometimes | |
447 | emit codes that less doesn't understand. You can work around this by |
|
447 | emit codes that less doesn't understand. You can work around this by | |
448 | either using ansi mode (or auto mode), or by using less -r (which will |
|
448 | either using ansi mode (or auto mode), or by using less -r (which will | |
449 | pass through all terminal control codes, not just color control |
|
449 | pass through all terminal control codes, not just color control | |
450 | codes). |
|
450 | codes). | |
451 |
|
451 | |||
452 | On some systems (such as MSYS in Windows), the terminal may support |
|
452 | On some systems (such as MSYS in Windows), the terminal may support | |
453 | a different color mode than the pager program. |
|
453 | a different color mode than the pager program. | |
454 |
|
454 | |||
455 | ``commands`` |
|
455 | ``commands`` | |
456 | ------------ |
|
456 | ------------ | |
457 |
|
457 | |||
458 | ``commit.post-status`` |
|
458 | ``commit.post-status`` | |
459 | Show status of files in the working directory after successful commit. |
|
459 | Show status of files in the working directory after successful commit. | |
460 | (default: False) |
|
460 | (default: False) | |
461 |
|
461 | |||
462 | ``merge.require-rev`` |
|
462 | ``merge.require-rev`` | |
463 | Require that the revision to merge the current commit with be specified on |
|
463 | Require that the revision to merge the current commit with be specified on | |
464 | the command line. If this is enabled and a revision is not specified, the |
|
464 | the command line. If this is enabled and a revision is not specified, the | |
465 | command aborts. |
|
465 | command aborts. | |
466 | (default: False) |
|
466 | (default: False) | |
467 |
|
467 | |||
468 | ``push.require-revs`` |
|
468 | ``push.require-revs`` | |
469 | Require revisions to push be specified using one or more mechanisms such as |
|
469 | Require revisions to push be specified using one or more mechanisms such as | |
470 | specifying them positionally on the command line, using ``-r``, ``-b``, |
|
470 | specifying them positionally on the command line, using ``-r``, ``-b``, | |
471 | and/or ``-B`` on the command line, or using ``paths.<path>:pushrev`` in the |
|
471 | and/or ``-B`` on the command line, or using ``paths.<path>:pushrev`` in the | |
472 | configuration. If this is enabled and revisions are not specified, the |
|
472 | configuration. If this is enabled and revisions are not specified, the | |
473 | command aborts. |
|
473 | command aborts. | |
474 | (default: False) |
|
474 | (default: False) | |
475 |
|
475 | |||
476 | ``resolve.confirm`` |
|
476 | ``resolve.confirm`` | |
477 | Confirm before performing action if no filename is passed. |
|
477 | Confirm before performing action if no filename is passed. | |
478 | (default: False) |
|
478 | (default: False) | |
479 |
|
479 | |||
480 | ``resolve.explicit-re-merge`` |
|
480 | ``resolve.explicit-re-merge`` | |
481 | Require uses of ``hg resolve`` to specify which action it should perform, |
|
481 | Require uses of ``hg resolve`` to specify which action it should perform, | |
482 | instead of re-merging files by default. |
|
482 | instead of re-merging files by default. | |
483 | (default: False) |
|
483 | (default: False) | |
484 |
|
484 | |||
485 | ``resolve.mark-check`` |
|
485 | ``resolve.mark-check`` | |
486 | Determines what level of checking :hg:`resolve --mark` will perform before |
|
486 | Determines what level of checking :hg:`resolve --mark` will perform before | |
487 | marking files as resolved. Valid values are ``none`, ``warn``, and |
|
487 | marking files as resolved. Valid values are ``none`, ``warn``, and | |
488 | ``abort``. ``warn`` will output a warning listing the file(s) that still |
|
488 | ``abort``. ``warn`` will output a warning listing the file(s) that still | |
489 | have conflict markers in them, but will still mark everything resolved. |
|
489 | have conflict markers in them, but will still mark everything resolved. | |
490 | ``abort`` will output the same warning but will not mark things as resolved. |
|
490 | ``abort`` will output the same warning but will not mark things as resolved. | |
491 | If --all is passed and this is set to ``abort``, only a warning will be |
|
491 | If --all is passed and this is set to ``abort``, only a warning will be | |
492 | shown (an error will not be raised). |
|
492 | shown (an error will not be raised). | |
493 | (default: ``none``) |
|
493 | (default: ``none``) | |
494 |
|
494 | |||
495 | ``status.relative`` |
|
495 | ``status.relative`` | |
496 | Make paths in :hg:`status` output relative to the current directory. |
|
496 | Make paths in :hg:`status` output relative to the current directory. | |
497 | (default: False) |
|
497 | (default: False) | |
498 |
|
498 | |||
499 | ``status.terse`` |
|
499 | ``status.terse`` | |
500 | Default value for the --terse flag, which condenses status output. |
|
500 | Default value for the --terse flag, which condenses status output. | |
501 | (default: empty) |
|
501 | (default: empty) | |
502 |
|
502 | |||
503 | ``update.check`` |
|
503 | ``update.check`` | |
504 | Determines what level of checking :hg:`update` will perform before moving |
|
504 | Determines what level of checking :hg:`update` will perform before moving | |
505 | to a destination revision. Valid values are ``abort``, ``none``, |
|
505 | to a destination revision. Valid values are ``abort``, ``none``, | |
506 | ``linear``, and ``noconflict``. ``abort`` always fails if the working |
|
506 | ``linear``, and ``noconflict``. ``abort`` always fails if the working | |
507 | directory has uncommitted changes. ``none`` performs no checking, and may |
|
507 | directory has uncommitted changes. ``none`` performs no checking, and may | |
508 | result in a merge with uncommitted changes. ``linear`` allows any update |
|
508 | result in a merge with uncommitted changes. ``linear`` allows any update | |
509 | as long as it follows a straight line in the revision history, and may |
|
509 | as long as it follows a straight line in the revision history, and may | |
510 | trigger a merge with uncommitted changes. ``noconflict`` will allow any |
|
510 | trigger a merge with uncommitted changes. ``noconflict`` will allow any | |
511 | update which would not trigger a merge with uncommitted changes, if any |
|
511 | update which would not trigger a merge with uncommitted changes, if any | |
512 | are present. |
|
512 | are present. | |
513 | (default: ``linear``) |
|
513 | (default: ``linear``) | |
514 |
|
514 | |||
515 | ``update.requiredest`` |
|
515 | ``update.requiredest`` | |
516 | Require that the user pass a destination when running :hg:`update`. |
|
516 | Require that the user pass a destination when running :hg:`update`. | |
517 | For example, :hg:`update .::` will be allowed, but a plain :hg:`update` |
|
517 | For example, :hg:`update .::` will be allowed, but a plain :hg:`update` | |
518 | will be disallowed. |
|
518 | will be disallowed. | |
519 | (default: False) |
|
519 | (default: False) | |
520 |
|
520 | |||
521 | ``committemplate`` |
|
521 | ``committemplate`` | |
522 | ------------------ |
|
522 | ------------------ | |
523 |
|
523 | |||
524 | ``changeset`` |
|
524 | ``changeset`` | |
525 | String: configuration in this section is used as the template to |
|
525 | String: configuration in this section is used as the template to | |
526 | customize the text shown in the editor when committing. |
|
526 | customize the text shown in the editor when committing. | |
527 |
|
527 | |||
528 | In addition to pre-defined template keywords, commit log specific one |
|
528 | In addition to pre-defined template keywords, commit log specific one | |
529 | below can be used for customization: |
|
529 | below can be used for customization: | |
530 |
|
530 | |||
531 | ``extramsg`` |
|
531 | ``extramsg`` | |
532 | String: Extra message (typically 'Leave message empty to abort |
|
532 | String: Extra message (typically 'Leave message empty to abort | |
533 | commit.'). This may be changed by some commands or extensions. |
|
533 | commit.'). This may be changed by some commands or extensions. | |
534 |
|
534 | |||
535 | For example, the template configuration below shows as same text as |
|
535 | For example, the template configuration below shows as same text as | |
536 | one shown by default:: |
|
536 | one shown by default:: | |
537 |
|
537 | |||
538 | [committemplate] |
|
538 | [committemplate] | |
539 | changeset = {desc}\n\n |
|
539 | changeset = {desc}\n\n | |
540 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
540 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
541 | HG: {extramsg} |
|
541 | HG: {extramsg} | |
542 | HG: -- |
|
542 | HG: -- | |
543 | HG: user: {author}\n{ifeq(p2rev, "-1", "", |
|
543 | HG: user: {author}\n{ifeq(p2rev, "-1", "", | |
544 | "HG: branch merge\n") |
|
544 | "HG: branch merge\n") | |
545 | }HG: branch '{branch}'\n{if(activebookmark, |
|
545 | }HG: branch '{branch}'\n{if(activebookmark, | |
546 | "HG: bookmark '{activebookmark}'\n") }{subrepos % |
|
546 | "HG: bookmark '{activebookmark}'\n") }{subrepos % | |
547 | "HG: subrepo {subrepo}\n" }{file_adds % |
|
547 | "HG: subrepo {subrepo}\n" }{file_adds % | |
548 | "HG: added {file}\n" }{file_mods % |
|
548 | "HG: added {file}\n" }{file_mods % | |
549 | "HG: changed {file}\n" }{file_dels % |
|
549 | "HG: changed {file}\n" }{file_dels % | |
550 | "HG: removed {file}\n" }{if(files, "", |
|
550 | "HG: removed {file}\n" }{if(files, "", | |
551 | "HG: no files changed\n")} |
|
551 | "HG: no files changed\n")} | |
552 |
|
552 | |||
553 | ``diff()`` |
|
553 | ``diff()`` | |
554 | String: show the diff (see :hg:`help templates` for detail) |
|
554 | String: show the diff (see :hg:`help templates` for detail) | |
555 |
|
555 | |||
556 | Sometimes it is helpful to show the diff of the changeset in the editor without |
|
556 | Sometimes it is helpful to show the diff of the changeset in the editor without | |
557 | having to prefix 'HG: ' to each line so that highlighting works correctly. For |
|
557 | having to prefix 'HG: ' to each line so that highlighting works correctly. For | |
558 | this, Mercurial provides a special string which will ignore everything below |
|
558 | this, Mercurial provides a special string which will ignore everything below | |
559 | it:: |
|
559 | it:: | |
560 |
|
560 | |||
561 | HG: ------------------------ >8 ------------------------ |
|
561 | HG: ------------------------ >8 ------------------------ | |
562 |
|
562 | |||
563 | For example, the template configuration below will show the diff below the |
|
563 | For example, the template configuration below will show the diff below the | |
564 | extra message:: |
|
564 | extra message:: | |
565 |
|
565 | |||
566 | [committemplate] |
|
566 | [committemplate] | |
567 | changeset = {desc}\n\n |
|
567 | changeset = {desc}\n\n | |
568 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
568 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
569 | HG: {extramsg} |
|
569 | HG: {extramsg} | |
570 | HG: ------------------------ >8 ------------------------ |
|
570 | HG: ------------------------ >8 ------------------------ | |
571 | HG: Do not touch the line above. |
|
571 | HG: Do not touch the line above. | |
572 | HG: Everything below will be removed. |
|
572 | HG: Everything below will be removed. | |
573 | {diff()} |
|
573 | {diff()} | |
574 |
|
574 | |||
575 | .. note:: |
|
575 | .. note:: | |
576 |
|
576 | |||
577 | For some problematic encodings (see :hg:`help win32mbcs` for |
|
577 | For some problematic encodings (see :hg:`help win32mbcs` for | |
578 | detail), this customization should be configured carefully, to |
|
578 | detail), this customization should be configured carefully, to | |
579 | avoid showing broken characters. |
|
579 | avoid showing broken characters. | |
580 |
|
580 | |||
581 | For example, if a multibyte character ending with backslash (0x5c) is |
|
581 | For example, if a multibyte character ending with backslash (0x5c) is | |
582 | followed by the ASCII character 'n' in the customized template, |
|
582 | followed by the ASCII character 'n' in the customized template, | |
583 | the sequence of backslash and 'n' is treated as line-feed unexpectedly |
|
583 | the sequence of backslash and 'n' is treated as line-feed unexpectedly | |
584 | (and the multibyte character is broken, too). |
|
584 | (and the multibyte character is broken, too). | |
585 |
|
585 | |||
586 | Customized template is used for commands below (``--edit`` may be |
|
586 | Customized template is used for commands below (``--edit`` may be | |
587 | required): |
|
587 | required): | |
588 |
|
588 | |||
589 | - :hg:`backout` |
|
589 | - :hg:`backout` | |
590 | - :hg:`commit` |
|
590 | - :hg:`commit` | |
591 | - :hg:`fetch` (for merge commit only) |
|
591 | - :hg:`fetch` (for merge commit only) | |
592 | - :hg:`graft` |
|
592 | - :hg:`graft` | |
593 | - :hg:`histedit` |
|
593 | - :hg:`histedit` | |
594 | - :hg:`import` |
|
594 | - :hg:`import` | |
595 | - :hg:`qfold`, :hg:`qnew` and :hg:`qrefresh` |
|
595 | - :hg:`qfold`, :hg:`qnew` and :hg:`qrefresh` | |
596 | - :hg:`rebase` |
|
596 | - :hg:`rebase` | |
597 | - :hg:`shelve` |
|
597 | - :hg:`shelve` | |
598 | - :hg:`sign` |
|
598 | - :hg:`sign` | |
599 | - :hg:`tag` |
|
599 | - :hg:`tag` | |
600 | - :hg:`transplant` |
|
600 | - :hg:`transplant` | |
601 |
|
601 | |||
602 | Configuring items below instead of ``changeset`` allows showing |
|
602 | Configuring items below instead of ``changeset`` allows showing | |
603 | customized message only for specific actions, or showing different |
|
603 | customized message only for specific actions, or showing different | |
604 | messages for each action. |
|
604 | messages for each action. | |
605 |
|
605 | |||
606 | - ``changeset.backout`` for :hg:`backout` |
|
606 | - ``changeset.backout`` for :hg:`backout` | |
607 | - ``changeset.commit.amend.merge`` for :hg:`commit --amend` on merges |
|
607 | - ``changeset.commit.amend.merge`` for :hg:`commit --amend` on merges | |
608 | - ``changeset.commit.amend.normal`` for :hg:`commit --amend` on other |
|
608 | - ``changeset.commit.amend.normal`` for :hg:`commit --amend` on other | |
609 | - ``changeset.commit.normal.merge`` for :hg:`commit` on merges |
|
609 | - ``changeset.commit.normal.merge`` for :hg:`commit` on merges | |
610 | - ``changeset.commit.normal.normal`` for :hg:`commit` on other |
|
610 | - ``changeset.commit.normal.normal`` for :hg:`commit` on other | |
611 | - ``changeset.fetch`` for :hg:`fetch` (impling merge commit) |
|
611 | - ``changeset.fetch`` for :hg:`fetch` (impling merge commit) | |
612 | - ``changeset.gpg.sign`` for :hg:`sign` |
|
612 | - ``changeset.gpg.sign`` for :hg:`sign` | |
613 | - ``changeset.graft`` for :hg:`graft` |
|
613 | - ``changeset.graft`` for :hg:`graft` | |
614 | - ``changeset.histedit.edit`` for ``edit`` of :hg:`histedit` |
|
614 | - ``changeset.histedit.edit`` for ``edit`` of :hg:`histedit` | |
615 | - ``changeset.histedit.fold`` for ``fold`` of :hg:`histedit` |
|
615 | - ``changeset.histedit.fold`` for ``fold`` of :hg:`histedit` | |
616 | - ``changeset.histedit.mess`` for ``mess`` of :hg:`histedit` |
|
616 | - ``changeset.histedit.mess`` for ``mess`` of :hg:`histedit` | |
617 | - ``changeset.histedit.pick`` for ``pick`` of :hg:`histedit` |
|
617 | - ``changeset.histedit.pick`` for ``pick`` of :hg:`histedit` | |
618 | - ``changeset.import.bypass`` for :hg:`import --bypass` |
|
618 | - ``changeset.import.bypass`` for :hg:`import --bypass` | |
619 | - ``changeset.import.normal.merge`` for :hg:`import` on merges |
|
619 | - ``changeset.import.normal.merge`` for :hg:`import` on merges | |
620 | - ``changeset.import.normal.normal`` for :hg:`import` on other |
|
620 | - ``changeset.import.normal.normal`` for :hg:`import` on other | |
621 | - ``changeset.mq.qnew`` for :hg:`qnew` |
|
621 | - ``changeset.mq.qnew`` for :hg:`qnew` | |
622 | - ``changeset.mq.qfold`` for :hg:`qfold` |
|
622 | - ``changeset.mq.qfold`` for :hg:`qfold` | |
623 | - ``changeset.mq.qrefresh`` for :hg:`qrefresh` |
|
623 | - ``changeset.mq.qrefresh`` for :hg:`qrefresh` | |
624 | - ``changeset.rebase.collapse`` for :hg:`rebase --collapse` |
|
624 | - ``changeset.rebase.collapse`` for :hg:`rebase --collapse` | |
625 | - ``changeset.rebase.merge`` for :hg:`rebase` on merges |
|
625 | - ``changeset.rebase.merge`` for :hg:`rebase` on merges | |
626 | - ``changeset.rebase.normal`` for :hg:`rebase` on other |
|
626 | - ``changeset.rebase.normal`` for :hg:`rebase` on other | |
627 | - ``changeset.shelve.shelve`` for :hg:`shelve` |
|
627 | - ``changeset.shelve.shelve`` for :hg:`shelve` | |
628 | - ``changeset.tag.add`` for :hg:`tag` without ``--remove`` |
|
628 | - ``changeset.tag.add`` for :hg:`tag` without ``--remove`` | |
629 | - ``changeset.tag.remove`` for :hg:`tag --remove` |
|
629 | - ``changeset.tag.remove`` for :hg:`tag --remove` | |
630 | - ``changeset.transplant.merge`` for :hg:`transplant` on merges |
|
630 | - ``changeset.transplant.merge`` for :hg:`transplant` on merges | |
631 | - ``changeset.transplant.normal`` for :hg:`transplant` on other |
|
631 | - ``changeset.transplant.normal`` for :hg:`transplant` on other | |
632 |
|
632 | |||
633 | These dot-separated lists of names are treated as hierarchical ones. |
|
633 | These dot-separated lists of names are treated as hierarchical ones. | |
634 | For example, ``changeset.tag.remove`` customizes the commit message |
|
634 | For example, ``changeset.tag.remove`` customizes the commit message | |
635 | only for :hg:`tag --remove`, but ``changeset.tag`` customizes the |
|
635 | only for :hg:`tag --remove`, but ``changeset.tag`` customizes the | |
636 | commit message for :hg:`tag` regardless of ``--remove`` option. |
|
636 | commit message for :hg:`tag` regardless of ``--remove`` option. | |
637 |
|
637 | |||
638 | When the external editor is invoked for a commit, the corresponding |
|
638 | When the external editor is invoked for a commit, the corresponding | |
639 | dot-separated list of names without the ``changeset.`` prefix |
|
639 | dot-separated list of names without the ``changeset.`` prefix | |
640 | (e.g. ``commit.normal.normal``) is in the ``HGEDITFORM`` environment |
|
640 | (e.g. ``commit.normal.normal``) is in the ``HGEDITFORM`` environment | |
641 | variable. |
|
641 | variable. | |
642 |
|
642 | |||
643 | In this section, items other than ``changeset`` can be referred from |
|
643 | In this section, items other than ``changeset`` can be referred from | |
644 | others. For example, the configuration to list committed files up |
|
644 | others. For example, the configuration to list committed files up | |
645 | below can be referred as ``{listupfiles}``:: |
|
645 | below can be referred as ``{listupfiles}``:: | |
646 |
|
646 | |||
647 | [committemplate] |
|
647 | [committemplate] | |
648 | listupfiles = {file_adds % |
|
648 | listupfiles = {file_adds % | |
649 | "HG: added {file}\n" }{file_mods % |
|
649 | "HG: added {file}\n" }{file_mods % | |
650 | "HG: changed {file}\n" }{file_dels % |
|
650 | "HG: changed {file}\n" }{file_dels % | |
651 | "HG: removed {file}\n" }{if(files, "", |
|
651 | "HG: removed {file}\n" }{if(files, "", | |
652 | "HG: no files changed\n")} |
|
652 | "HG: no files changed\n")} | |
653 |
|
653 | |||
654 | ``decode/encode`` |
|
654 | ``decode/encode`` | |
655 | ----------------- |
|
655 | ----------------- | |
656 |
|
656 | |||
657 | Filters for transforming files on checkout/checkin. This would |
|
657 | Filters for transforming files on checkout/checkin. This would | |
658 | typically be used for newline processing or other |
|
658 | typically be used for newline processing or other | |
659 | localization/canonicalization of files. |
|
659 | localization/canonicalization of files. | |
660 |
|
660 | |||
661 | Filters consist of a filter pattern followed by a filter command. |
|
661 | Filters consist of a filter pattern followed by a filter command. | |
662 | Filter patterns are globs by default, rooted at the repository root. |
|
662 | Filter patterns are globs by default, rooted at the repository root. | |
663 | For example, to match any file ending in ``.txt`` in the root |
|
663 | For example, to match any file ending in ``.txt`` in the root | |
664 | directory only, use the pattern ``*.txt``. To match any file ending |
|
664 | directory only, use the pattern ``*.txt``. To match any file ending | |
665 | in ``.c`` anywhere in the repository, use the pattern ``**.c``. |
|
665 | in ``.c`` anywhere in the repository, use the pattern ``**.c``. | |
666 | For each file only the first matching filter applies. |
|
666 | For each file only the first matching filter applies. | |
667 |
|
667 | |||
668 | The filter command can start with a specifier, either ``pipe:`` or |
|
668 | The filter command can start with a specifier, either ``pipe:`` or | |
669 | ``tempfile:``. If no specifier is given, ``pipe:`` is used by default. |
|
669 | ``tempfile:``. If no specifier is given, ``pipe:`` is used by default. | |
670 |
|
670 | |||
671 | A ``pipe:`` command must accept data on stdin and return the transformed |
|
671 | A ``pipe:`` command must accept data on stdin and return the transformed | |
672 | data on stdout. |
|
672 | data on stdout. | |
673 |
|
673 | |||
674 | Pipe example:: |
|
674 | Pipe example:: | |
675 |
|
675 | |||
676 | [encode] |
|
676 | [encode] | |
677 | # uncompress gzip files on checkin to improve delta compression |
|
677 | # uncompress gzip files on checkin to improve delta compression | |
678 | # note: not necessarily a good idea, just an example |
|
678 | # note: not necessarily a good idea, just an example | |
679 | *.gz = pipe: gunzip |
|
679 | *.gz = pipe: gunzip | |
680 |
|
680 | |||
681 | [decode] |
|
681 | [decode] | |
682 | # recompress gzip files when writing them to the working dir (we |
|
682 | # recompress gzip files when writing them to the working dir (we | |
683 | # can safely omit "pipe:", because it's the default) |
|
683 | # can safely omit "pipe:", because it's the default) | |
684 | *.gz = gzip |
|
684 | *.gz = gzip | |
685 |
|
685 | |||
686 | A ``tempfile:`` command is a template. The string ``INFILE`` is replaced |
|
686 | A ``tempfile:`` command is a template. The string ``INFILE`` is replaced | |
687 | with the name of a temporary file that contains the data to be |
|
687 | with the name of a temporary file that contains the data to be | |
688 | filtered by the command. The string ``OUTFILE`` is replaced with the name |
|
688 | filtered by the command. The string ``OUTFILE`` is replaced with the name | |
689 | of an empty temporary file, where the filtered data must be written by |
|
689 | of an empty temporary file, where the filtered data must be written by | |
690 | the command. |
|
690 | the command. | |
691 |
|
691 | |||
692 | .. container:: windows |
|
692 | .. container:: windows | |
693 |
|
693 | |||
694 | .. note:: |
|
694 | .. note:: | |
695 |
|
695 | |||
696 | The tempfile mechanism is recommended for Windows systems, |
|
696 | The tempfile mechanism is recommended for Windows systems, | |
697 | where the standard shell I/O redirection operators often have |
|
697 | where the standard shell I/O redirection operators often have | |
698 | strange effects and may corrupt the contents of your files. |
|
698 | strange effects and may corrupt the contents of your files. | |
699 |
|
699 | |||
700 | This filter mechanism is used internally by the ``eol`` extension to |
|
700 | This filter mechanism is used internally by the ``eol`` extension to | |
701 | translate line ending characters between Windows (CRLF) and Unix (LF) |
|
701 | translate line ending characters between Windows (CRLF) and Unix (LF) | |
702 | format. We suggest you use the ``eol`` extension for convenience. |
|
702 | format. We suggest you use the ``eol`` extension for convenience. | |
703 |
|
703 | |||
704 |
|
704 | |||
705 | ``defaults`` |
|
705 | ``defaults`` | |
706 | ------------ |
|
706 | ------------ | |
707 |
|
707 | |||
708 | (defaults are deprecated. Don't use them. Use aliases instead.) |
|
708 | (defaults are deprecated. Don't use them. Use aliases instead.) | |
709 |
|
709 | |||
710 | Use the ``[defaults]`` section to define command defaults, i.e. the |
|
710 | Use the ``[defaults]`` section to define command defaults, i.e. the | |
711 | default options/arguments to pass to the specified commands. |
|
711 | default options/arguments to pass to the specified commands. | |
712 |
|
712 | |||
713 | The following example makes :hg:`log` run in verbose mode, and |
|
713 | The following example makes :hg:`log` run in verbose mode, and | |
714 | :hg:`status` show only the modified files, by default:: |
|
714 | :hg:`status` show only the modified files, by default:: | |
715 |
|
715 | |||
716 | [defaults] |
|
716 | [defaults] | |
717 | log = -v |
|
717 | log = -v | |
718 | status = -m |
|
718 | status = -m | |
719 |
|
719 | |||
720 | The actual commands, instead of their aliases, must be used when |
|
720 | The actual commands, instead of their aliases, must be used when | |
721 | defining command defaults. The command defaults will also be applied |
|
721 | defining command defaults. The command defaults will also be applied | |
722 | to the aliases of the commands defined. |
|
722 | to the aliases of the commands defined. | |
723 |
|
723 | |||
724 |
|
724 | |||
725 | ``diff`` |
|
725 | ``diff`` | |
726 | -------- |
|
726 | -------- | |
727 |
|
727 | |||
728 | Settings used when displaying diffs. Everything except for ``unified`` |
|
728 | Settings used when displaying diffs. Everything except for ``unified`` | |
729 | is a Boolean and defaults to False. See :hg:`help config.annotate` |
|
729 | is a Boolean and defaults to False. See :hg:`help config.annotate` | |
730 | for related options for the annotate command. |
|
730 | for related options for the annotate command. | |
731 |
|
731 | |||
732 | ``git`` |
|
732 | ``git`` | |
733 | Use git extended diff format. |
|
733 | Use git extended diff format. | |
734 |
|
734 | |||
735 | ``nobinary`` |
|
735 | ``nobinary`` | |
736 | Omit git binary patches. |
|
736 | Omit git binary patches. | |
737 |
|
737 | |||
738 | ``nodates`` |
|
738 | ``nodates`` | |
739 | Don't include dates in diff headers. |
|
739 | Don't include dates in diff headers. | |
740 |
|
740 | |||
741 | ``noprefix`` |
|
741 | ``noprefix`` | |
742 | Omit 'a/' and 'b/' prefixes from filenames. Ignored in plain mode. |
|
742 | Omit 'a/' and 'b/' prefixes from filenames. Ignored in plain mode. | |
743 |
|
743 | |||
744 | ``showfunc`` |
|
744 | ``showfunc`` | |
745 | Show which function each change is in. |
|
745 | Show which function each change is in. | |
746 |
|
746 | |||
747 | ``ignorews`` |
|
747 | ``ignorews`` | |
748 | Ignore white space when comparing lines. |
|
748 | Ignore white space when comparing lines. | |
749 |
|
749 | |||
750 | ``ignorewsamount`` |
|
750 | ``ignorewsamount`` | |
751 | Ignore changes in the amount of white space. |
|
751 | Ignore changes in the amount of white space. | |
752 |
|
752 | |||
753 | ``ignoreblanklines`` |
|
753 | ``ignoreblanklines`` | |
754 | Ignore changes whose lines are all blank. |
|
754 | Ignore changes whose lines are all blank. | |
755 |
|
755 | |||
756 | ``unified`` |
|
756 | ``unified`` | |
757 | Number of lines of context to show. |
|
757 | Number of lines of context to show. | |
758 |
|
758 | |||
759 | ``word-diff`` |
|
759 | ``word-diff`` | |
760 | Highlight changed words. |
|
760 | Highlight changed words. | |
761 |
|
761 | |||
762 | ``email`` |
|
762 | ``email`` | |
763 | --------- |
|
763 | --------- | |
764 |
|
764 | |||
765 | Settings for extensions that send email messages. |
|
765 | Settings for extensions that send email messages. | |
766 |
|
766 | |||
767 | ``from`` |
|
767 | ``from`` | |
768 | Optional. Email address to use in "From" header and SMTP envelope |
|
768 | Optional. Email address to use in "From" header and SMTP envelope | |
769 | of outgoing messages. |
|
769 | of outgoing messages. | |
770 |
|
770 | |||
771 | ``to`` |
|
771 | ``to`` | |
772 | Optional. Comma-separated list of recipients' email addresses. |
|
772 | Optional. Comma-separated list of recipients' email addresses. | |
773 |
|
773 | |||
774 | ``cc`` |
|
774 | ``cc`` | |
775 | Optional. Comma-separated list of carbon copy recipients' |
|
775 | Optional. Comma-separated list of carbon copy recipients' | |
776 | email addresses. |
|
776 | email addresses. | |
777 |
|
777 | |||
778 | ``bcc`` |
|
778 | ``bcc`` | |
779 | Optional. Comma-separated list of blind carbon copy recipients' |
|
779 | Optional. Comma-separated list of blind carbon copy recipients' | |
780 | email addresses. |
|
780 | email addresses. | |
781 |
|
781 | |||
782 | ``method`` |
|
782 | ``method`` | |
783 | Optional. Method to use to send email messages. If value is ``smtp`` |
|
783 | Optional. Method to use to send email messages. If value is ``smtp`` | |
784 | (default), use SMTP (see the ``[smtp]`` section for configuration). |
|
784 | (default), use SMTP (see the ``[smtp]`` section for configuration). | |
785 | Otherwise, use as name of program to run that acts like sendmail |
|
785 | Otherwise, use as name of program to run that acts like sendmail | |
786 | (takes ``-f`` option for sender, list of recipients on command line, |
|
786 | (takes ``-f`` option for sender, list of recipients on command line, | |
787 | message on stdin). Normally, setting this to ``sendmail`` or |
|
787 | message on stdin). Normally, setting this to ``sendmail`` or | |
788 | ``/usr/sbin/sendmail`` is enough to use sendmail to send messages. |
|
788 | ``/usr/sbin/sendmail`` is enough to use sendmail to send messages. | |
789 |
|
789 | |||
790 | ``charsets`` |
|
790 | ``charsets`` | |
791 | Optional. Comma-separated list of character sets considered |
|
791 | Optional. Comma-separated list of character sets considered | |
792 | convenient for recipients. Addresses, headers, and parts not |
|
792 | convenient for recipients. Addresses, headers, and parts not | |
793 | containing patches of outgoing messages will be encoded in the |
|
793 | containing patches of outgoing messages will be encoded in the | |
794 | first character set to which conversion from local encoding |
|
794 | first character set to which conversion from local encoding | |
795 | (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct |
|
795 | (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct | |
796 | conversion fails, the text in question is sent as is. |
|
796 | conversion fails, the text in question is sent as is. | |
797 | (default: '') |
|
797 | (default: '') | |
798 |
|
798 | |||
799 | Order of outgoing email character sets: |
|
799 | Order of outgoing email character sets: | |
800 |
|
800 | |||
801 | 1. ``us-ascii``: always first, regardless of settings |
|
801 | 1. ``us-ascii``: always first, regardless of settings | |
802 | 2. ``email.charsets``: in order given by user |
|
802 | 2. ``email.charsets``: in order given by user | |
803 | 3. ``ui.fallbackencoding``: if not in email.charsets |
|
803 | 3. ``ui.fallbackencoding``: if not in email.charsets | |
804 | 4. ``$HGENCODING``: if not in email.charsets |
|
804 | 4. ``$HGENCODING``: if not in email.charsets | |
805 | 5. ``utf-8``: always last, regardless of settings |
|
805 | 5. ``utf-8``: always last, regardless of settings | |
806 |
|
806 | |||
807 | Email example:: |
|
807 | Email example:: | |
808 |
|
808 | |||
809 | [email] |
|
809 | [email] | |
810 | from = Joseph User <joe.user@example.com> |
|
810 | from = Joseph User <joe.user@example.com> | |
811 | method = /usr/sbin/sendmail |
|
811 | method = /usr/sbin/sendmail | |
812 | # charsets for western Europeans |
|
812 | # charsets for western Europeans | |
813 | # us-ascii, utf-8 omitted, as they are tried first and last |
|
813 | # us-ascii, utf-8 omitted, as they are tried first and last | |
814 | charsets = iso-8859-1, iso-8859-15, windows-1252 |
|
814 | charsets = iso-8859-1, iso-8859-15, windows-1252 | |
815 |
|
815 | |||
816 |
|
816 | |||
817 | ``extensions`` |
|
817 | ``extensions`` | |
818 | -------------- |
|
818 | -------------- | |
819 |
|
819 | |||
820 | Mercurial has an extension mechanism for adding new features. To |
|
820 | Mercurial has an extension mechanism for adding new features. To | |
821 | enable an extension, create an entry for it in this section. |
|
821 | enable an extension, create an entry for it in this section. | |
822 |
|
822 | |||
823 | If you know that the extension is already in Python's search path, |
|
823 | If you know that the extension is already in Python's search path, | |
824 | you can give the name of the module, followed by ``=``, with nothing |
|
824 | you can give the name of the module, followed by ``=``, with nothing | |
825 | after the ``=``. |
|
825 | after the ``=``. | |
826 |
|
826 | |||
827 | Otherwise, give a name that you choose, followed by ``=``, followed by |
|
827 | Otherwise, give a name that you choose, followed by ``=``, followed by | |
828 | the path to the ``.py`` file (including the file name extension) that |
|
828 | the path to the ``.py`` file (including the file name extension) that | |
829 | defines the extension. |
|
829 | defines the extension. | |
830 |
|
830 | |||
831 | To explicitly disable an extension that is enabled in an hgrc of |
|
831 | To explicitly disable an extension that is enabled in an hgrc of | |
832 | broader scope, prepend its path with ``!``, as in ``foo = !/ext/path`` |
|
832 | broader scope, prepend its path with ``!``, as in ``foo = !/ext/path`` | |
833 | or ``foo = !`` when path is not supplied. |
|
833 | or ``foo = !`` when path is not supplied. | |
834 |
|
834 | |||
835 | Example for ``~/.hgrc``:: |
|
835 | Example for ``~/.hgrc``:: | |
836 |
|
836 | |||
837 | [extensions] |
|
837 | [extensions] | |
838 | # (the churn extension will get loaded from Mercurial's path) |
|
838 | # (the churn extension will get loaded from Mercurial's path) | |
839 | churn = |
|
839 | churn = | |
840 | # (this extension will get loaded from the file specified) |
|
840 | # (this extension will get loaded from the file specified) | |
841 | myfeature = ~/.hgext/myfeature.py |
|
841 | myfeature = ~/.hgext/myfeature.py | |
842 |
|
842 | |||
843 |
|
843 | |||
844 | ``format`` |
|
844 | ``format`` | |
845 | ---------- |
|
845 | ---------- | |
846 |
|
846 | |||
847 | Configuration that controls the repository format. Newer format options are more |
|
847 | Configuration that controls the repository format. Newer format options are more | |
848 | powerful, but incompatible with some older versions of Mercurial. Format options |
|
848 | powerful, but incompatible with some older versions of Mercurial. Format options | |
849 | are considered at repository initialization only. You need to make a new clone |
|
849 | are considered at repository initialization only. You need to make a new clone | |
850 | for config changes to be taken into account. |
|
850 | for config changes to be taken into account. | |
851 |
|
851 | |||
852 | For more details about repository format and version compatibility, see |
|
852 | For more details about repository format and version compatibility, see | |
853 | https://www.mercurial-scm.org/wiki/MissingRequirement |
|
853 | https://www.mercurial-scm.org/wiki/MissingRequirement | |
854 |
|
854 | |||
855 | ``usegeneraldelta`` |
|
855 | ``usegeneraldelta`` | |
856 | Enable or disable the "generaldelta" repository format which improves |
|
856 | Enable or disable the "generaldelta" repository format which improves | |
857 | repository compression by allowing "revlog" to store deltas against |
|
857 | repository compression by allowing "revlog" to store deltas against | |
858 | arbitrary revisions instead of the previously stored one. This provides |
|
858 | arbitrary revisions instead of the previously stored one. This provides | |
859 | significant improvement for repositories with branches. |
|
859 | significant improvement for repositories with branches. | |
860 |
|
860 | |||
861 | Repositories with this on-disk format require Mercurial version 1.9. |
|
861 | Repositories with this on-disk format require Mercurial version 1.9. | |
862 |
|
862 | |||
863 | Enabled by default. |
|
863 | Enabled by default. | |
864 |
|
864 | |||
865 | ``dotencode`` |
|
865 | ``dotencode`` | |
866 | Enable or disable the "dotencode" repository format which enhances |
|
866 | Enable or disable the "dotencode" repository format which enhances | |
867 | the "fncache" repository format (which has to be enabled to use |
|
867 | the "fncache" repository format (which has to be enabled to use | |
868 | dotencode) to avoid issues with filenames starting with "._" on |
|
868 | dotencode) to avoid issues with filenames starting with "._" on | |
869 | Mac OS X and spaces on Windows. |
|
869 | Mac OS X and spaces on Windows. | |
870 |
|
870 | |||
871 | Repositories with this on-disk format require Mercurial version 1.7. |
|
871 | Repositories with this on-disk format require Mercurial version 1.7. | |
872 |
|
872 | |||
873 | Enabled by default. |
|
873 | Enabled by default. | |
874 |
|
874 | |||
875 | ``usefncache`` |
|
875 | ``usefncache`` | |
876 | Enable or disable the "fncache" repository format which enhances |
|
876 | Enable or disable the "fncache" repository format which enhances | |
877 | the "store" repository format (which has to be enabled to use |
|
877 | the "store" repository format (which has to be enabled to use | |
878 | fncache) to allow longer filenames and avoids using Windows |
|
878 | fncache) to allow longer filenames and avoids using Windows | |
879 | reserved names, e.g. "nul". |
|
879 | reserved names, e.g. "nul". | |
880 |
|
880 | |||
881 | Repositories with this on-disk format require Mercurial version 1.1. |
|
881 | Repositories with this on-disk format require Mercurial version 1.1. | |
882 |
|
882 | |||
883 | Enabled by default. |
|
883 | Enabled by default. | |
884 |
|
884 | |||
885 | ``usestore`` |
|
885 | ``usestore`` | |
886 | Enable or disable the "store" repository format which improves |
|
886 | Enable or disable the "store" repository format which improves | |
887 | compatibility with systems that fold case or otherwise mangle |
|
887 | compatibility with systems that fold case or otherwise mangle | |
888 | filenames. Disabling this option will allow you to store longer filenames |
|
888 | filenames. Disabling this option will allow you to store longer filenames | |
889 | in some situations at the expense of compatibility. |
|
889 | in some situations at the expense of compatibility. | |
890 |
|
890 | |||
891 | Repositories with this on-disk format require Mercurial version 0.9.4. |
|
891 | Repositories with this on-disk format require Mercurial version 0.9.4. | |
892 |
|
892 | |||
893 | Enabled by default. |
|
893 | Enabled by default. | |
894 |
|
894 | |||
895 | ``sparse-revlog`` |
|
895 | ``sparse-revlog`` | |
896 | Enable or disable the ``sparse-revlog`` delta strategy. This format improves |
|
896 | Enable or disable the ``sparse-revlog`` delta strategy. This format improves | |
897 | delta re-use inside revlog. For very branchy repositories, it results in a |
|
897 | delta re-use inside revlog. For very branchy repositories, it results in a | |
898 | smaller store. For repositories with many revisions, it also helps |
|
898 | smaller store. For repositories with many revisions, it also helps | |
899 | performance (by using shortened delta chains.) |
|
899 | performance (by using shortened delta chains.) | |
900 |
|
900 | |||
901 | Repositories with this on-disk format require Mercurial version 4.7 |
|
901 | Repositories with this on-disk format require Mercurial version 4.7 | |
902 |
|
902 | |||
903 | Enabled by default. |
|
903 | Enabled by default. | |
904 |
|
904 | |||
905 | ``revlog-compression`` |
|
905 | ``revlog-compression`` | |
906 | Compression algorithm used by revlog. Supported values are `zlib` and |
|
906 | Compression algorithm used by revlog. Supported values are `zlib` and | |
907 | `zstd`. The `zlib` engine is the historical default of Mercurial. `zstd` is |
|
907 | `zstd`. The `zlib` engine is the historical default of Mercurial. `zstd` is | |
908 | a newer format that is usually a net win over `zlib`, operating faster at |
|
908 | a newer format that is usually a net win over `zlib`, operating faster at | |
909 | better compression rates. Use `zstd` to reduce CPU usage. Multiple values |
|
909 | better compression rates. Use `zstd` to reduce CPU usage. Multiple values | |
910 | can be specified, the first available one will be used. |
|
910 | can be specified, the first available one will be used. | |
911 |
|
911 | |||
912 | On some systems, the Mercurial installation may lack `zstd` support. |
|
912 | On some systems, the Mercurial installation may lack `zstd` support. | |
913 |
|
913 | |||
914 | Default is `zlib`. |
|
914 | Default is `zlib`. | |
915 |
|
915 | |||
916 | ``bookmarks-in-store`` |
|
916 | ``bookmarks-in-store`` | |
917 | Store bookmarks in .hg/store/. This means that bookmarks are shared when |
|
917 | Store bookmarks in .hg/store/. This means that bookmarks are shared when | |
918 | using `hg share` regardless of the `-B` option. |
|
918 | using `hg share` regardless of the `-B` option. | |
919 |
|
919 | |||
920 | Repositories with this on-disk format require Mercurial version 5.1. |
|
920 | Repositories with this on-disk format require Mercurial version 5.1. | |
921 |
|
921 | |||
922 | Disabled by default. |
|
922 | Disabled by default. | |
923 |
|
923 | |||
924 |
|
924 | |||
925 | ``graph`` |
|
925 | ``graph`` | |
926 | --------- |
|
926 | --------- | |
927 |
|
927 | |||
928 | Web graph view configuration. This section let you change graph |
|
928 | Web graph view configuration. This section let you change graph | |
929 | elements display properties by branches, for instance to make the |
|
929 | elements display properties by branches, for instance to make the | |
930 | ``default`` branch stand out. |
|
930 | ``default`` branch stand out. | |
931 |
|
931 | |||
932 | Each line has the following format:: |
|
932 | Each line has the following format:: | |
933 |
|
933 | |||
934 | <branch>.<argument> = <value> |
|
934 | <branch>.<argument> = <value> | |
935 |
|
935 | |||
936 | where ``<branch>`` is the name of the branch being |
|
936 | where ``<branch>`` is the name of the branch being | |
937 | customized. Example:: |
|
937 | customized. Example:: | |
938 |
|
938 | |||
939 | [graph] |
|
939 | [graph] | |
940 | # 2px width |
|
940 | # 2px width | |
941 | default.width = 2 |
|
941 | default.width = 2 | |
942 | # red color |
|
942 | # red color | |
943 | default.color = FF0000 |
|
943 | default.color = FF0000 | |
944 |
|
944 | |||
945 | Supported arguments: |
|
945 | Supported arguments: | |
946 |
|
946 | |||
947 | ``width`` |
|
947 | ``width`` | |
948 | Set branch edges width in pixels. |
|
948 | Set branch edges width in pixels. | |
949 |
|
949 | |||
950 | ``color`` |
|
950 | ``color`` | |
951 | Set branch edges color in hexadecimal RGB notation. |
|
951 | Set branch edges color in hexadecimal RGB notation. | |
952 |
|
952 | |||
953 | ``hooks`` |
|
953 | ``hooks`` | |
954 | --------- |
|
954 | --------- | |
955 |
|
955 | |||
956 | Commands or Python functions that get automatically executed by |
|
956 | Commands or Python functions that get automatically executed by | |
957 | various actions such as starting or finishing a commit. Multiple |
|
957 | various actions such as starting or finishing a commit. Multiple | |
958 | hooks can be run for the same action by appending a suffix to the |
|
958 | hooks can be run for the same action by appending a suffix to the | |
959 | action. Overriding a site-wide hook can be done by changing its |
|
959 | action. Overriding a site-wide hook can be done by changing its | |
960 | value or setting it to an empty string. Hooks can be prioritized |
|
960 | value or setting it to an empty string. Hooks can be prioritized | |
961 | by adding a prefix of ``priority.`` to the hook name on a new line |
|
961 | by adding a prefix of ``priority.`` to the hook name on a new line | |
962 | and setting the priority. The default priority is 0. |
|
962 | and setting the priority. The default priority is 0. | |
963 |
|
963 | |||
964 | Example ``.hg/hgrc``:: |
|
964 | Example ``.hg/hgrc``:: | |
965 |
|
965 | |||
966 | [hooks] |
|
966 | [hooks] | |
967 | # update working directory after adding changesets |
|
967 | # update working directory after adding changesets | |
968 | changegroup.update = hg update |
|
968 | changegroup.update = hg update | |
969 | # do not use the site-wide hook |
|
969 | # do not use the site-wide hook | |
970 | incoming = |
|
970 | incoming = | |
971 | incoming.email = /my/email/hook |
|
971 | incoming.email = /my/email/hook | |
972 | incoming.autobuild = /my/build/hook |
|
972 | incoming.autobuild = /my/build/hook | |
973 | # force autobuild hook to run before other incoming hooks |
|
973 | # force autobuild hook to run before other incoming hooks | |
974 | priority.incoming.autobuild = 1 |
|
974 | priority.incoming.autobuild = 1 | |
975 |
|
975 | |||
976 | Most hooks are run with environment variables set that give useful |
|
976 | Most hooks are run with environment variables set that give useful | |
977 | additional information. For each hook below, the environment variables |
|
977 | additional information. For each hook below, the environment variables | |
978 | it is passed are listed with names in the form ``$HG_foo``. The |
|
978 | it is passed are listed with names in the form ``$HG_foo``. The | |
979 | ``$HG_HOOKTYPE`` and ``$HG_HOOKNAME`` variables are set for all hooks. |
|
979 | ``$HG_HOOKTYPE`` and ``$HG_HOOKNAME`` variables are set for all hooks. | |
980 | They contain the type of hook which triggered the run and the full name |
|
980 | They contain the type of hook which triggered the run and the full name | |
981 | of the hook in the config, respectively. In the example above, this will |
|
981 | of the hook in the config, respectively. In the example above, this will | |
982 | be ``$HG_HOOKTYPE=incoming`` and ``$HG_HOOKNAME=incoming.email``. |
|
982 | be ``$HG_HOOKTYPE=incoming`` and ``$HG_HOOKNAME=incoming.email``. | |
983 |
|
983 | |||
984 | .. container:: windows |
|
984 | .. container:: windows | |
985 |
|
985 | |||
986 | Some basic Unix syntax can be enabled for portability, including ``$VAR`` |
|
986 | Some basic Unix syntax can be enabled for portability, including ``$VAR`` | |
987 | and ``${VAR}`` style variables. A ``~`` followed by ``\`` or ``/`` will |
|
987 | and ``${VAR}`` style variables. A ``~`` followed by ``\`` or ``/`` will | |
988 | be expanded to ``%USERPROFILE%`` to simulate a subset of tilde expansion |
|
988 | be expanded to ``%USERPROFILE%`` to simulate a subset of tilde expansion | |
989 | on Unix. To use a literal ``$`` or ``~``, it must be escaped with a back |
|
989 | on Unix. To use a literal ``$`` or ``~``, it must be escaped with a back | |
990 | slash or inside of a strong quote. Strong quotes will be replaced by |
|
990 | slash or inside of a strong quote. Strong quotes will be replaced by | |
991 | double quotes after processing. |
|
991 | double quotes after processing. | |
992 |
|
992 | |||
993 | This feature is enabled by adding a prefix of ``tonative.`` to the hook |
|
993 | This feature is enabled by adding a prefix of ``tonative.`` to the hook | |
994 | name on a new line, and setting it to ``True``. For example:: |
|
994 | name on a new line, and setting it to ``True``. For example:: | |
995 |
|
995 | |||
996 | [hooks] |
|
996 | [hooks] | |
997 | incoming.autobuild = /my/build/hook |
|
997 | incoming.autobuild = /my/build/hook | |
998 | # enable translation to cmd.exe syntax for autobuild hook |
|
998 | # enable translation to cmd.exe syntax for autobuild hook | |
999 | tonative.incoming.autobuild = True |
|
999 | tonative.incoming.autobuild = True | |
1000 |
|
1000 | |||
1001 | ``changegroup`` |
|
1001 | ``changegroup`` | |
1002 | Run after a changegroup has been added via push, pull or unbundle. The ID of |
|
1002 | Run after a changegroup has been added via push, pull or unbundle. The ID of | |
1003 | the first new changeset is in ``$HG_NODE`` and last is in ``$HG_NODE_LAST``. |
|
1003 | the first new changeset is in ``$HG_NODE`` and last is in ``$HG_NODE_LAST``. | |
1004 | The URL from which changes came is in ``$HG_URL``. |
|
1004 | The URL from which changes came is in ``$HG_URL``. | |
1005 |
|
1005 | |||
1006 | ``commit`` |
|
1006 | ``commit`` | |
1007 | Run after a changeset has been created in the local repository. The ID |
|
1007 | Run after a changeset has been created in the local repository. The ID | |
1008 | of the newly created changeset is in ``$HG_NODE``. Parent changeset |
|
1008 | of the newly created changeset is in ``$HG_NODE``. Parent changeset | |
1009 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
1009 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. | |
1010 |
|
1010 | |||
1011 | ``incoming`` |
|
1011 | ``incoming`` | |
1012 | Run after a changeset has been pulled, pushed, or unbundled into |
|
1012 | Run after a changeset has been pulled, pushed, or unbundled into | |
1013 | the local repository. The ID of the newly arrived changeset is in |
|
1013 | the local repository. The ID of the newly arrived changeset is in | |
1014 | ``$HG_NODE``. The URL that was source of the changes is in ``$HG_URL``. |
|
1014 | ``$HG_NODE``. The URL that was source of the changes is in ``$HG_URL``. | |
1015 |
|
1015 | |||
1016 | ``outgoing`` |
|
1016 | ``outgoing`` | |
1017 | Run after sending changes from the local repository to another. The ID of |
|
1017 | Run after sending changes from the local repository to another. The ID of | |
1018 | first changeset sent is in ``$HG_NODE``. The source of operation is in |
|
1018 | first changeset sent is in ``$HG_NODE``. The source of operation is in | |
1019 | ``$HG_SOURCE``. Also see :hg:`help config.hooks.preoutgoing`. |
|
1019 | ``$HG_SOURCE``. Also see :hg:`help config.hooks.preoutgoing`. | |
1020 |
|
1020 | |||
1021 | ``post-<command>`` |
|
1021 | ``post-<command>`` | |
1022 | Run after successful invocations of the associated command. The |
|
1022 | Run after successful invocations of the associated command. The | |
1023 | contents of the command line are passed as ``$HG_ARGS`` and the result |
|
1023 | contents of the command line are passed as ``$HG_ARGS`` and the result | |
1024 | code in ``$HG_RESULT``. Parsed command line arguments are passed as |
|
1024 | code in ``$HG_RESULT``. Parsed command line arguments are passed as | |
1025 | ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of |
|
1025 | ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of | |
1026 | the python data internally passed to <command>. ``$HG_OPTS`` is a |
|
1026 | the python data internally passed to <command>. ``$HG_OPTS`` is a | |
1027 | dictionary of options (with unspecified options set to their defaults). |
|
1027 | dictionary of options (with unspecified options set to their defaults). | |
1028 | ``$HG_PATS`` is a list of arguments. Hook failure is ignored. |
|
1028 | ``$HG_PATS`` is a list of arguments. Hook failure is ignored. | |
1029 |
|
1029 | |||
1030 | ``fail-<command>`` |
|
1030 | ``fail-<command>`` | |
1031 | Run after a failed invocation of an associated command. The contents |
|
1031 | Run after a failed invocation of an associated command. The contents | |
1032 | of the command line are passed as ``$HG_ARGS``. Parsed command line |
|
1032 | of the command line are passed as ``$HG_ARGS``. Parsed command line | |
1033 | arguments are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain |
|
1033 | arguments are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain | |
1034 | string representations of the python data internally passed to |
|
1034 | string representations of the python data internally passed to | |
1035 | <command>. ``$HG_OPTS`` is a dictionary of options (with unspecified |
|
1035 | <command>. ``$HG_OPTS`` is a dictionary of options (with unspecified | |
1036 | options set to their defaults). ``$HG_PATS`` is a list of arguments. |
|
1036 | options set to their defaults). ``$HG_PATS`` is a list of arguments. | |
1037 | Hook failure is ignored. |
|
1037 | Hook failure is ignored. | |
1038 |
|
1038 | |||
1039 | ``pre-<command>`` |
|
1039 | ``pre-<command>`` | |
1040 | Run before executing the associated command. The contents of the |
|
1040 | Run before executing the associated command. The contents of the | |
1041 | command line are passed as ``$HG_ARGS``. Parsed command line arguments |
|
1041 | command line are passed as ``$HG_ARGS``. Parsed command line arguments | |
1042 | are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string |
|
1042 | are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string | |
1043 | representations of the data internally passed to <command>. ``$HG_OPTS`` |
|
1043 | representations of the data internally passed to <command>. ``$HG_OPTS`` | |
1044 | is a dictionary of options (with unspecified options set to their |
|
1044 | is a dictionary of options (with unspecified options set to their | |
1045 | defaults). ``$HG_PATS`` is a list of arguments. If the hook returns |
|
1045 | defaults). ``$HG_PATS`` is a list of arguments. If the hook returns | |
1046 | failure, the command doesn't execute and Mercurial returns the failure |
|
1046 | failure, the command doesn't execute and Mercurial returns the failure | |
1047 | code. |
|
1047 | code. | |
1048 |
|
1048 | |||
1049 | ``prechangegroup`` |
|
1049 | ``prechangegroup`` | |
1050 | Run before a changegroup is added via push, pull or unbundle. Exit |
|
1050 | Run before a changegroup is added via push, pull or unbundle. Exit | |
1051 | status 0 allows the changegroup to proceed. A non-zero status will |
|
1051 | status 0 allows the changegroup to proceed. A non-zero status will | |
1052 | cause the push, pull or unbundle to fail. The URL from which changes |
|
1052 | cause the push, pull or unbundle to fail. The URL from which changes | |
1053 | will come is in ``$HG_URL``. |
|
1053 | will come is in ``$HG_URL``. | |
1054 |
|
1054 | |||
1055 | ``precommit`` |
|
1055 | ``precommit`` | |
1056 | Run before starting a local commit. Exit status 0 allows the |
|
1056 | Run before starting a local commit. Exit status 0 allows the | |
1057 | commit to proceed. A non-zero status will cause the commit to fail. |
|
1057 | commit to proceed. A non-zero status will cause the commit to fail. | |
1058 | Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
1058 | Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. | |
1059 |
|
1059 | |||
1060 | ``prelistkeys`` |
|
1060 | ``prelistkeys`` | |
1061 | Run before listing pushkeys (like bookmarks) in the |
|
1061 | Run before listing pushkeys (like bookmarks) in the | |
1062 | repository. A non-zero status will cause failure. The key namespace is |
|
1062 | repository. A non-zero status will cause failure. The key namespace is | |
1063 | in ``$HG_NAMESPACE``. |
|
1063 | in ``$HG_NAMESPACE``. | |
1064 |
|
1064 | |||
1065 | ``preoutgoing`` |
|
1065 | ``preoutgoing`` | |
1066 | Run before collecting changes to send from the local repository to |
|
1066 | Run before collecting changes to send from the local repository to | |
1067 | another. A non-zero status will cause failure. This lets you prevent |
|
1067 | another. A non-zero status will cause failure. This lets you prevent | |
1068 | pull over HTTP or SSH. It can also prevent propagating commits (via |
|
1068 | pull over HTTP or SSH. It can also prevent propagating commits (via | |
1069 | local pull, push (outbound) or bundle commands), but not completely, |
|
1069 | local pull, push (outbound) or bundle commands), but not completely, | |
1070 | since you can just copy files instead. The source of operation is in |
|
1070 | since you can just copy files instead. The source of operation is in | |
1071 | ``$HG_SOURCE``. If "serve", the operation is happening on behalf of a remote |
|
1071 | ``$HG_SOURCE``. If "serve", the operation is happening on behalf of a remote | |
1072 | SSH or HTTP repository. If "push", "pull" or "bundle", the operation |
|
1072 | SSH or HTTP repository. If "push", "pull" or "bundle", the operation | |
1073 | is happening on behalf of a repository on same system. |
|
1073 | is happening on behalf of a repository on same system. | |
1074 |
|
1074 | |||
1075 | ``prepushkey`` |
|
1075 | ``prepushkey`` | |
1076 | Run before a pushkey (like a bookmark) is added to the |
|
1076 | Run before a pushkey (like a bookmark) is added to the | |
1077 | repository. A non-zero status will cause the key to be rejected. The |
|
1077 | repository. A non-zero status will cause the key to be rejected. The | |
1078 | key namespace is in ``$HG_NAMESPACE``, the key is in ``$HG_KEY``, |
|
1078 | key namespace is in ``$HG_NAMESPACE``, the key is in ``$HG_KEY``, | |
1079 | the old value (if any) is in ``$HG_OLD``, and the new value is in |
|
1079 | the old value (if any) is in ``$HG_OLD``, and the new value is in | |
1080 | ``$HG_NEW``. |
|
1080 | ``$HG_NEW``. | |
1081 |
|
1081 | |||
1082 | ``pretag`` |
|
1082 | ``pretag`` | |
1083 | Run before creating a tag. Exit status 0 allows the tag to be |
|
1083 | Run before creating a tag. Exit status 0 allows the tag to be | |
1084 | created. A non-zero status will cause the tag to fail. The ID of the |
|
1084 | created. A non-zero status will cause the tag to fail. The ID of the | |
1085 | changeset to tag is in ``$HG_NODE``. The name of tag is in ``$HG_TAG``. The |
|
1085 | changeset to tag is in ``$HG_NODE``. The name of tag is in ``$HG_TAG``. The | |
1086 | tag is local if ``$HG_LOCAL=1``, or in the repository if ``$HG_LOCAL=0``. |
|
1086 | tag is local if ``$HG_LOCAL=1``, or in the repository if ``$HG_LOCAL=0``. | |
1087 |
|
1087 | |||
1088 | ``pretxnopen`` |
|
1088 | ``pretxnopen`` | |
1089 | Run before any new repository transaction is open. The reason for the |
|
1089 | Run before any new repository transaction is open. The reason for the | |
1090 | transaction will be in ``$HG_TXNNAME``, and a unique identifier for the |
|
1090 | transaction will be in ``$HG_TXNNAME``, and a unique identifier for the | |
1091 | transaction will be in ``HG_TXNID``. A non-zero status will prevent the |
|
1091 | transaction will be in ``HG_TXNID``. A non-zero status will prevent the | |
1092 | transaction from being opened. |
|
1092 | transaction from being opened. | |
1093 |
|
1093 | |||
1094 | ``pretxnclose`` |
|
1094 | ``pretxnclose`` | |
1095 | Run right before the transaction is actually finalized. Any repository change |
|
1095 | Run right before the transaction is actually finalized. Any repository change | |
1096 | will be visible to the hook program. This lets you validate the transaction |
|
1096 | will be visible to the hook program. This lets you validate the transaction | |
1097 | content or change it. Exit status 0 allows the commit to proceed. A non-zero |
|
1097 | content or change it. Exit status 0 allows the commit to proceed. A non-zero | |
1098 | status will cause the transaction to be rolled back. The reason for the |
|
1098 | status will cause the transaction to be rolled back. The reason for the | |
1099 | transaction opening will be in ``$HG_TXNNAME``, and a unique identifier for |
|
1099 | transaction opening will be in ``$HG_TXNNAME``, and a unique identifier for | |
1100 | the transaction will be in ``HG_TXNID``. The rest of the available data will |
|
1100 | the transaction will be in ``HG_TXNID``. The rest of the available data will | |
1101 | vary according the transaction type. New changesets will add ``$HG_NODE`` |
|
1101 | vary according the transaction type. New changesets will add ``$HG_NODE`` | |
1102 | (the ID of the first added changeset), ``$HG_NODE_LAST`` (the ID of the last |
|
1102 | (the ID of the first added changeset), ``$HG_NODE_LAST`` (the ID of the last | |
1103 | added changeset), ``$HG_URL`` and ``$HG_SOURCE`` variables. Bookmark and |
|
1103 | added changeset), ``$HG_URL`` and ``$HG_SOURCE`` variables. Bookmark and | |
1104 | phase changes will set ``HG_BOOKMARK_MOVED`` and ``HG_PHASES_MOVED`` to ``1`` |
|
1104 | phase changes will set ``HG_BOOKMARK_MOVED`` and ``HG_PHASES_MOVED`` to ``1`` | |
1105 | respectively, etc. |
|
1105 | respectively, etc. | |
1106 |
|
1106 | |||
1107 | ``pretxnclose-bookmark`` |
|
1107 | ``pretxnclose-bookmark`` | |
1108 | Run right before a bookmark change is actually finalized. Any repository |
|
1108 | Run right before a bookmark change is actually finalized. Any repository | |
1109 | change will be visible to the hook program. This lets you validate the |
|
1109 | change will be visible to the hook program. This lets you validate the | |
1110 | transaction content or change it. Exit status 0 allows the commit to |
|
1110 | transaction content or change it. Exit status 0 allows the commit to | |
1111 | proceed. A non-zero status will cause the transaction to be rolled back. |
|
1111 | proceed. A non-zero status will cause the transaction to be rolled back. | |
1112 | The name of the bookmark will be available in ``$HG_BOOKMARK``, the new |
|
1112 | The name of the bookmark will be available in ``$HG_BOOKMARK``, the new | |
1113 | bookmark location will be available in ``$HG_NODE`` while the previous |
|
1113 | bookmark location will be available in ``$HG_NODE`` while the previous | |
1114 | location will be available in ``$HG_OLDNODE``. In case of a bookmark |
|
1114 | location will be available in ``$HG_OLDNODE``. In case of a bookmark | |
1115 | creation ``$HG_OLDNODE`` will be empty. In case of deletion ``$HG_NODE`` |
|
1115 | creation ``$HG_OLDNODE`` will be empty. In case of deletion ``$HG_NODE`` | |
1116 | will be empty. |
|
1116 | will be empty. | |
1117 | In addition, the reason for the transaction opening will be in |
|
1117 | In addition, the reason for the transaction opening will be in | |
1118 | ``$HG_TXNNAME``, and a unique identifier for the transaction will be in |
|
1118 | ``$HG_TXNNAME``, and a unique identifier for the transaction will be in | |
1119 | ``HG_TXNID``. |
|
1119 | ``HG_TXNID``. | |
1120 |
|
1120 | |||
1121 | ``pretxnclose-phase`` |
|
1121 | ``pretxnclose-phase`` | |
1122 | Run right before a phase change is actually finalized. Any repository change |
|
1122 | Run right before a phase change is actually finalized. Any repository change | |
1123 | will be visible to the hook program. This lets you validate the transaction |
|
1123 | will be visible to the hook program. This lets you validate the transaction | |
1124 | content or change it. Exit status 0 allows the commit to proceed. A non-zero |
|
1124 | content or change it. Exit status 0 allows the commit to proceed. A non-zero | |
1125 | status will cause the transaction to be rolled back. The hook is called |
|
1125 | status will cause the transaction to be rolled back. The hook is called | |
1126 | multiple times, once for each revision affected by a phase change. |
|
1126 | multiple times, once for each revision affected by a phase change. | |
1127 | The affected node is available in ``$HG_NODE``, the phase in ``$HG_PHASE`` |
|
1127 | The affected node is available in ``$HG_NODE``, the phase in ``$HG_PHASE`` | |
1128 | while the previous ``$HG_OLDPHASE``. In case of new node, ``$HG_OLDPHASE`` |
|
1128 | while the previous ``$HG_OLDPHASE``. In case of new node, ``$HG_OLDPHASE`` | |
1129 | will be empty. In addition, the reason for the transaction opening will be in |
|
1129 | will be empty. In addition, the reason for the transaction opening will be in | |
1130 | ``$HG_TXNNAME``, and a unique identifier for the transaction will be in |
|
1130 | ``$HG_TXNNAME``, and a unique identifier for the transaction will be in | |
1131 | ``HG_TXNID``. The hook is also run for newly added revisions. In this case |
|
1131 | ``HG_TXNID``. The hook is also run for newly added revisions. In this case | |
1132 | the ``$HG_OLDPHASE`` entry will be empty. |
|
1132 | the ``$HG_OLDPHASE`` entry will be empty. | |
1133 |
|
1133 | |||
1134 | ``txnclose`` |
|
1134 | ``txnclose`` | |
1135 | Run after any repository transaction has been committed. At this |
|
1135 | Run after any repository transaction has been committed. At this | |
1136 | point, the transaction can no longer be rolled back. The hook will run |
|
1136 | point, the transaction can no longer be rolled back. The hook will run | |
1137 | after the lock is released. See :hg:`help config.hooks.pretxnclose` for |
|
1137 | after the lock is released. See :hg:`help config.hooks.pretxnclose` for | |
1138 | details about available variables. |
|
1138 | details about available variables. | |
1139 |
|
1139 | |||
1140 | ``txnclose-bookmark`` |
|
1140 | ``txnclose-bookmark`` | |
1141 | Run after any bookmark change has been committed. At this point, the |
|
1141 | Run after any bookmark change has been committed. At this point, the | |
1142 | transaction can no longer be rolled back. The hook will run after the lock |
|
1142 | transaction can no longer be rolled back. The hook will run after the lock | |
1143 | is released. See :hg:`help config.hooks.pretxnclose-bookmark` for details |
|
1143 | is released. See :hg:`help config.hooks.pretxnclose-bookmark` for details | |
1144 | about available variables. |
|
1144 | about available variables. | |
1145 |
|
1145 | |||
1146 | ``txnclose-phase`` |
|
1146 | ``txnclose-phase`` | |
1147 | Run after any phase change has been committed. At this point, the |
|
1147 | Run after any phase change has been committed. At this point, the | |
1148 | transaction can no longer be rolled back. The hook will run after the lock |
|
1148 | transaction can no longer be rolled back. The hook will run after the lock | |
1149 | is released. See :hg:`help config.hooks.pretxnclose-phase` for details about |
|
1149 | is released. See :hg:`help config.hooks.pretxnclose-phase` for details about | |
1150 | available variables. |
|
1150 | available variables. | |
1151 |
|
1151 | |||
1152 | ``txnabort`` |
|
1152 | ``txnabort`` | |
1153 | Run when a transaction is aborted. See :hg:`help config.hooks.pretxnclose` |
|
1153 | Run when a transaction is aborted. See :hg:`help config.hooks.pretxnclose` | |
1154 | for details about available variables. |
|
1154 | for details about available variables. | |
1155 |
|
1155 | |||
1156 | ``pretxnchangegroup`` |
|
1156 | ``pretxnchangegroup`` | |
1157 | Run after a changegroup has been added via push, pull or unbundle, but before |
|
1157 | Run after a changegroup has been added via push, pull or unbundle, but before | |
1158 | the transaction has been committed. The changegroup is visible to the hook |
|
1158 | the transaction has been committed. The changegroup is visible to the hook | |
1159 | program. This allows validation of incoming changes before accepting them. |
|
1159 | program. This allows validation of incoming changes before accepting them. | |
1160 | The ID of the first new changeset is in ``$HG_NODE`` and last is in |
|
1160 | The ID of the first new changeset is in ``$HG_NODE`` and last is in | |
1161 | ``$HG_NODE_LAST``. Exit status 0 allows the transaction to commit. A non-zero |
|
1161 | ``$HG_NODE_LAST``. Exit status 0 allows the transaction to commit. A non-zero | |
1162 | status will cause the transaction to be rolled back, and the push, pull or |
|
1162 | status will cause the transaction to be rolled back, and the push, pull or | |
1163 | unbundle will fail. The URL that was the source of changes is in ``$HG_URL``. |
|
1163 | unbundle will fail. The URL that was the source of changes is in ``$HG_URL``. | |
1164 |
|
1164 | |||
1165 | ``pretxncommit`` |
|
1165 | ``pretxncommit`` | |
1166 | Run after a changeset has been created, but before the transaction is |
|
1166 | Run after a changeset has been created, but before the transaction is | |
1167 | committed. The changeset is visible to the hook program. This allows |
|
1167 | committed. The changeset is visible to the hook program. This allows | |
1168 | validation of the commit message and changes. Exit status 0 allows the |
|
1168 | validation of the commit message and changes. Exit status 0 allows the | |
1169 | commit to proceed. A non-zero status will cause the transaction to |
|
1169 | commit to proceed. A non-zero status will cause the transaction to | |
1170 | be rolled back. The ID of the new changeset is in ``$HG_NODE``. The parent |
|
1170 | be rolled back. The ID of the new changeset is in ``$HG_NODE``. The parent | |
1171 | changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
1171 | changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. | |
1172 |
|
1172 | |||
1173 | ``preupdate`` |
|
1173 | ``preupdate`` | |
1174 | Run before updating the working directory. Exit status 0 allows |
|
1174 | Run before updating the working directory. Exit status 0 allows | |
1175 | the update to proceed. A non-zero status will prevent the update. |
|
1175 | the update to proceed. A non-zero status will prevent the update. | |
1176 | The changeset ID of first new parent is in ``$HG_PARENT1``. If updating to a |
|
1176 | The changeset ID of first new parent is in ``$HG_PARENT1``. If updating to a | |
1177 | merge, the ID of second new parent is in ``$HG_PARENT2``. |
|
1177 | merge, the ID of second new parent is in ``$HG_PARENT2``. | |
1178 |
|
1178 | |||
1179 | ``listkeys`` |
|
1179 | ``listkeys`` | |
1180 | Run after listing pushkeys (like bookmarks) in the repository. The |
|
1180 | Run after listing pushkeys (like bookmarks) in the repository. The | |
1181 | key namespace is in ``$HG_NAMESPACE``. ``$HG_VALUES`` is a |
|
1181 | key namespace is in ``$HG_NAMESPACE``. ``$HG_VALUES`` is a | |
1182 | dictionary containing the keys and values. |
|
1182 | dictionary containing the keys and values. | |
1183 |
|
1183 | |||
1184 | ``pushkey`` |
|
1184 | ``pushkey`` | |
1185 | Run after a pushkey (like a bookmark) is added to the |
|
1185 | Run after a pushkey (like a bookmark) is added to the | |
1186 | repository. The key namespace is in ``$HG_NAMESPACE``, the key is in |
|
1186 | repository. The key namespace is in ``$HG_NAMESPACE``, the key is in | |
1187 | ``$HG_KEY``, the old value (if any) is in ``$HG_OLD``, and the new |
|
1187 | ``$HG_KEY``, the old value (if any) is in ``$HG_OLD``, and the new | |
1188 | value is in ``$HG_NEW``. |
|
1188 | value is in ``$HG_NEW``. | |
1189 |
|
1189 | |||
1190 | ``tag`` |
|
1190 | ``tag`` | |
1191 | Run after a tag is created. The ID of the tagged changeset is in ``$HG_NODE``. |
|
1191 | Run after a tag is created. The ID of the tagged changeset is in ``$HG_NODE``. | |
1192 | The name of tag is in ``$HG_TAG``. The tag is local if ``$HG_LOCAL=1``, or in |
|
1192 | The name of tag is in ``$HG_TAG``. The tag is local if ``$HG_LOCAL=1``, or in | |
1193 | the repository if ``$HG_LOCAL=0``. |
|
1193 | the repository if ``$HG_LOCAL=0``. | |
1194 |
|
1194 | |||
1195 | ``update`` |
|
1195 | ``update`` | |
1196 | Run after updating the working directory. The changeset ID of first |
|
1196 | Run after updating the working directory. The changeset ID of first | |
1197 | new parent is in ``$HG_PARENT1``. If updating to a merge, the ID of second new |
|
1197 | new parent is in ``$HG_PARENT1``. If updating to a merge, the ID of second new | |
1198 | parent is in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the |
|
1198 | parent is in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the | |
1199 | update failed (e.g. because conflicts were not resolved), ``$HG_ERROR=1``. |
|
1199 | update failed (e.g. because conflicts were not resolved), ``$HG_ERROR=1``. | |
1200 |
|
1200 | |||
1201 | .. note:: |
|
1201 | .. note:: | |
1202 |
|
1202 | |||
1203 | It is generally better to use standard hooks rather than the |
|
1203 | It is generally better to use standard hooks rather than the | |
1204 | generic pre- and post- command hooks, as they are guaranteed to be |
|
1204 | generic pre- and post- command hooks, as they are guaranteed to be | |
1205 | called in the appropriate contexts for influencing transactions. |
|
1205 | called in the appropriate contexts for influencing transactions. | |
1206 | Also, hooks like "commit" will be called in all contexts that |
|
1206 | Also, hooks like "commit" will be called in all contexts that | |
1207 | generate a commit (e.g. tag) and not just the commit command. |
|
1207 | generate a commit (e.g. tag) and not just the commit command. | |
1208 |
|
1208 | |||
1209 | .. note:: |
|
1209 | .. note:: | |
1210 |
|
1210 | |||
1211 | Environment variables with empty values may not be passed to |
|
1211 | Environment variables with empty values may not be passed to | |
1212 | hooks on platforms such as Windows. As an example, ``$HG_PARENT2`` |
|
1212 | hooks on platforms such as Windows. As an example, ``$HG_PARENT2`` | |
1213 | will have an empty value under Unix-like platforms for non-merge |
|
1213 | will have an empty value under Unix-like platforms for non-merge | |
1214 | changesets, while it will not be available at all under Windows. |
|
1214 | changesets, while it will not be available at all under Windows. | |
1215 |
|
1215 | |||
1216 | The syntax for Python hooks is as follows:: |
|
1216 | The syntax for Python hooks is as follows:: | |
1217 |
|
1217 | |||
1218 | hookname = python:modulename.submodule.callable |
|
1218 | hookname = python:modulename.submodule.callable | |
1219 | hookname = python:/path/to/python/module.py:callable |
|
1219 | hookname = python:/path/to/python/module.py:callable | |
1220 |
|
1220 | |||
1221 | Python hooks are run within the Mercurial process. Each hook is |
|
1221 | Python hooks are run within the Mercurial process. Each hook is | |
1222 | called with at least three keyword arguments: a ui object (keyword |
|
1222 | called with at least three keyword arguments: a ui object (keyword | |
1223 | ``ui``), a repository object (keyword ``repo``), and a ``hooktype`` |
|
1223 | ``ui``), a repository object (keyword ``repo``), and a ``hooktype`` | |
1224 | keyword that tells what kind of hook is used. Arguments listed as |
|
1224 | keyword that tells what kind of hook is used. Arguments listed as | |
1225 | environment variables above are passed as keyword arguments, with no |
|
1225 | environment variables above are passed as keyword arguments, with no | |
1226 | ``HG_`` prefix, and names in lower case. |
|
1226 | ``HG_`` prefix, and names in lower case. | |
1227 |
|
1227 | |||
1228 | If a Python hook returns a "true" value or raises an exception, this |
|
1228 | If a Python hook returns a "true" value or raises an exception, this | |
1229 | is treated as a failure. |
|
1229 | is treated as a failure. | |
1230 |
|
1230 | |||
1231 |
|
1231 | |||
1232 | ``hostfingerprints`` |
|
1232 | ``hostfingerprints`` | |
1233 | -------------------- |
|
1233 | -------------------- | |
1234 |
|
1234 | |||
1235 | (Deprecated. Use ``[hostsecurity]``'s ``fingerprints`` options instead.) |
|
1235 | (Deprecated. Use ``[hostsecurity]``'s ``fingerprints`` options instead.) | |
1236 |
|
1236 | |||
1237 | Fingerprints of the certificates of known HTTPS servers. |
|
1237 | Fingerprints of the certificates of known HTTPS servers. | |
1238 |
|
1238 | |||
1239 | A HTTPS connection to a server with a fingerprint configured here will |
|
1239 | A HTTPS connection to a server with a fingerprint configured here will | |
1240 | only succeed if the servers certificate matches the fingerprint. |
|
1240 | only succeed if the servers certificate matches the fingerprint. | |
1241 | This is very similar to how ssh known hosts works. |
|
1241 | This is very similar to how ssh known hosts works. | |
1242 |
|
1242 | |||
1243 | The fingerprint is the SHA-1 hash value of the DER encoded certificate. |
|
1243 | The fingerprint is the SHA-1 hash value of the DER encoded certificate. | |
1244 | Multiple values can be specified (separated by spaces or commas). This can |
|
1244 | Multiple values can be specified (separated by spaces or commas). This can | |
1245 | be used to define both old and new fingerprints while a host transitions |
|
1245 | be used to define both old and new fingerprints while a host transitions | |
1246 | to a new certificate. |
|
1246 | to a new certificate. | |
1247 |
|
1247 | |||
1248 | The CA chain and web.cacerts is not used for servers with a fingerprint. |
|
1248 | The CA chain and web.cacerts is not used for servers with a fingerprint. | |
1249 |
|
1249 | |||
1250 | For example:: |
|
1250 | For example:: | |
1251 |
|
1251 | |||
1252 | [hostfingerprints] |
|
1252 | [hostfingerprints] | |
1253 | hg.intevation.de = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 |
|
1253 | hg.intevation.de = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 | |
1254 | hg.intevation.org = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 |
|
1254 | hg.intevation.org = fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 | |
1255 |
|
1255 | |||
1256 | ``hostsecurity`` |
|
1256 | ``hostsecurity`` | |
1257 | ---------------- |
|
1257 | ---------------- | |
1258 |
|
1258 | |||
1259 | Used to specify global and per-host security settings for connecting to |
|
1259 | Used to specify global and per-host security settings for connecting to | |
1260 | other machines. |
|
1260 | other machines. | |
1261 |
|
1261 | |||
1262 | The following options control default behavior for all hosts. |
|
1262 | The following options control default behavior for all hosts. | |
1263 |
|
1263 | |||
1264 | ``ciphers`` |
|
1264 | ``ciphers`` | |
1265 | Defines the cryptographic ciphers to use for connections. |
|
1265 | Defines the cryptographic ciphers to use for connections. | |
1266 |
|
1266 | |||
1267 | Value must be a valid OpenSSL Cipher List Format as documented at |
|
1267 | Value must be a valid OpenSSL Cipher List Format as documented at | |
1268 | https://www.openssl.org/docs/manmaster/apps/ciphers.html#CIPHER-LIST-FORMAT. |
|
1268 | https://www.openssl.org/docs/manmaster/apps/ciphers.html#CIPHER-LIST-FORMAT. | |
1269 |
|
1269 | |||
1270 | This setting is for advanced users only. Setting to incorrect values |
|
1270 | This setting is for advanced users only. Setting to incorrect values | |
1271 | can significantly lower connection security or decrease performance. |
|
1271 | can significantly lower connection security or decrease performance. | |
1272 | You have been warned. |
|
1272 | You have been warned. | |
1273 |
|
1273 | |||
1274 | This option requires Python 2.7. |
|
1274 | This option requires Python 2.7. | |
1275 |
|
1275 | |||
1276 | ``minimumprotocol`` |
|
1276 | ``minimumprotocol`` | |
1277 | Defines the minimum channel encryption protocol to use. |
|
1277 | Defines the minimum channel encryption protocol to use. | |
1278 |
|
1278 | |||
1279 | By default, the highest version of TLS supported by both client and server |
|
1279 | By default, the highest version of TLS supported by both client and server | |
1280 | is used. |
|
1280 | is used. | |
1281 |
|
1281 | |||
1282 | Allowed values are: ``tls1.0``, ``tls1.1``, ``tls1.2``. |
|
1282 | Allowed values are: ``tls1.0``, ``tls1.1``, ``tls1.2``. | |
1283 |
|
1283 | |||
1284 | When running on an old Python version, only ``tls1.0`` is allowed since |
|
1284 | When running on an old Python version, only ``tls1.0`` is allowed since | |
1285 | old versions of Python only support up to TLS 1.0. |
|
1285 | old versions of Python only support up to TLS 1.0. | |
1286 |
|
1286 | |||
1287 | When running a Python that supports modern TLS versions, the default is |
|
1287 | When running a Python that supports modern TLS versions, the default is | |
1288 | ``tls1.1``. ``tls1.0`` can still be used to allow TLS 1.0. However, this |
|
1288 | ``tls1.1``. ``tls1.0`` can still be used to allow TLS 1.0. However, this | |
1289 | weakens security and should only be used as a feature of last resort if |
|
1289 | weakens security and should only be used as a feature of last resort if | |
1290 | a server does not support TLS 1.1+. |
|
1290 | a server does not support TLS 1.1+. | |
1291 |
|
1291 | |||
1292 | Options in the ``[hostsecurity]`` section can have the form |
|
1292 | Options in the ``[hostsecurity]`` section can have the form | |
1293 | ``hostname``:``setting``. This allows multiple settings to be defined on a |
|
1293 | ``hostname``:``setting``. This allows multiple settings to be defined on a | |
1294 | per-host basis. |
|
1294 | per-host basis. | |
1295 |
|
1295 | |||
1296 | The following per-host settings can be defined. |
|
1296 | The following per-host settings can be defined. | |
1297 |
|
1297 | |||
1298 | ``ciphers`` |
|
1298 | ``ciphers`` | |
1299 | This behaves like ``ciphers`` as described above except it only applies |
|
1299 | This behaves like ``ciphers`` as described above except it only applies | |
1300 | to the host on which it is defined. |
|
1300 | to the host on which it is defined. | |
1301 |
|
1301 | |||
1302 | ``fingerprints`` |
|
1302 | ``fingerprints`` | |
1303 | A list of hashes of the DER encoded peer/remote certificate. Values have |
|
1303 | A list of hashes of the DER encoded peer/remote certificate. Values have | |
1304 | the form ``algorithm``:``fingerprint``. e.g. |
|
1304 | the form ``algorithm``:``fingerprint``. e.g. | |
1305 | ``sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2``. |
|
1305 | ``sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2``. | |
1306 | In addition, colons (``:``) can appear in the fingerprint part. |
|
1306 | In addition, colons (``:``) can appear in the fingerprint part. | |
1307 |
|
1307 | |||
1308 | The following algorithms/prefixes are supported: ``sha1``, ``sha256``, |
|
1308 | The following algorithms/prefixes are supported: ``sha1``, ``sha256``, | |
1309 | ``sha512``. |
|
1309 | ``sha512``. | |
1310 |
|
1310 | |||
1311 | Use of ``sha256`` or ``sha512`` is preferred. |
|
1311 | Use of ``sha256`` or ``sha512`` is preferred. | |
1312 |
|
1312 | |||
1313 | If a fingerprint is specified, the CA chain is not validated for this |
|
1313 | If a fingerprint is specified, the CA chain is not validated for this | |
1314 | host and Mercurial will require the remote certificate to match one |
|
1314 | host and Mercurial will require the remote certificate to match one | |
1315 | of the fingerprints specified. This means if the server updates its |
|
1315 | of the fingerprints specified. This means if the server updates its | |
1316 | certificate, Mercurial will abort until a new fingerprint is defined. |
|
1316 | certificate, Mercurial will abort until a new fingerprint is defined. | |
1317 | This can provide stronger security than traditional CA-based validation |
|
1317 | This can provide stronger security than traditional CA-based validation | |
1318 | at the expense of convenience. |
|
1318 | at the expense of convenience. | |
1319 |
|
1319 | |||
1320 | This option takes precedence over ``verifycertsfile``. |
|
1320 | This option takes precedence over ``verifycertsfile``. | |
1321 |
|
1321 | |||
1322 | ``minimumprotocol`` |
|
1322 | ``minimumprotocol`` | |
1323 | This behaves like ``minimumprotocol`` as described above except it |
|
1323 | This behaves like ``minimumprotocol`` as described above except it | |
1324 | only applies to the host on which it is defined. |
|
1324 | only applies to the host on which it is defined. | |
1325 |
|
1325 | |||
1326 | ``verifycertsfile`` |
|
1326 | ``verifycertsfile`` | |
1327 | Path to file a containing a list of PEM encoded certificates used to |
|
1327 | Path to file a containing a list of PEM encoded certificates used to | |
1328 | verify the server certificate. Environment variables and ``~user`` |
|
1328 | verify the server certificate. Environment variables and ``~user`` | |
1329 | constructs are expanded in the filename. |
|
1329 | constructs are expanded in the filename. | |
1330 |
|
1330 | |||
1331 | The server certificate or the certificate's certificate authority (CA) |
|
1331 | The server certificate or the certificate's certificate authority (CA) | |
1332 | must match a certificate from this file or certificate verification |
|
1332 | must match a certificate from this file or certificate verification | |
1333 | will fail and connections to the server will be refused. |
|
1333 | will fail and connections to the server will be refused. | |
1334 |
|
1334 | |||
1335 | If defined, only certificates provided by this file will be used: |
|
1335 | If defined, only certificates provided by this file will be used: | |
1336 | ``web.cacerts`` and any system/default certificates will not be |
|
1336 | ``web.cacerts`` and any system/default certificates will not be | |
1337 | used. |
|
1337 | used. | |
1338 |
|
1338 | |||
1339 | This option has no effect if the per-host ``fingerprints`` option |
|
1339 | This option has no effect if the per-host ``fingerprints`` option | |
1340 | is set. |
|
1340 | is set. | |
1341 |
|
1341 | |||
1342 | The format of the file is as follows:: |
|
1342 | The format of the file is as follows:: | |
1343 |
|
1343 | |||
1344 | -----BEGIN CERTIFICATE----- |
|
1344 | -----BEGIN CERTIFICATE----- | |
1345 | ... (certificate in base64 PEM encoding) ... |
|
1345 | ... (certificate in base64 PEM encoding) ... | |
1346 | -----END CERTIFICATE----- |
|
1346 | -----END CERTIFICATE----- | |
1347 | -----BEGIN CERTIFICATE----- |
|
1347 | -----BEGIN CERTIFICATE----- | |
1348 | ... (certificate in base64 PEM encoding) ... |
|
1348 | ... (certificate in base64 PEM encoding) ... | |
1349 | -----END CERTIFICATE----- |
|
1349 | -----END CERTIFICATE----- | |
1350 |
|
1350 | |||
1351 | For example:: |
|
1351 | For example:: | |
1352 |
|
1352 | |||
1353 | [hostsecurity] |
|
1353 | [hostsecurity] | |
1354 | hg.example.com:fingerprints = sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2 |
|
1354 | hg.example.com:fingerprints = sha256:c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2 | |
1355 | hg2.example.com:fingerprints = sha1:914f1aff87249c09b6859b88b1906d30756491ca, sha1:fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 |
|
1355 | hg2.example.com:fingerprints = sha1:914f1aff87249c09b6859b88b1906d30756491ca, sha1:fc:e2:8d:d9:51:cd:cb:c1:4d:18:6b:b7:44:8d:49:72:57:e6:cd:33 | |
1356 | hg3.example.com:fingerprints = sha256:9a:b0:dc:e2:75:ad:8a:b7:84:58:e5:1f:07:32:f1:87:e6:bd:24:22:af:b7:ce:8e:9c:b4:10:cf:b9:f4:0e:d2 |
|
1356 | hg3.example.com:fingerprints = sha256:9a:b0:dc:e2:75:ad:8a:b7:84:58:e5:1f:07:32:f1:87:e6:bd:24:22:af:b7:ce:8e:9c:b4:10:cf:b9:f4:0e:d2 | |
1357 | foo.example.com:verifycertsfile = /etc/ssl/trusted-ca-certs.pem |
|
1357 | foo.example.com:verifycertsfile = /etc/ssl/trusted-ca-certs.pem | |
1358 |
|
1358 | |||
1359 | To change the default minimum protocol version to TLS 1.2 but to allow TLS 1.1 |
|
1359 | To change the default minimum protocol version to TLS 1.2 but to allow TLS 1.1 | |
1360 | when connecting to ``hg.example.com``:: |
|
1360 | when connecting to ``hg.example.com``:: | |
1361 |
|
1361 | |||
1362 | [hostsecurity] |
|
1362 | [hostsecurity] | |
1363 | minimumprotocol = tls1.2 |
|
1363 | minimumprotocol = tls1.2 | |
1364 | hg.example.com:minimumprotocol = tls1.1 |
|
1364 | hg.example.com:minimumprotocol = tls1.1 | |
1365 |
|
1365 | |||
1366 | ``http_proxy`` |
|
1366 | ``http_proxy`` | |
1367 | -------------- |
|
1367 | -------------- | |
1368 |
|
1368 | |||
1369 | Used to access web-based Mercurial repositories through a HTTP |
|
1369 | Used to access web-based Mercurial repositories through a HTTP | |
1370 | proxy. |
|
1370 | proxy. | |
1371 |
|
1371 | |||
1372 | ``host`` |
|
1372 | ``host`` | |
1373 | Host name and (optional) port of the proxy server, for example |
|
1373 | Host name and (optional) port of the proxy server, for example | |
1374 | "myproxy:8000". |
|
1374 | "myproxy:8000". | |
1375 |
|
1375 | |||
1376 | ``no`` |
|
1376 | ``no`` | |
1377 | Optional. Comma-separated list of host names that should bypass |
|
1377 | Optional. Comma-separated list of host names that should bypass | |
1378 | the proxy. |
|
1378 | the proxy. | |
1379 |
|
1379 | |||
1380 | ``passwd`` |
|
1380 | ``passwd`` | |
1381 | Optional. Password to authenticate with at the proxy server. |
|
1381 | Optional. Password to authenticate with at the proxy server. | |
1382 |
|
1382 | |||
1383 | ``user`` |
|
1383 | ``user`` | |
1384 | Optional. User name to authenticate with at the proxy server. |
|
1384 | Optional. User name to authenticate with at the proxy server. | |
1385 |
|
1385 | |||
1386 | ``always`` |
|
1386 | ``always`` | |
1387 | Optional. Always use the proxy, even for localhost and any entries |
|
1387 | Optional. Always use the proxy, even for localhost and any entries | |
1388 | in ``http_proxy.no``. (default: False) |
|
1388 | in ``http_proxy.no``. (default: False) | |
1389 |
|
1389 | |||
1390 | ``http`` |
|
1390 | ``http`` | |
1391 | ---------- |
|
1391 | ---------- | |
1392 |
|
1392 | |||
1393 | Used to configure access to Mercurial repositories via HTTP. |
|
1393 | Used to configure access to Mercurial repositories via HTTP. | |
1394 |
|
1394 | |||
1395 | ``timeout`` |
|
1395 | ``timeout`` | |
1396 | If set, blocking operations will timeout after that many seconds. |
|
1396 | If set, blocking operations will timeout after that many seconds. | |
1397 | (default: None) |
|
1397 | (default: None) | |
1398 |
|
1398 | |||
1399 | ``merge`` |
|
1399 | ``merge`` | |
1400 | --------- |
|
1400 | --------- | |
1401 |
|
1401 | |||
1402 | This section specifies behavior during merges and updates. |
|
1402 | This section specifies behavior during merges and updates. | |
1403 |
|
1403 | |||
1404 | ``checkignored`` |
|
1404 | ``checkignored`` | |
1405 | Controls behavior when an ignored file on disk has the same name as a tracked |
|
1405 | Controls behavior when an ignored file on disk has the same name as a tracked | |
1406 | file in the changeset being merged or updated to, and has different |
|
1406 | file in the changeset being merged or updated to, and has different | |
1407 | contents. Options are ``abort``, ``warn`` and ``ignore``. With ``abort``, |
|
1407 | contents. Options are ``abort``, ``warn`` and ``ignore``. With ``abort``, | |
1408 | abort on such files. With ``warn``, warn on such files and back them up as |
|
1408 | abort on such files. With ``warn``, warn on such files and back them up as | |
1409 | ``.orig``. With ``ignore``, don't print a warning and back them up as |
|
1409 | ``.orig``. With ``ignore``, don't print a warning and back them up as | |
1410 | ``.orig``. (default: ``abort``) |
|
1410 | ``.orig``. (default: ``abort``) | |
1411 |
|
1411 | |||
1412 | ``checkunknown`` |
|
1412 | ``checkunknown`` | |
1413 | Controls behavior when an unknown file that isn't ignored has the same name |
|
1413 | Controls behavior when an unknown file that isn't ignored has the same name | |
1414 | as a tracked file in the changeset being merged or updated to, and has |
|
1414 | as a tracked file in the changeset being merged or updated to, and has | |
1415 | different contents. Similar to ``merge.checkignored``, except for files that |
|
1415 | different contents. Similar to ``merge.checkignored``, except for files that | |
1416 | are not ignored. (default: ``abort``) |
|
1416 | are not ignored. (default: ``abort``) | |
1417 |
|
1417 | |||
1418 | ``on-failure`` |
|
1418 | ``on-failure`` | |
1419 | When set to ``continue`` (the default), the merge process attempts to |
|
1419 | When set to ``continue`` (the default), the merge process attempts to | |
1420 | merge all unresolved files using the merge chosen tool, regardless of |
|
1420 | merge all unresolved files using the merge chosen tool, regardless of | |
1421 | whether previous file merge attempts during the process succeeded or not. |
|
1421 | whether previous file merge attempts during the process succeeded or not. | |
1422 | Setting this to ``prompt`` will prompt after any merge failure continue |
|
1422 | Setting this to ``prompt`` will prompt after any merge failure continue | |
1423 | or halt the merge process. Setting this to ``halt`` will automatically |
|
1423 | or halt the merge process. Setting this to ``halt`` will automatically | |
1424 | halt the merge process on any merge tool failure. The merge process |
|
1424 | halt the merge process on any merge tool failure. The merge process | |
1425 | can be restarted by using the ``resolve`` command. When a merge is |
|
1425 | can be restarted by using the ``resolve`` command. When a merge is | |
1426 | halted, the repository is left in a normal ``unresolved`` merge state. |
|
1426 | halted, the repository is left in a normal ``unresolved`` merge state. | |
1427 | (default: ``continue``) |
|
1427 | (default: ``continue``) | |
1428 |
|
1428 | |||
1429 | ``strict-capability-check`` |
|
1429 | ``strict-capability-check`` | |
1430 | Whether capabilities of internal merge tools are checked strictly |
|
1430 | Whether capabilities of internal merge tools are checked strictly | |
1431 | or not, while examining rules to decide merge tool to be used. |
|
1431 | or not, while examining rules to decide merge tool to be used. | |
1432 | (default: False) |
|
1432 | (default: False) | |
1433 |
|
1433 | |||
1434 | ``merge-patterns`` |
|
1434 | ``merge-patterns`` | |
1435 | ------------------ |
|
1435 | ------------------ | |
1436 |
|
1436 | |||
1437 | This section specifies merge tools to associate with particular file |
|
1437 | This section specifies merge tools to associate with particular file | |
1438 | patterns. Tools matched here will take precedence over the default |
|
1438 | patterns. Tools matched here will take precedence over the default | |
1439 | merge tool. Patterns are globs by default, rooted at the repository |
|
1439 | merge tool. Patterns are globs by default, rooted at the repository | |
1440 | root. |
|
1440 | root. | |
1441 |
|
1441 | |||
1442 | Example:: |
|
1442 | Example:: | |
1443 |
|
1443 | |||
1444 | [merge-patterns] |
|
1444 | [merge-patterns] | |
1445 | **.c = kdiff3 |
|
1445 | **.c = kdiff3 | |
1446 | **.jpg = myimgmerge |
|
1446 | **.jpg = myimgmerge | |
1447 |
|
1447 | |||
1448 | ``merge-tools`` |
|
1448 | ``merge-tools`` | |
1449 | --------------- |
|
1449 | --------------- | |
1450 |
|
1450 | |||
1451 | This section configures external merge tools to use for file-level |
|
1451 | This section configures external merge tools to use for file-level | |
1452 | merges. This section has likely been preconfigured at install time. |
|
1452 | merges. This section has likely been preconfigured at install time. | |
1453 | Use :hg:`config merge-tools` to check the existing configuration. |
|
1453 | Use :hg:`config merge-tools` to check the existing configuration. | |
1454 | Also see :hg:`help merge-tools` for more details. |
|
1454 | Also see :hg:`help merge-tools` for more details. | |
1455 |
|
1455 | |||
1456 | Example ``~/.hgrc``:: |
|
1456 | Example ``~/.hgrc``:: | |
1457 |
|
1457 | |||
1458 | [merge-tools] |
|
1458 | [merge-tools] | |
1459 | # Override stock tool location |
|
1459 | # Override stock tool location | |
1460 | kdiff3.executable = ~/bin/kdiff3 |
|
1460 | kdiff3.executable = ~/bin/kdiff3 | |
1461 | # Specify command line |
|
1461 | # Specify command line | |
1462 | kdiff3.args = $base $local $other -o $output |
|
1462 | kdiff3.args = $base $local $other -o $output | |
1463 | # Give higher priority |
|
1463 | # Give higher priority | |
1464 | kdiff3.priority = 1 |
|
1464 | kdiff3.priority = 1 | |
1465 |
|
1465 | |||
1466 | # Changing the priority of preconfigured tool |
|
1466 | # Changing the priority of preconfigured tool | |
1467 | meld.priority = 0 |
|
1467 | meld.priority = 0 | |
1468 |
|
1468 | |||
1469 | # Disable a preconfigured tool |
|
1469 | # Disable a preconfigured tool | |
1470 | vimdiff.disabled = yes |
|
1470 | vimdiff.disabled = yes | |
1471 |
|
1471 | |||
1472 | # Define new tool |
|
1472 | # Define new tool | |
1473 | myHtmlTool.args = -m $local $other $base $output |
|
1473 | myHtmlTool.args = -m $local $other $base $output | |
1474 | myHtmlTool.regkey = Software\FooSoftware\HtmlMerge |
|
1474 | myHtmlTool.regkey = Software\FooSoftware\HtmlMerge | |
1475 | myHtmlTool.priority = 1 |
|
1475 | myHtmlTool.priority = 1 | |
1476 |
|
1476 | |||
1477 | Supported arguments: |
|
1477 | Supported arguments: | |
1478 |
|
1478 | |||
1479 | ``priority`` |
|
1479 | ``priority`` | |
1480 | The priority in which to evaluate this tool. |
|
1480 | The priority in which to evaluate this tool. | |
1481 | (default: 0) |
|
1481 | (default: 0) | |
1482 |
|
1482 | |||
1483 | ``executable`` |
|
1483 | ``executable`` | |
1484 | Either just the name of the executable or its pathname. |
|
1484 | Either just the name of the executable or its pathname. | |
1485 |
|
1485 | |||
1486 | .. container:: windows |
|
1486 | .. container:: windows | |
1487 |
|
1487 | |||
1488 | On Windows, the path can use environment variables with ${ProgramFiles} |
|
1488 | On Windows, the path can use environment variables with ${ProgramFiles} | |
1489 | syntax. |
|
1489 | syntax. | |
1490 |
|
1490 | |||
1491 | (default: the tool name) |
|
1491 | (default: the tool name) | |
1492 |
|
1492 | |||
1493 | ``args`` |
|
1493 | ``args`` | |
1494 | The arguments to pass to the tool executable. You can refer to the |
|
1494 | The arguments to pass to the tool executable. You can refer to the | |
1495 | files being merged as well as the output file through these |
|
1495 | files being merged as well as the output file through these | |
1496 | variables: ``$base``, ``$local``, ``$other``, ``$output``. |
|
1496 | variables: ``$base``, ``$local``, ``$other``, ``$output``. | |
1497 |
|
1497 | |||
1498 | The meaning of ``$local`` and ``$other`` can vary depending on which action is |
|
1498 | The meaning of ``$local`` and ``$other`` can vary depending on which action is | |
1499 | being performed. During an update or merge, ``$local`` represents the original |
|
1499 | being performed. During an update or merge, ``$local`` represents the original | |
1500 | state of the file, while ``$other`` represents the commit you are updating to or |
|
1500 | state of the file, while ``$other`` represents the commit you are updating to or | |
1501 | the commit you are merging with. During a rebase, ``$local`` represents the |
|
1501 | the commit you are merging with. During a rebase, ``$local`` represents the | |
1502 | destination of the rebase, and ``$other`` represents the commit being rebased. |
|
1502 | destination of the rebase, and ``$other`` represents the commit being rebased. | |
1503 |
|
1503 | |||
1504 | Some operations define custom labels to assist with identifying the revisions, |
|
1504 | Some operations define custom labels to assist with identifying the revisions, | |
1505 | accessible via ``$labellocal``, ``$labelother``, and ``$labelbase``. If custom |
|
1505 | accessible via ``$labellocal``, ``$labelother``, and ``$labelbase``. If custom | |
1506 | labels are not available, these will be ``local``, ``other``, and ``base``, |
|
1506 | labels are not available, these will be ``local``, ``other``, and ``base``, | |
1507 | respectively. |
|
1507 | respectively. | |
1508 | (default: ``$local $base $other``) |
|
1508 | (default: ``$local $base $other``) | |
1509 |
|
1509 | |||
1510 | ``premerge`` |
|
1510 | ``premerge`` | |
1511 | Attempt to run internal non-interactive 3-way merge tool before |
|
1511 | Attempt to run internal non-interactive 3-way merge tool before | |
1512 | launching external tool. Options are ``true``, ``false``, ``keep`` or |
|
1512 | launching external tool. Options are ``true``, ``false``, ``keep`` or | |
1513 | ``keep-merge3``. The ``keep`` option will leave markers in the file if the |
|
1513 | ``keep-merge3``. The ``keep`` option will leave markers in the file if the | |
1514 | premerge fails. The ``keep-merge3`` will do the same but include information |
|
1514 | premerge fails. The ``keep-merge3`` will do the same but include information | |
1515 | about the base of the merge in the marker (see internal :merge3 in |
|
1515 | about the base of the merge in the marker (see internal :merge3 in | |
1516 | :hg:`help merge-tools`). |
|
1516 | :hg:`help merge-tools`). | |
1517 | (default: True) |
|
1517 | (default: True) | |
1518 |
|
1518 | |||
1519 | ``binary`` |
|
1519 | ``binary`` | |
1520 | This tool can merge binary files. (default: False, unless tool |
|
1520 | This tool can merge binary files. (default: False, unless tool | |
1521 | was selected by file pattern match) |
|
1521 | was selected by file pattern match) | |
1522 |
|
1522 | |||
1523 | ``symlink`` |
|
1523 | ``symlink`` | |
1524 | This tool can merge symlinks. (default: False) |
|
1524 | This tool can merge symlinks. (default: False) | |
1525 |
|
1525 | |||
1526 | ``check`` |
|
1526 | ``check`` | |
1527 | A list of merge success-checking options: |
|
1527 | A list of merge success-checking options: | |
1528 |
|
1528 | |||
1529 | ``changed`` |
|
1529 | ``changed`` | |
1530 | Ask whether merge was successful when the merged file shows no changes. |
|
1530 | Ask whether merge was successful when the merged file shows no changes. | |
1531 | ``conflicts`` |
|
1531 | ``conflicts`` | |
1532 | Check whether there are conflicts even though the tool reported success. |
|
1532 | Check whether there are conflicts even though the tool reported success. | |
1533 | ``prompt`` |
|
1533 | ``prompt`` | |
1534 | Always prompt for merge success, regardless of success reported by tool. |
|
1534 | Always prompt for merge success, regardless of success reported by tool. | |
1535 |
|
1535 | |||
1536 | ``fixeol`` |
|
1536 | ``fixeol`` | |
1537 | Attempt to fix up EOL changes caused by the merge tool. |
|
1537 | Attempt to fix up EOL changes caused by the merge tool. | |
1538 | (default: False) |
|
1538 | (default: False) | |
1539 |
|
1539 | |||
1540 | ``gui`` |
|
1540 | ``gui`` | |
1541 | This tool requires a graphical interface to run. (default: False) |
|
1541 | This tool requires a graphical interface to run. (default: False) | |
1542 |
|
1542 | |||
1543 | ``mergemarkers`` |
|
1543 | ``mergemarkers`` | |
1544 | Controls whether the labels passed via ``$labellocal``, ``$labelother``, and |
|
1544 | Controls whether the labels passed via ``$labellocal``, ``$labelother``, and | |
1545 | ``$labelbase`` are ``detailed`` (respecting ``mergemarkertemplate``) or |
|
1545 | ``$labelbase`` are ``detailed`` (respecting ``mergemarkertemplate``) or | |
1546 | ``basic``. If ``premerge`` is ``keep`` or ``keep-merge3``, the conflict |
|
1546 | ``basic``. If ``premerge`` is ``keep`` or ``keep-merge3``, the conflict | |
1547 | markers generated during premerge will be ``detailed`` if either this option or |
|
1547 | markers generated during premerge will be ``detailed`` if either this option or | |
1548 | the corresponding option in the ``[ui]`` section is ``detailed``. |
|
1548 | the corresponding option in the ``[ui]`` section is ``detailed``. | |
1549 | (default: ``basic``) |
|
1549 | (default: ``basic``) | |
1550 |
|
1550 | |||
1551 | ``mergemarkertemplate`` |
|
1551 | ``mergemarkertemplate`` | |
1552 |
This setting can be used to override ``mergemarker |
|
1552 | This setting can be used to override ``mergemarker`` from the | |
1553 |
section on a per-tool basis; this applies to the |
|
1553 | ``[command-templates]`` section on a per-tool basis; this applies to the | |
1554 |
and to the conflict markers that are generated |
|
1554 | ``$label``-prefixed variables and to the conflict markers that are generated | |
1555 |
``keep-merge3``. See the corresponding variable |
|
1555 | if ``premerge`` is ``keep` or ``keep-merge3``. See the corresponding variable | |
1556 | information. |
|
1556 | in ``[ui]`` for more information. | |
1557 |
|
1557 | |||
1558 | .. container:: windows |
|
1558 | .. container:: windows | |
1559 |
|
1559 | |||
1560 | ``regkey`` |
|
1560 | ``regkey`` | |
1561 | Windows registry key which describes install location of this |
|
1561 | Windows registry key which describes install location of this | |
1562 | tool. Mercurial will search for this key first under |
|
1562 | tool. Mercurial will search for this key first under | |
1563 | ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``. |
|
1563 | ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``. | |
1564 | (default: None) |
|
1564 | (default: None) | |
1565 |
|
1565 | |||
1566 | ``regkeyalt`` |
|
1566 | ``regkeyalt`` | |
1567 | An alternate Windows registry key to try if the first key is not |
|
1567 | An alternate Windows registry key to try if the first key is not | |
1568 | found. The alternate key uses the same ``regname`` and ``regappend`` |
|
1568 | found. The alternate key uses the same ``regname`` and ``regappend`` | |
1569 | semantics of the primary key. The most common use for this key |
|
1569 | semantics of the primary key. The most common use for this key | |
1570 | is to search for 32bit applications on 64bit operating systems. |
|
1570 | is to search for 32bit applications on 64bit operating systems. | |
1571 | (default: None) |
|
1571 | (default: None) | |
1572 |
|
1572 | |||
1573 | ``regname`` |
|
1573 | ``regname`` | |
1574 | Name of value to read from specified registry key. |
|
1574 | Name of value to read from specified registry key. | |
1575 | (default: the unnamed (default) value) |
|
1575 | (default: the unnamed (default) value) | |
1576 |
|
1576 | |||
1577 | ``regappend`` |
|
1577 | ``regappend`` | |
1578 | String to append to the value read from the registry, typically |
|
1578 | String to append to the value read from the registry, typically | |
1579 | the executable name of the tool. |
|
1579 | the executable name of the tool. | |
1580 | (default: None) |
|
1580 | (default: None) | |
1581 |
|
1581 | |||
1582 | ``pager`` |
|
1582 | ``pager`` | |
1583 | --------- |
|
1583 | --------- | |
1584 |
|
1584 | |||
1585 | Setting used to control when to paginate and with what external tool. See |
|
1585 | Setting used to control when to paginate and with what external tool. See | |
1586 | :hg:`help pager` for details. |
|
1586 | :hg:`help pager` for details. | |
1587 |
|
1587 | |||
1588 | ``pager`` |
|
1588 | ``pager`` | |
1589 | Define the external tool used as pager. |
|
1589 | Define the external tool used as pager. | |
1590 |
|
1590 | |||
1591 | If no pager is set, Mercurial uses the environment variable $PAGER. |
|
1591 | If no pager is set, Mercurial uses the environment variable $PAGER. | |
1592 | If neither pager.pager, nor $PAGER is set, a default pager will be |
|
1592 | If neither pager.pager, nor $PAGER is set, a default pager will be | |
1593 | used, typically `less` on Unix and `more` on Windows. Example:: |
|
1593 | used, typically `less` on Unix and `more` on Windows. Example:: | |
1594 |
|
1594 | |||
1595 | [pager] |
|
1595 | [pager] | |
1596 | pager = less -FRX |
|
1596 | pager = less -FRX | |
1597 |
|
1597 | |||
1598 | ``ignore`` |
|
1598 | ``ignore`` | |
1599 | List of commands to disable the pager for. Example:: |
|
1599 | List of commands to disable the pager for. Example:: | |
1600 |
|
1600 | |||
1601 | [pager] |
|
1601 | [pager] | |
1602 | ignore = version, help, update |
|
1602 | ignore = version, help, update | |
1603 |
|
1603 | |||
1604 | ``patch`` |
|
1604 | ``patch`` | |
1605 | --------- |
|
1605 | --------- | |
1606 |
|
1606 | |||
1607 | Settings used when applying patches, for instance through the 'import' |
|
1607 | Settings used when applying patches, for instance through the 'import' | |
1608 | command or with Mercurial Queues extension. |
|
1608 | command or with Mercurial Queues extension. | |
1609 |
|
1609 | |||
1610 | ``eol`` |
|
1610 | ``eol`` | |
1611 | When set to 'strict' patch content and patched files end of lines |
|
1611 | When set to 'strict' patch content and patched files end of lines | |
1612 | are preserved. When set to ``lf`` or ``crlf``, both files end of |
|
1612 | are preserved. When set to ``lf`` or ``crlf``, both files end of | |
1613 | lines are ignored when patching and the result line endings are |
|
1613 | lines are ignored when patching and the result line endings are | |
1614 | normalized to either LF (Unix) or CRLF (Windows). When set to |
|
1614 | normalized to either LF (Unix) or CRLF (Windows). When set to | |
1615 | ``auto``, end of lines are again ignored while patching but line |
|
1615 | ``auto``, end of lines are again ignored while patching but line | |
1616 | endings in patched files are normalized to their original setting |
|
1616 | endings in patched files are normalized to their original setting | |
1617 | on a per-file basis. If target file does not exist or has no end |
|
1617 | on a per-file basis. If target file does not exist or has no end | |
1618 | of line, patch line endings are preserved. |
|
1618 | of line, patch line endings are preserved. | |
1619 | (default: strict) |
|
1619 | (default: strict) | |
1620 |
|
1620 | |||
1621 | ``fuzz`` |
|
1621 | ``fuzz`` | |
1622 | The number of lines of 'fuzz' to allow when applying patches. This |
|
1622 | The number of lines of 'fuzz' to allow when applying patches. This | |
1623 | controls how much context the patcher is allowed to ignore when |
|
1623 | controls how much context the patcher is allowed to ignore when | |
1624 | trying to apply a patch. |
|
1624 | trying to apply a patch. | |
1625 | (default: 2) |
|
1625 | (default: 2) | |
1626 |
|
1626 | |||
1627 | ``paths`` |
|
1627 | ``paths`` | |
1628 | --------- |
|
1628 | --------- | |
1629 |
|
1629 | |||
1630 | Assigns symbolic names and behavior to repositories. |
|
1630 | Assigns symbolic names and behavior to repositories. | |
1631 |
|
1631 | |||
1632 | Options are symbolic names defining the URL or directory that is the |
|
1632 | Options are symbolic names defining the URL or directory that is the | |
1633 | location of the repository. Example:: |
|
1633 | location of the repository. Example:: | |
1634 |
|
1634 | |||
1635 | [paths] |
|
1635 | [paths] | |
1636 | my_server = https://example.com/my_repo |
|
1636 | my_server = https://example.com/my_repo | |
1637 | local_path = /home/me/repo |
|
1637 | local_path = /home/me/repo | |
1638 |
|
1638 | |||
1639 | These symbolic names can be used from the command line. To pull |
|
1639 | These symbolic names can be used from the command line. To pull | |
1640 | from ``my_server``: :hg:`pull my_server`. To push to ``local_path``: |
|
1640 | from ``my_server``: :hg:`pull my_server`. To push to ``local_path``: | |
1641 | :hg:`push local_path`. |
|
1641 | :hg:`push local_path`. | |
1642 |
|
1642 | |||
1643 | Options containing colons (``:``) denote sub-options that can influence |
|
1643 | Options containing colons (``:``) denote sub-options that can influence | |
1644 | behavior for that specific path. Example:: |
|
1644 | behavior for that specific path. Example:: | |
1645 |
|
1645 | |||
1646 | [paths] |
|
1646 | [paths] | |
1647 | my_server = https://example.com/my_path |
|
1647 | my_server = https://example.com/my_path | |
1648 | my_server:pushurl = ssh://example.com/my_path |
|
1648 | my_server:pushurl = ssh://example.com/my_path | |
1649 |
|
1649 | |||
1650 | The following sub-options can be defined: |
|
1650 | The following sub-options can be defined: | |
1651 |
|
1651 | |||
1652 | ``pushurl`` |
|
1652 | ``pushurl`` | |
1653 | The URL to use for push operations. If not defined, the location |
|
1653 | The URL to use for push operations. If not defined, the location | |
1654 | defined by the path's main entry is used. |
|
1654 | defined by the path's main entry is used. | |
1655 |
|
1655 | |||
1656 | ``pushrev`` |
|
1656 | ``pushrev`` | |
1657 | A revset defining which revisions to push by default. |
|
1657 | A revset defining which revisions to push by default. | |
1658 |
|
1658 | |||
1659 | When :hg:`push` is executed without a ``-r`` argument, the revset |
|
1659 | When :hg:`push` is executed without a ``-r`` argument, the revset | |
1660 | defined by this sub-option is evaluated to determine what to push. |
|
1660 | defined by this sub-option is evaluated to determine what to push. | |
1661 |
|
1661 | |||
1662 | For example, a value of ``.`` will push the working directory's |
|
1662 | For example, a value of ``.`` will push the working directory's | |
1663 | revision by default. |
|
1663 | revision by default. | |
1664 |
|
1664 | |||
1665 | Revsets specifying bookmarks will not result in the bookmark being |
|
1665 | Revsets specifying bookmarks will not result in the bookmark being | |
1666 | pushed. |
|
1666 | pushed. | |
1667 |
|
1667 | |||
1668 | The following special named paths exist: |
|
1668 | The following special named paths exist: | |
1669 |
|
1669 | |||
1670 | ``default`` |
|
1670 | ``default`` | |
1671 | The URL or directory to use when no source or remote is specified. |
|
1671 | The URL or directory to use when no source or remote is specified. | |
1672 |
|
1672 | |||
1673 | :hg:`clone` will automatically define this path to the location the |
|
1673 | :hg:`clone` will automatically define this path to the location the | |
1674 | repository was cloned from. |
|
1674 | repository was cloned from. | |
1675 |
|
1675 | |||
1676 | ``default-push`` |
|
1676 | ``default-push`` | |
1677 | (deprecated) The URL or directory for the default :hg:`push` location. |
|
1677 | (deprecated) The URL or directory for the default :hg:`push` location. | |
1678 | ``default:pushurl`` should be used instead. |
|
1678 | ``default:pushurl`` should be used instead. | |
1679 |
|
1679 | |||
1680 | ``phases`` |
|
1680 | ``phases`` | |
1681 | ---------- |
|
1681 | ---------- | |
1682 |
|
1682 | |||
1683 | Specifies default handling of phases. See :hg:`help phases` for more |
|
1683 | Specifies default handling of phases. See :hg:`help phases` for more | |
1684 | information about working with phases. |
|
1684 | information about working with phases. | |
1685 |
|
1685 | |||
1686 | ``publish`` |
|
1686 | ``publish`` | |
1687 | Controls draft phase behavior when working as a server. When true, |
|
1687 | Controls draft phase behavior when working as a server. When true, | |
1688 | pushed changesets are set to public in both client and server and |
|
1688 | pushed changesets are set to public in both client and server and | |
1689 | pulled or cloned changesets are set to public in the client. |
|
1689 | pulled or cloned changesets are set to public in the client. | |
1690 | (default: True) |
|
1690 | (default: True) | |
1691 |
|
1691 | |||
1692 | ``new-commit`` |
|
1692 | ``new-commit`` | |
1693 | Phase of newly-created commits. |
|
1693 | Phase of newly-created commits. | |
1694 | (default: draft) |
|
1694 | (default: draft) | |
1695 |
|
1695 | |||
1696 | ``checksubrepos`` |
|
1696 | ``checksubrepos`` | |
1697 | Check the phase of the current revision of each subrepository. Allowed |
|
1697 | Check the phase of the current revision of each subrepository. Allowed | |
1698 | values are "ignore", "follow" and "abort". For settings other than |
|
1698 | values are "ignore", "follow" and "abort". For settings other than | |
1699 | "ignore", the phase of the current revision of each subrepository is |
|
1699 | "ignore", the phase of the current revision of each subrepository is | |
1700 | checked before committing the parent repository. If any of those phases is |
|
1700 | checked before committing the parent repository. If any of those phases is | |
1701 | greater than the phase of the parent repository (e.g. if a subrepo is in a |
|
1701 | greater than the phase of the parent repository (e.g. if a subrepo is in a | |
1702 | "secret" phase while the parent repo is in "draft" phase), the commit is |
|
1702 | "secret" phase while the parent repo is in "draft" phase), the commit is | |
1703 | either aborted (if checksubrepos is set to "abort") or the higher phase is |
|
1703 | either aborted (if checksubrepos is set to "abort") or the higher phase is | |
1704 | used for the parent repository commit (if set to "follow"). |
|
1704 | used for the parent repository commit (if set to "follow"). | |
1705 | (default: follow) |
|
1705 | (default: follow) | |
1706 |
|
1706 | |||
1707 |
|
1707 | |||
1708 | ``profiling`` |
|
1708 | ``profiling`` | |
1709 | ------------- |
|
1709 | ------------- | |
1710 |
|
1710 | |||
1711 | Specifies profiling type, format, and file output. Two profilers are |
|
1711 | Specifies profiling type, format, and file output. Two profilers are | |
1712 | supported: an instrumenting profiler (named ``ls``), and a sampling |
|
1712 | supported: an instrumenting profiler (named ``ls``), and a sampling | |
1713 | profiler (named ``stat``). |
|
1713 | profiler (named ``stat``). | |
1714 |
|
1714 | |||
1715 | In this section description, 'profiling data' stands for the raw data |
|
1715 | In this section description, 'profiling data' stands for the raw data | |
1716 | collected during profiling, while 'profiling report' stands for a |
|
1716 | collected during profiling, while 'profiling report' stands for a | |
1717 | statistical text report generated from the profiling data. |
|
1717 | statistical text report generated from the profiling data. | |
1718 |
|
1718 | |||
1719 | ``enabled`` |
|
1719 | ``enabled`` | |
1720 | Enable the profiler. |
|
1720 | Enable the profiler. | |
1721 | (default: false) |
|
1721 | (default: false) | |
1722 |
|
1722 | |||
1723 | This is equivalent to passing ``--profile`` on the command line. |
|
1723 | This is equivalent to passing ``--profile`` on the command line. | |
1724 |
|
1724 | |||
1725 | ``type`` |
|
1725 | ``type`` | |
1726 | The type of profiler to use. |
|
1726 | The type of profiler to use. | |
1727 | (default: stat) |
|
1727 | (default: stat) | |
1728 |
|
1728 | |||
1729 | ``ls`` |
|
1729 | ``ls`` | |
1730 | Use Python's built-in instrumenting profiler. This profiler |
|
1730 | Use Python's built-in instrumenting profiler. This profiler | |
1731 | works on all platforms, but each line number it reports is the |
|
1731 | works on all platforms, but each line number it reports is the | |
1732 | first line of a function. This restriction makes it difficult to |
|
1732 | first line of a function. This restriction makes it difficult to | |
1733 | identify the expensive parts of a non-trivial function. |
|
1733 | identify the expensive parts of a non-trivial function. | |
1734 | ``stat`` |
|
1734 | ``stat`` | |
1735 | Use a statistical profiler, statprof. This profiler is most |
|
1735 | Use a statistical profiler, statprof. This profiler is most | |
1736 | useful for profiling commands that run for longer than about 0.1 |
|
1736 | useful for profiling commands that run for longer than about 0.1 | |
1737 | seconds. |
|
1737 | seconds. | |
1738 |
|
1738 | |||
1739 | ``format`` |
|
1739 | ``format`` | |
1740 | Profiling format. Specific to the ``ls`` instrumenting profiler. |
|
1740 | Profiling format. Specific to the ``ls`` instrumenting profiler. | |
1741 | (default: text) |
|
1741 | (default: text) | |
1742 |
|
1742 | |||
1743 | ``text`` |
|
1743 | ``text`` | |
1744 | Generate a profiling report. When saving to a file, it should be |
|
1744 | Generate a profiling report. When saving to a file, it should be | |
1745 | noted that only the report is saved, and the profiling data is |
|
1745 | noted that only the report is saved, and the profiling data is | |
1746 | not kept. |
|
1746 | not kept. | |
1747 | ``kcachegrind`` |
|
1747 | ``kcachegrind`` | |
1748 | Format profiling data for kcachegrind use: when saving to a |
|
1748 | Format profiling data for kcachegrind use: when saving to a | |
1749 | file, the generated file can directly be loaded into |
|
1749 | file, the generated file can directly be loaded into | |
1750 | kcachegrind. |
|
1750 | kcachegrind. | |
1751 |
|
1751 | |||
1752 | ``statformat`` |
|
1752 | ``statformat`` | |
1753 | Profiling format for the ``stat`` profiler. |
|
1753 | Profiling format for the ``stat`` profiler. | |
1754 | (default: hotpath) |
|
1754 | (default: hotpath) | |
1755 |
|
1755 | |||
1756 | ``hotpath`` |
|
1756 | ``hotpath`` | |
1757 | Show a tree-based display containing the hot path of execution (where |
|
1757 | Show a tree-based display containing the hot path of execution (where | |
1758 | most time was spent). |
|
1758 | most time was spent). | |
1759 | ``bymethod`` |
|
1759 | ``bymethod`` | |
1760 | Show a table of methods ordered by how frequently they are active. |
|
1760 | Show a table of methods ordered by how frequently they are active. | |
1761 | ``byline`` |
|
1761 | ``byline`` | |
1762 | Show a table of lines in files ordered by how frequently they are active. |
|
1762 | Show a table of lines in files ordered by how frequently they are active. | |
1763 | ``json`` |
|
1763 | ``json`` | |
1764 | Render profiling data as JSON. |
|
1764 | Render profiling data as JSON. | |
1765 |
|
1765 | |||
1766 | ``frequency`` |
|
1766 | ``frequency`` | |
1767 | Sampling frequency. Specific to the ``stat`` sampling profiler. |
|
1767 | Sampling frequency. Specific to the ``stat`` sampling profiler. | |
1768 | (default: 1000) |
|
1768 | (default: 1000) | |
1769 |
|
1769 | |||
1770 | ``output`` |
|
1770 | ``output`` | |
1771 | File path where profiling data or report should be saved. If the |
|
1771 | File path where profiling data or report should be saved. If the | |
1772 | file exists, it is replaced. (default: None, data is printed on |
|
1772 | file exists, it is replaced. (default: None, data is printed on | |
1773 | stderr) |
|
1773 | stderr) | |
1774 |
|
1774 | |||
1775 | ``sort`` |
|
1775 | ``sort`` | |
1776 | Sort field. Specific to the ``ls`` instrumenting profiler. |
|
1776 | Sort field. Specific to the ``ls`` instrumenting profiler. | |
1777 | One of ``callcount``, ``reccallcount``, ``totaltime`` and |
|
1777 | One of ``callcount``, ``reccallcount``, ``totaltime`` and | |
1778 | ``inlinetime``. |
|
1778 | ``inlinetime``. | |
1779 | (default: inlinetime) |
|
1779 | (default: inlinetime) | |
1780 |
|
1780 | |||
1781 | ``time-track`` |
|
1781 | ``time-track`` | |
1782 | Control if the stat profiler track ``cpu`` or ``real`` time. |
|
1782 | Control if the stat profiler track ``cpu`` or ``real`` time. | |
1783 | (default: ``cpu`` on Windows, otherwise ``real``) |
|
1783 | (default: ``cpu`` on Windows, otherwise ``real``) | |
1784 |
|
1784 | |||
1785 | ``limit`` |
|
1785 | ``limit`` | |
1786 | Number of lines to show. Specific to the ``ls`` instrumenting profiler. |
|
1786 | Number of lines to show. Specific to the ``ls`` instrumenting profiler. | |
1787 | (default: 30) |
|
1787 | (default: 30) | |
1788 |
|
1788 | |||
1789 | ``nested`` |
|
1789 | ``nested`` | |
1790 | Show at most this number of lines of drill-down info after each main entry. |
|
1790 | Show at most this number of lines of drill-down info after each main entry. | |
1791 | This can help explain the difference between Total and Inline. |
|
1791 | This can help explain the difference between Total and Inline. | |
1792 | Specific to the ``ls`` instrumenting profiler. |
|
1792 | Specific to the ``ls`` instrumenting profiler. | |
1793 | (default: 0) |
|
1793 | (default: 0) | |
1794 |
|
1794 | |||
1795 | ``showmin`` |
|
1795 | ``showmin`` | |
1796 | Minimum fraction of samples an entry must have for it to be displayed. |
|
1796 | Minimum fraction of samples an entry must have for it to be displayed. | |
1797 | Can be specified as a float between ``0.0`` and ``1.0`` or can have a |
|
1797 | Can be specified as a float between ``0.0`` and ``1.0`` or can have a | |
1798 | ``%`` afterwards to allow values up to ``100``. e.g. ``5%``. |
|
1798 | ``%`` afterwards to allow values up to ``100``. e.g. ``5%``. | |
1799 |
|
1799 | |||
1800 | Only used by the ``stat`` profiler. |
|
1800 | Only used by the ``stat`` profiler. | |
1801 |
|
1801 | |||
1802 | For the ``hotpath`` format, default is ``0.05``. |
|
1802 | For the ``hotpath`` format, default is ``0.05``. | |
1803 | For the ``chrome`` format, default is ``0.005``. |
|
1803 | For the ``chrome`` format, default is ``0.005``. | |
1804 |
|
1804 | |||
1805 | The option is unused on other formats. |
|
1805 | The option is unused on other formats. | |
1806 |
|
1806 | |||
1807 | ``showmax`` |
|
1807 | ``showmax`` | |
1808 | Maximum fraction of samples an entry can have before it is ignored in |
|
1808 | Maximum fraction of samples an entry can have before it is ignored in | |
1809 | display. Values format is the same as ``showmin``. |
|
1809 | display. Values format is the same as ``showmin``. | |
1810 |
|
1810 | |||
1811 | Only used by the ``stat`` profiler. |
|
1811 | Only used by the ``stat`` profiler. | |
1812 |
|
1812 | |||
1813 | For the ``chrome`` format, default is ``0.999``. |
|
1813 | For the ``chrome`` format, default is ``0.999``. | |
1814 |
|
1814 | |||
1815 | The option is unused on other formats. |
|
1815 | The option is unused on other formats. | |
1816 |
|
1816 | |||
1817 | ``showtime`` |
|
1817 | ``showtime`` | |
1818 | Show time taken as absolute durations, in addition to percentages. |
|
1818 | Show time taken as absolute durations, in addition to percentages. | |
1819 | Only used by the ``hotpath`` format. |
|
1819 | Only used by the ``hotpath`` format. | |
1820 | (default: true) |
|
1820 | (default: true) | |
1821 |
|
1821 | |||
1822 | ``progress`` |
|
1822 | ``progress`` | |
1823 | ------------ |
|
1823 | ------------ | |
1824 |
|
1824 | |||
1825 | Mercurial commands can draw progress bars that are as informative as |
|
1825 | Mercurial commands can draw progress bars that are as informative as | |
1826 | possible. Some progress bars only offer indeterminate information, while others |
|
1826 | possible. Some progress bars only offer indeterminate information, while others | |
1827 | have a definite end point. |
|
1827 | have a definite end point. | |
1828 |
|
1828 | |||
1829 | ``debug`` |
|
1829 | ``debug`` | |
1830 | Whether to print debug info when updating the progress bar. (default: False) |
|
1830 | Whether to print debug info when updating the progress bar. (default: False) | |
1831 |
|
1831 | |||
1832 | ``delay`` |
|
1832 | ``delay`` | |
1833 | Number of seconds (float) before showing the progress bar. (default: 3) |
|
1833 | Number of seconds (float) before showing the progress bar. (default: 3) | |
1834 |
|
1834 | |||
1835 | ``changedelay`` |
|
1835 | ``changedelay`` | |
1836 | Minimum delay before showing a new topic. When set to less than 3 * refresh, |
|
1836 | Minimum delay before showing a new topic. When set to less than 3 * refresh, | |
1837 | that value will be used instead. (default: 1) |
|
1837 | that value will be used instead. (default: 1) | |
1838 |
|
1838 | |||
1839 | ``estimateinterval`` |
|
1839 | ``estimateinterval`` | |
1840 | Maximum sampling interval in seconds for speed and estimated time |
|
1840 | Maximum sampling interval in seconds for speed and estimated time | |
1841 | calculation. (default: 60) |
|
1841 | calculation. (default: 60) | |
1842 |
|
1842 | |||
1843 | ``refresh`` |
|
1843 | ``refresh`` | |
1844 | Time in seconds between refreshes of the progress bar. (default: 0.1) |
|
1844 | Time in seconds between refreshes of the progress bar. (default: 0.1) | |
1845 |
|
1845 | |||
1846 | ``format`` |
|
1846 | ``format`` | |
1847 | Format of the progress bar. |
|
1847 | Format of the progress bar. | |
1848 |
|
1848 | |||
1849 | Valid entries for the format field are ``topic``, ``bar``, ``number``, |
|
1849 | Valid entries for the format field are ``topic``, ``bar``, ``number``, | |
1850 | ``unit``, ``estimate``, ``speed``, and ``item``. ``item`` defaults to the |
|
1850 | ``unit``, ``estimate``, ``speed``, and ``item``. ``item`` defaults to the | |
1851 | last 20 characters of the item, but this can be changed by adding either |
|
1851 | last 20 characters of the item, but this can be changed by adding either | |
1852 | ``-<num>`` which would take the last num characters, or ``+<num>`` for the |
|
1852 | ``-<num>`` which would take the last num characters, or ``+<num>`` for the | |
1853 | first num characters. |
|
1853 | first num characters. | |
1854 |
|
1854 | |||
1855 | (default: topic bar number estimate) |
|
1855 | (default: topic bar number estimate) | |
1856 |
|
1856 | |||
1857 | ``width`` |
|
1857 | ``width`` | |
1858 | If set, the maximum width of the progress information (that is, min(width, |
|
1858 | If set, the maximum width of the progress information (that is, min(width, | |
1859 | term width) will be used). |
|
1859 | term width) will be used). | |
1860 |
|
1860 | |||
1861 | ``clear-complete`` |
|
1861 | ``clear-complete`` | |
1862 | Clear the progress bar after it's done. (default: True) |
|
1862 | Clear the progress bar after it's done. (default: True) | |
1863 |
|
1863 | |||
1864 | ``disable`` |
|
1864 | ``disable`` | |
1865 | If true, don't show a progress bar. |
|
1865 | If true, don't show a progress bar. | |
1866 |
|
1866 | |||
1867 | ``assume-tty`` |
|
1867 | ``assume-tty`` | |
1868 | If true, ALWAYS show a progress bar, unless disable is given. |
|
1868 | If true, ALWAYS show a progress bar, unless disable is given. | |
1869 |
|
1869 | |||
1870 | ``rebase`` |
|
1870 | ``rebase`` | |
1871 | ---------- |
|
1871 | ---------- | |
1872 |
|
1872 | |||
1873 | ``evolution.allowdivergence`` |
|
1873 | ``evolution.allowdivergence`` | |
1874 | Default to False, when True allow creating divergence when performing |
|
1874 | Default to False, when True allow creating divergence when performing | |
1875 | rebase of obsolete changesets. |
|
1875 | rebase of obsolete changesets. | |
1876 |
|
1876 | |||
1877 | ``revsetalias`` |
|
1877 | ``revsetalias`` | |
1878 | --------------- |
|
1878 | --------------- | |
1879 |
|
1879 | |||
1880 | Alias definitions for revsets. See :hg:`help revsets` for details. |
|
1880 | Alias definitions for revsets. See :hg:`help revsets` for details. | |
1881 |
|
1881 | |||
1882 | ``rewrite`` |
|
1882 | ``rewrite`` | |
1883 | ----------- |
|
1883 | ----------- | |
1884 |
|
1884 | |||
1885 | ``backup-bundle`` |
|
1885 | ``backup-bundle`` | |
1886 | Whether to save stripped changesets to a bundle file. (default: True) |
|
1886 | Whether to save stripped changesets to a bundle file. (default: True) | |
1887 |
|
1887 | |||
1888 | ``update-timestamp`` |
|
1888 | ``update-timestamp`` | |
1889 | If true, updates the date and time of the changeset to current. It is only |
|
1889 | If true, updates the date and time of the changeset to current. It is only | |
1890 | applicable for `hg amend`, `hg commit --amend` and `hg uncommit` in the |
|
1890 | applicable for `hg amend`, `hg commit --amend` and `hg uncommit` in the | |
1891 | current version. |
|
1891 | current version. | |
1892 |
|
1892 | |||
1893 | ``empty-successor`` |
|
1893 | ``empty-successor`` | |
1894 |
|
1894 | |||
1895 | Control what happens with empty successors that are the result of rewrite |
|
1895 | Control what happens with empty successors that are the result of rewrite | |
1896 | operations. If set to ``skip``, the successor is not created. If set to |
|
1896 | operations. If set to ``skip``, the successor is not created. If set to | |
1897 | ``keep``, the empty successor is created and kept. |
|
1897 | ``keep``, the empty successor is created and kept. | |
1898 |
|
1898 | |||
1899 | Currently, only the rebase and absorb commands consider this configuration. |
|
1899 | Currently, only the rebase and absorb commands consider this configuration. | |
1900 | (EXPERIMENTAL) |
|
1900 | (EXPERIMENTAL) | |
1901 |
|
1901 | |||
1902 | ``storage`` |
|
1902 | ``storage`` | |
1903 | ----------- |
|
1903 | ----------- | |
1904 |
|
1904 | |||
1905 | Control the strategy Mercurial uses internally to store history. Options in this |
|
1905 | Control the strategy Mercurial uses internally to store history. Options in this | |
1906 | category impact performance and repository size. |
|
1906 | category impact performance and repository size. | |
1907 |
|
1907 | |||
1908 | ``revlog.optimize-delta-parent-choice`` |
|
1908 | ``revlog.optimize-delta-parent-choice`` | |
1909 | When storing a merge revision, both parents will be equally considered as |
|
1909 | When storing a merge revision, both parents will be equally considered as | |
1910 | a possible delta base. This results in better delta selection and improved |
|
1910 | a possible delta base. This results in better delta selection and improved | |
1911 | revlog compression. This option is enabled by default. |
|
1911 | revlog compression. This option is enabled by default. | |
1912 |
|
1912 | |||
1913 | Turning this option off can result in large increase of repository size for |
|
1913 | Turning this option off can result in large increase of repository size for | |
1914 | repository with many merges. |
|
1914 | repository with many merges. | |
1915 |
|
1915 | |||
1916 | ``revlog.reuse-external-delta-parent`` |
|
1916 | ``revlog.reuse-external-delta-parent`` | |
1917 | Control the order in which delta parents are considered when adding new |
|
1917 | Control the order in which delta parents are considered when adding new | |
1918 | revisions from an external source. |
|
1918 | revisions from an external source. | |
1919 | (typically: apply bundle from `hg pull` or `hg push`). |
|
1919 | (typically: apply bundle from `hg pull` or `hg push`). | |
1920 |
|
1920 | |||
1921 | New revisions are usually provided as a delta against other revisions. By |
|
1921 | New revisions are usually provided as a delta against other revisions. By | |
1922 | default, Mercurial will try to reuse this delta first, therefore using the |
|
1922 | default, Mercurial will try to reuse this delta first, therefore using the | |
1923 | same "delta parent" as the source. Directly using delta's from the source |
|
1923 | same "delta parent" as the source. Directly using delta's from the source | |
1924 | reduces CPU usage and usually speeds up operation. However, in some case, |
|
1924 | reduces CPU usage and usually speeds up operation. However, in some case, | |
1925 | the source might have sub-optimal delta bases and forcing their reevaluation |
|
1925 | the source might have sub-optimal delta bases and forcing their reevaluation | |
1926 | is useful. For example, pushes from an old client could have sub-optimal |
|
1926 | is useful. For example, pushes from an old client could have sub-optimal | |
1927 | delta's parent that the server want to optimize. (lack of general delta, bad |
|
1927 | delta's parent that the server want to optimize. (lack of general delta, bad | |
1928 | parents, choice, lack of sparse-revlog, etc). |
|
1928 | parents, choice, lack of sparse-revlog, etc). | |
1929 |
|
1929 | |||
1930 | This option is enabled by default. Turning it off will ensure bad delta |
|
1930 | This option is enabled by default. Turning it off will ensure bad delta | |
1931 | parent choices from older client do not propagate to this repository, at |
|
1931 | parent choices from older client do not propagate to this repository, at | |
1932 | the cost of a small increase in CPU consumption. |
|
1932 | the cost of a small increase in CPU consumption. | |
1933 |
|
1933 | |||
1934 | Note: this option only control the order in which delta parents are |
|
1934 | Note: this option only control the order in which delta parents are | |
1935 | considered. Even when disabled, the existing delta from the source will be |
|
1935 | considered. Even when disabled, the existing delta from the source will be | |
1936 | reused if the same delta parent is selected. |
|
1936 | reused if the same delta parent is selected. | |
1937 |
|
1937 | |||
1938 | ``revlog.reuse-external-delta`` |
|
1938 | ``revlog.reuse-external-delta`` | |
1939 | Control the reuse of delta from external source. |
|
1939 | Control the reuse of delta from external source. | |
1940 | (typically: apply bundle from `hg pull` or `hg push`). |
|
1940 | (typically: apply bundle from `hg pull` or `hg push`). | |
1941 |
|
1941 | |||
1942 | New revisions are usually provided as a delta against another revision. By |
|
1942 | New revisions are usually provided as a delta against another revision. By | |
1943 | default, Mercurial will not recompute the same delta again, trusting |
|
1943 | default, Mercurial will not recompute the same delta again, trusting | |
1944 | externally provided deltas. There have been rare cases of small adjustment |
|
1944 | externally provided deltas. There have been rare cases of small adjustment | |
1945 | to the diffing algorithm in the past. So in some rare case, recomputing |
|
1945 | to the diffing algorithm in the past. So in some rare case, recomputing | |
1946 | delta provided by ancient clients can provides better results. Disabling |
|
1946 | delta provided by ancient clients can provides better results. Disabling | |
1947 | this option means going through a full delta recomputation for all incoming |
|
1947 | this option means going through a full delta recomputation for all incoming | |
1948 | revisions. It means a large increase in CPU usage and will slow operations |
|
1948 | revisions. It means a large increase in CPU usage and will slow operations | |
1949 | down. |
|
1949 | down. | |
1950 |
|
1950 | |||
1951 | This option is enabled by default. When disabled, it also disables the |
|
1951 | This option is enabled by default. When disabled, it also disables the | |
1952 | related ``storage.revlog.reuse-external-delta-parent`` option. |
|
1952 | related ``storage.revlog.reuse-external-delta-parent`` option. | |
1953 |
|
1953 | |||
1954 | ``revlog.zlib.level`` |
|
1954 | ``revlog.zlib.level`` | |
1955 | Zlib compression level used when storing data into the repository. Accepted |
|
1955 | Zlib compression level used when storing data into the repository. Accepted | |
1956 | Value range from 1 (lowest compression) to 9 (highest compression). Zlib |
|
1956 | Value range from 1 (lowest compression) to 9 (highest compression). Zlib | |
1957 | default value is 6. |
|
1957 | default value is 6. | |
1958 |
|
1958 | |||
1959 |
|
1959 | |||
1960 | ``revlog.zstd.level`` |
|
1960 | ``revlog.zstd.level`` | |
1961 | zstd compression level used when storing data into the repository. Accepted |
|
1961 | zstd compression level used when storing data into the repository. Accepted | |
1962 | Value range from 1 (lowest compression) to 22 (highest compression). |
|
1962 | Value range from 1 (lowest compression) to 22 (highest compression). | |
1963 | (default 3) |
|
1963 | (default 3) | |
1964 |
|
1964 | |||
1965 | ``server`` |
|
1965 | ``server`` | |
1966 | ---------- |
|
1966 | ---------- | |
1967 |
|
1967 | |||
1968 | Controls generic server settings. |
|
1968 | Controls generic server settings. | |
1969 |
|
1969 | |||
1970 | ``bookmarks-pushkey-compat`` |
|
1970 | ``bookmarks-pushkey-compat`` | |
1971 | Trigger pushkey hook when being pushed bookmark updates. This config exist |
|
1971 | Trigger pushkey hook when being pushed bookmark updates. This config exist | |
1972 | for compatibility purpose (default to True) |
|
1972 | for compatibility purpose (default to True) | |
1973 |
|
1973 | |||
1974 | If you use ``pushkey`` and ``pre-pushkey`` hooks to control bookmark |
|
1974 | If you use ``pushkey`` and ``pre-pushkey`` hooks to control bookmark | |
1975 | movement we recommend you migrate them to ``txnclose-bookmark`` and |
|
1975 | movement we recommend you migrate them to ``txnclose-bookmark`` and | |
1976 | ``pretxnclose-bookmark``. |
|
1976 | ``pretxnclose-bookmark``. | |
1977 |
|
1977 | |||
1978 | ``compressionengines`` |
|
1978 | ``compressionengines`` | |
1979 | List of compression engines and their relative priority to advertise |
|
1979 | List of compression engines and their relative priority to advertise | |
1980 | to clients. |
|
1980 | to clients. | |
1981 |
|
1981 | |||
1982 | The order of compression engines determines their priority, the first |
|
1982 | The order of compression engines determines their priority, the first | |
1983 | having the highest priority. If a compression engine is not listed |
|
1983 | having the highest priority. If a compression engine is not listed | |
1984 | here, it won't be advertised to clients. |
|
1984 | here, it won't be advertised to clients. | |
1985 |
|
1985 | |||
1986 | If not set (the default), built-in defaults are used. Run |
|
1986 | If not set (the default), built-in defaults are used. Run | |
1987 | :hg:`debuginstall` to list available compression engines and their |
|
1987 | :hg:`debuginstall` to list available compression engines and their | |
1988 | default wire protocol priority. |
|
1988 | default wire protocol priority. | |
1989 |
|
1989 | |||
1990 | Older Mercurial clients only support zlib compression and this setting |
|
1990 | Older Mercurial clients only support zlib compression and this setting | |
1991 | has no effect for legacy clients. |
|
1991 | has no effect for legacy clients. | |
1992 |
|
1992 | |||
1993 | ``uncompressed`` |
|
1993 | ``uncompressed`` | |
1994 | Whether to allow clients to clone a repository using the |
|
1994 | Whether to allow clients to clone a repository using the | |
1995 | uncompressed streaming protocol. This transfers about 40% more |
|
1995 | uncompressed streaming protocol. This transfers about 40% more | |
1996 | data than a regular clone, but uses less memory and CPU on both |
|
1996 | data than a regular clone, but uses less memory and CPU on both | |
1997 | server and client. Over a LAN (100 Mbps or better) or a very fast |
|
1997 | server and client. Over a LAN (100 Mbps or better) or a very fast | |
1998 | WAN, an uncompressed streaming clone is a lot faster (~10x) than a |
|
1998 | WAN, an uncompressed streaming clone is a lot faster (~10x) than a | |
1999 | regular clone. Over most WAN connections (anything slower than |
|
1999 | regular clone. Over most WAN connections (anything slower than | |
2000 | about 6 Mbps), uncompressed streaming is slower, because of the |
|
2000 | about 6 Mbps), uncompressed streaming is slower, because of the | |
2001 | extra data transfer overhead. This mode will also temporarily hold |
|
2001 | extra data transfer overhead. This mode will also temporarily hold | |
2002 | the write lock while determining what data to transfer. |
|
2002 | the write lock while determining what data to transfer. | |
2003 | (default: True) |
|
2003 | (default: True) | |
2004 |
|
2004 | |||
2005 | ``uncompressedallowsecret`` |
|
2005 | ``uncompressedallowsecret`` | |
2006 | Whether to allow stream clones when the repository contains secret |
|
2006 | Whether to allow stream clones when the repository contains secret | |
2007 | changesets. (default: False) |
|
2007 | changesets. (default: False) | |
2008 |
|
2008 | |||
2009 | ``preferuncompressed`` |
|
2009 | ``preferuncompressed`` | |
2010 | When set, clients will try to use the uncompressed streaming |
|
2010 | When set, clients will try to use the uncompressed streaming | |
2011 | protocol. (default: False) |
|
2011 | protocol. (default: False) | |
2012 |
|
2012 | |||
2013 | ``disablefullbundle`` |
|
2013 | ``disablefullbundle`` | |
2014 | When set, servers will refuse attempts to do pull-based clones. |
|
2014 | When set, servers will refuse attempts to do pull-based clones. | |
2015 | If this option is set, ``preferuncompressed`` and/or clone bundles |
|
2015 | If this option is set, ``preferuncompressed`` and/or clone bundles | |
2016 | are highly recommended. Partial clones will still be allowed. |
|
2016 | are highly recommended. Partial clones will still be allowed. | |
2017 | (default: False) |
|
2017 | (default: False) | |
2018 |
|
2018 | |||
2019 | ``streamunbundle`` |
|
2019 | ``streamunbundle`` | |
2020 | When set, servers will apply data sent from the client directly, |
|
2020 | When set, servers will apply data sent from the client directly, | |
2021 | otherwise it will be written to a temporary file first. This option |
|
2021 | otherwise it will be written to a temporary file first. This option | |
2022 | effectively prevents concurrent pushes. |
|
2022 | effectively prevents concurrent pushes. | |
2023 |
|
2023 | |||
2024 | ``pullbundle`` |
|
2024 | ``pullbundle`` | |
2025 | When set, the server will check pullbundle.manifest for bundles |
|
2025 | When set, the server will check pullbundle.manifest for bundles | |
2026 | covering the requested heads and common nodes. The first matching |
|
2026 | covering the requested heads and common nodes. The first matching | |
2027 | entry will be streamed to the client. |
|
2027 | entry will be streamed to the client. | |
2028 |
|
2028 | |||
2029 | For HTTP transport, the stream will still use zlib compression |
|
2029 | For HTTP transport, the stream will still use zlib compression | |
2030 | for older clients. |
|
2030 | for older clients. | |
2031 |
|
2031 | |||
2032 | ``concurrent-push-mode`` |
|
2032 | ``concurrent-push-mode`` | |
2033 | Level of allowed race condition between two pushing clients. |
|
2033 | Level of allowed race condition between two pushing clients. | |
2034 |
|
2034 | |||
2035 | - 'strict': push is abort if another client touched the repository |
|
2035 | - 'strict': push is abort if another client touched the repository | |
2036 | while the push was preparing. |
|
2036 | while the push was preparing. | |
2037 | - 'check-related': push is only aborted if it affects head that got also |
|
2037 | - 'check-related': push is only aborted if it affects head that got also | |
2038 | affected while the push was preparing. (default since 5.4) |
|
2038 | affected while the push was preparing. (default since 5.4) | |
2039 |
|
2039 | |||
2040 | 'check-related' only takes effect for compatible clients (version |
|
2040 | 'check-related' only takes effect for compatible clients (version | |
2041 | 4.3 and later). Older clients will use 'strict'. |
|
2041 | 4.3 and later). Older clients will use 'strict'. | |
2042 |
|
2042 | |||
2043 | ``validate`` |
|
2043 | ``validate`` | |
2044 | Whether to validate the completeness of pushed changesets by |
|
2044 | Whether to validate the completeness of pushed changesets by | |
2045 | checking that all new file revisions specified in manifests are |
|
2045 | checking that all new file revisions specified in manifests are | |
2046 | present. (default: False) |
|
2046 | present. (default: False) | |
2047 |
|
2047 | |||
2048 | ``maxhttpheaderlen`` |
|
2048 | ``maxhttpheaderlen`` | |
2049 | Instruct HTTP clients not to send request headers longer than this |
|
2049 | Instruct HTTP clients not to send request headers longer than this | |
2050 | many bytes. (default: 1024) |
|
2050 | many bytes. (default: 1024) | |
2051 |
|
2051 | |||
2052 | ``bundle1`` |
|
2052 | ``bundle1`` | |
2053 | Whether to allow clients to push and pull using the legacy bundle1 |
|
2053 | Whether to allow clients to push and pull using the legacy bundle1 | |
2054 | exchange format. (default: True) |
|
2054 | exchange format. (default: True) | |
2055 |
|
2055 | |||
2056 | ``bundle1gd`` |
|
2056 | ``bundle1gd`` | |
2057 | Like ``bundle1`` but only used if the repository is using the |
|
2057 | Like ``bundle1`` but only used if the repository is using the | |
2058 | *generaldelta* storage format. (default: True) |
|
2058 | *generaldelta* storage format. (default: True) | |
2059 |
|
2059 | |||
2060 | ``bundle1.push`` |
|
2060 | ``bundle1.push`` | |
2061 | Whether to allow clients to push using the legacy bundle1 exchange |
|
2061 | Whether to allow clients to push using the legacy bundle1 exchange | |
2062 | format. (default: True) |
|
2062 | format. (default: True) | |
2063 |
|
2063 | |||
2064 | ``bundle1gd.push`` |
|
2064 | ``bundle1gd.push`` | |
2065 | Like ``bundle1.push`` but only used if the repository is using the |
|
2065 | Like ``bundle1.push`` but only used if the repository is using the | |
2066 | *generaldelta* storage format. (default: True) |
|
2066 | *generaldelta* storage format. (default: True) | |
2067 |
|
2067 | |||
2068 | ``bundle1.pull`` |
|
2068 | ``bundle1.pull`` | |
2069 | Whether to allow clients to pull using the legacy bundle1 exchange |
|
2069 | Whether to allow clients to pull using the legacy bundle1 exchange | |
2070 | format. (default: True) |
|
2070 | format. (default: True) | |
2071 |
|
2071 | |||
2072 | ``bundle1gd.pull`` |
|
2072 | ``bundle1gd.pull`` | |
2073 | Like ``bundle1.pull`` but only used if the repository is using the |
|
2073 | Like ``bundle1.pull`` but only used if the repository is using the | |
2074 | *generaldelta* storage format. (default: True) |
|
2074 | *generaldelta* storage format. (default: True) | |
2075 |
|
2075 | |||
2076 | Large repositories using the *generaldelta* storage format should |
|
2076 | Large repositories using the *generaldelta* storage format should | |
2077 | consider setting this option because converting *generaldelta* |
|
2077 | consider setting this option because converting *generaldelta* | |
2078 | repositories to the exchange format required by the bundle1 data |
|
2078 | repositories to the exchange format required by the bundle1 data | |
2079 | format can consume a lot of CPU. |
|
2079 | format can consume a lot of CPU. | |
2080 |
|
2080 | |||
2081 | ``bundle2.stream`` |
|
2081 | ``bundle2.stream`` | |
2082 | Whether to allow clients to pull using the bundle2 streaming protocol. |
|
2082 | Whether to allow clients to pull using the bundle2 streaming protocol. | |
2083 | (default: True) |
|
2083 | (default: True) | |
2084 |
|
2084 | |||
2085 | ``zliblevel`` |
|
2085 | ``zliblevel`` | |
2086 | Integer between ``-1`` and ``9`` that controls the zlib compression level |
|
2086 | Integer between ``-1`` and ``9`` that controls the zlib compression level | |
2087 | for wire protocol commands that send zlib compressed output (notably the |
|
2087 | for wire protocol commands that send zlib compressed output (notably the | |
2088 | commands that send repository history data). |
|
2088 | commands that send repository history data). | |
2089 |
|
2089 | |||
2090 | The default (``-1``) uses the default zlib compression level, which is |
|
2090 | The default (``-1``) uses the default zlib compression level, which is | |
2091 | likely equivalent to ``6``. ``0`` means no compression. ``9`` means |
|
2091 | likely equivalent to ``6``. ``0`` means no compression. ``9`` means | |
2092 | maximum compression. |
|
2092 | maximum compression. | |
2093 |
|
2093 | |||
2094 | Setting this option allows server operators to make trade-offs between |
|
2094 | Setting this option allows server operators to make trade-offs between | |
2095 | bandwidth and CPU used. Lowering the compression lowers CPU utilization |
|
2095 | bandwidth and CPU used. Lowering the compression lowers CPU utilization | |
2096 | but sends more bytes to clients. |
|
2096 | but sends more bytes to clients. | |
2097 |
|
2097 | |||
2098 | This option only impacts the HTTP server. |
|
2098 | This option only impacts the HTTP server. | |
2099 |
|
2099 | |||
2100 | ``zstdlevel`` |
|
2100 | ``zstdlevel`` | |
2101 | Integer between ``1`` and ``22`` that controls the zstd compression level |
|
2101 | Integer between ``1`` and ``22`` that controls the zstd compression level | |
2102 | for wire protocol commands. ``1`` is the minimal amount of compression and |
|
2102 | for wire protocol commands. ``1`` is the minimal amount of compression and | |
2103 | ``22`` is the highest amount of compression. |
|
2103 | ``22`` is the highest amount of compression. | |
2104 |
|
2104 | |||
2105 | The default (``3``) should be significantly faster than zlib while likely |
|
2105 | The default (``3``) should be significantly faster than zlib while likely | |
2106 | delivering better compression ratios. |
|
2106 | delivering better compression ratios. | |
2107 |
|
2107 | |||
2108 | This option only impacts the HTTP server. |
|
2108 | This option only impacts the HTTP server. | |
2109 |
|
2109 | |||
2110 | See also ``server.zliblevel``. |
|
2110 | See also ``server.zliblevel``. | |
2111 |
|
2111 | |||
2112 | ``view`` |
|
2112 | ``view`` | |
2113 | Repository filter used when exchanging revisions with the peer. |
|
2113 | Repository filter used when exchanging revisions with the peer. | |
2114 |
|
2114 | |||
2115 | The default view (``served``) excludes secret and hidden changesets. |
|
2115 | The default view (``served``) excludes secret and hidden changesets. | |
2116 | Another useful value is ``immutable`` (no draft, secret or hidden |
|
2116 | Another useful value is ``immutable`` (no draft, secret or hidden | |
2117 | changesets). (EXPERIMENTAL) |
|
2117 | changesets). (EXPERIMENTAL) | |
2118 |
|
2118 | |||
2119 | ``smtp`` |
|
2119 | ``smtp`` | |
2120 | -------- |
|
2120 | -------- | |
2121 |
|
2121 | |||
2122 | Configuration for extensions that need to send email messages. |
|
2122 | Configuration for extensions that need to send email messages. | |
2123 |
|
2123 | |||
2124 | ``host`` |
|
2124 | ``host`` | |
2125 | Host name of mail server, e.g. "mail.example.com". |
|
2125 | Host name of mail server, e.g. "mail.example.com". | |
2126 |
|
2126 | |||
2127 | ``port`` |
|
2127 | ``port`` | |
2128 | Optional. Port to connect to on mail server. (default: 465 if |
|
2128 | Optional. Port to connect to on mail server. (default: 465 if | |
2129 | ``tls`` is smtps; 25 otherwise) |
|
2129 | ``tls`` is smtps; 25 otherwise) | |
2130 |
|
2130 | |||
2131 | ``tls`` |
|
2131 | ``tls`` | |
2132 | Optional. Method to enable TLS when connecting to mail server: starttls, |
|
2132 | Optional. Method to enable TLS when connecting to mail server: starttls, | |
2133 | smtps or none. (default: none) |
|
2133 | smtps or none. (default: none) | |
2134 |
|
2134 | |||
2135 | ``username`` |
|
2135 | ``username`` | |
2136 | Optional. User name for authenticating with the SMTP server. |
|
2136 | Optional. User name for authenticating with the SMTP server. | |
2137 | (default: None) |
|
2137 | (default: None) | |
2138 |
|
2138 | |||
2139 | ``password`` |
|
2139 | ``password`` | |
2140 | Optional. Password for authenticating with the SMTP server. If not |
|
2140 | Optional. Password for authenticating with the SMTP server. If not | |
2141 | specified, interactive sessions will prompt the user for a |
|
2141 | specified, interactive sessions will prompt the user for a | |
2142 | password; non-interactive sessions will fail. (default: None) |
|
2142 | password; non-interactive sessions will fail. (default: None) | |
2143 |
|
2143 | |||
2144 | ``local_hostname`` |
|
2144 | ``local_hostname`` | |
2145 | Optional. The hostname that the sender can use to identify |
|
2145 | Optional. The hostname that the sender can use to identify | |
2146 | itself to the MTA. |
|
2146 | itself to the MTA. | |
2147 |
|
2147 | |||
2148 |
|
2148 | |||
2149 | ``subpaths`` |
|
2149 | ``subpaths`` | |
2150 | ------------ |
|
2150 | ------------ | |
2151 |
|
2151 | |||
2152 | Subrepository source URLs can go stale if a remote server changes name |
|
2152 | Subrepository source URLs can go stale if a remote server changes name | |
2153 | or becomes temporarily unavailable. This section lets you define |
|
2153 | or becomes temporarily unavailable. This section lets you define | |
2154 | rewrite rules of the form:: |
|
2154 | rewrite rules of the form:: | |
2155 |
|
2155 | |||
2156 | <pattern> = <replacement> |
|
2156 | <pattern> = <replacement> | |
2157 |
|
2157 | |||
2158 | where ``pattern`` is a regular expression matching a subrepository |
|
2158 | where ``pattern`` is a regular expression matching a subrepository | |
2159 | source URL and ``replacement`` is the replacement string used to |
|
2159 | source URL and ``replacement`` is the replacement string used to | |
2160 | rewrite it. Groups can be matched in ``pattern`` and referenced in |
|
2160 | rewrite it. Groups can be matched in ``pattern`` and referenced in | |
2161 | ``replacements``. For instance:: |
|
2161 | ``replacements``. For instance:: | |
2162 |
|
2162 | |||
2163 | http://server/(.*)-hg/ = http://hg.server/\1/ |
|
2163 | http://server/(.*)-hg/ = http://hg.server/\1/ | |
2164 |
|
2164 | |||
2165 | rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``. |
|
2165 | rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``. | |
2166 |
|
2166 | |||
2167 | Relative subrepository paths are first made absolute, and the |
|
2167 | Relative subrepository paths are first made absolute, and the | |
2168 | rewrite rules are then applied on the full (absolute) path. If ``pattern`` |
|
2168 | rewrite rules are then applied on the full (absolute) path. If ``pattern`` | |
2169 | doesn't match the full path, an attempt is made to apply it on the |
|
2169 | doesn't match the full path, an attempt is made to apply it on the | |
2170 | relative path alone. The rules are applied in definition order. |
|
2170 | relative path alone. The rules are applied in definition order. | |
2171 |
|
2171 | |||
2172 | ``subrepos`` |
|
2172 | ``subrepos`` | |
2173 | ------------ |
|
2173 | ------------ | |
2174 |
|
2174 | |||
2175 | This section contains options that control the behavior of the |
|
2175 | This section contains options that control the behavior of the | |
2176 | subrepositories feature. See also :hg:`help subrepos`. |
|
2176 | subrepositories feature. See also :hg:`help subrepos`. | |
2177 |
|
2177 | |||
2178 | Security note: auditing in Mercurial is known to be insufficient to |
|
2178 | Security note: auditing in Mercurial is known to be insufficient to | |
2179 | prevent clone-time code execution with carefully constructed Git |
|
2179 | prevent clone-time code execution with carefully constructed Git | |
2180 | subrepos. It is unknown if a similar detect is present in Subversion |
|
2180 | subrepos. It is unknown if a similar detect is present in Subversion | |
2181 | subrepos. Both Git and Subversion subrepos are disabled by default |
|
2181 | subrepos. Both Git and Subversion subrepos are disabled by default | |
2182 | out of security concerns. These subrepo types can be enabled using |
|
2182 | out of security concerns. These subrepo types can be enabled using | |
2183 | the respective options below. |
|
2183 | the respective options below. | |
2184 |
|
2184 | |||
2185 | ``allowed`` |
|
2185 | ``allowed`` | |
2186 | Whether subrepositories are allowed in the working directory. |
|
2186 | Whether subrepositories are allowed in the working directory. | |
2187 |
|
2187 | |||
2188 | When false, commands involving subrepositories (like :hg:`update`) |
|
2188 | When false, commands involving subrepositories (like :hg:`update`) | |
2189 | will fail for all subrepository types. |
|
2189 | will fail for all subrepository types. | |
2190 | (default: true) |
|
2190 | (default: true) | |
2191 |
|
2191 | |||
2192 | ``hg:allowed`` |
|
2192 | ``hg:allowed`` | |
2193 | Whether Mercurial subrepositories are allowed in the working |
|
2193 | Whether Mercurial subrepositories are allowed in the working | |
2194 | directory. This option only has an effect if ``subrepos.allowed`` |
|
2194 | directory. This option only has an effect if ``subrepos.allowed`` | |
2195 | is true. |
|
2195 | is true. | |
2196 | (default: true) |
|
2196 | (default: true) | |
2197 |
|
2197 | |||
2198 | ``git:allowed`` |
|
2198 | ``git:allowed`` | |
2199 | Whether Git subrepositories are allowed in the working directory. |
|
2199 | Whether Git subrepositories are allowed in the working directory. | |
2200 | This option only has an effect if ``subrepos.allowed`` is true. |
|
2200 | This option only has an effect if ``subrepos.allowed`` is true. | |
2201 |
|
2201 | |||
2202 | See the security note above before enabling Git subrepos. |
|
2202 | See the security note above before enabling Git subrepos. | |
2203 | (default: false) |
|
2203 | (default: false) | |
2204 |
|
2204 | |||
2205 | ``svn:allowed`` |
|
2205 | ``svn:allowed`` | |
2206 | Whether Subversion subrepositories are allowed in the working |
|
2206 | Whether Subversion subrepositories are allowed in the working | |
2207 | directory. This option only has an effect if ``subrepos.allowed`` |
|
2207 | directory. This option only has an effect if ``subrepos.allowed`` | |
2208 | is true. |
|
2208 | is true. | |
2209 |
|
2209 | |||
2210 | See the security note above before enabling Subversion subrepos. |
|
2210 | See the security note above before enabling Subversion subrepos. | |
2211 | (default: false) |
|
2211 | (default: false) | |
2212 |
|
2212 | |||
2213 | ``templatealias`` |
|
2213 | ``templatealias`` | |
2214 | ----------------- |
|
2214 | ----------------- | |
2215 |
|
2215 | |||
2216 | Alias definitions for templates. See :hg:`help templates` for details. |
|
2216 | Alias definitions for templates. See :hg:`help templates` for details. | |
2217 |
|
2217 | |||
2218 | ``templates`` |
|
2218 | ``templates`` | |
2219 | ------------- |
|
2219 | ------------- | |
2220 |
|
2220 | |||
2221 | Use the ``[templates]`` section to define template strings. |
|
2221 | Use the ``[templates]`` section to define template strings. | |
2222 | See :hg:`help templates` for details. |
|
2222 | See :hg:`help templates` for details. | |
2223 |
|
2223 | |||
2224 | ``trusted`` |
|
2224 | ``trusted`` | |
2225 | ----------- |
|
2225 | ----------- | |
2226 |
|
2226 | |||
2227 | Mercurial will not use the settings in the |
|
2227 | Mercurial will not use the settings in the | |
2228 | ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted |
|
2228 | ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted | |
2229 | user or to a trusted group, as various hgrc features allow arbitrary |
|
2229 | user or to a trusted group, as various hgrc features allow arbitrary | |
2230 | commands to be run. This issue is often encountered when configuring |
|
2230 | commands to be run. This issue is often encountered when configuring | |
2231 | hooks or extensions for shared repositories or servers. However, |
|
2231 | hooks or extensions for shared repositories or servers. However, | |
2232 | the web interface will use some safe settings from the ``[web]`` |
|
2232 | the web interface will use some safe settings from the ``[web]`` | |
2233 | section. |
|
2233 | section. | |
2234 |
|
2234 | |||
2235 | This section specifies what users and groups are trusted. The |
|
2235 | This section specifies what users and groups are trusted. The | |
2236 | current user is always trusted. To trust everybody, list a user or a |
|
2236 | current user is always trusted. To trust everybody, list a user or a | |
2237 | group with name ``*``. These settings must be placed in an |
|
2237 | group with name ``*``. These settings must be placed in an | |
2238 | *already-trusted file* to take effect, such as ``$HOME/.hgrc`` of the |
|
2238 | *already-trusted file* to take effect, such as ``$HOME/.hgrc`` of the | |
2239 | user or service running Mercurial. |
|
2239 | user or service running Mercurial. | |
2240 |
|
2240 | |||
2241 | ``users`` |
|
2241 | ``users`` | |
2242 | Comma-separated list of trusted users. |
|
2242 | Comma-separated list of trusted users. | |
2243 |
|
2243 | |||
2244 | ``groups`` |
|
2244 | ``groups`` | |
2245 | Comma-separated list of trusted groups. |
|
2245 | Comma-separated list of trusted groups. | |
2246 |
|
2246 | |||
2247 |
|
2247 | |||
2248 | ``ui`` |
|
2248 | ``ui`` | |
2249 | ------ |
|
2249 | ------ | |
2250 |
|
2250 | |||
2251 | User interface controls. |
|
2251 | User interface controls. | |
2252 |
|
2252 | |||
2253 | ``archivemeta`` |
|
2253 | ``archivemeta`` | |
2254 | Whether to include the .hg_archival.txt file containing meta data |
|
2254 | Whether to include the .hg_archival.txt file containing meta data | |
2255 | (hashes for the repository base and for tip) in archives created |
|
2255 | (hashes for the repository base and for tip) in archives created | |
2256 | by the :hg:`archive` command or downloaded via hgweb. |
|
2256 | by the :hg:`archive` command or downloaded via hgweb. | |
2257 | (default: True) |
|
2257 | (default: True) | |
2258 |
|
2258 | |||
2259 | ``askusername`` |
|
2259 | ``askusername`` | |
2260 | Whether to prompt for a username when committing. If True, and |
|
2260 | Whether to prompt for a username when committing. If True, and | |
2261 | neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will |
|
2261 | neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will | |
2262 | be prompted to enter a username. If no username is entered, the |
|
2262 | be prompted to enter a username. If no username is entered, the | |
2263 | default ``USER@HOST`` is used instead. |
|
2263 | default ``USER@HOST`` is used instead. | |
2264 | (default: False) |
|
2264 | (default: False) | |
2265 |
|
2265 | |||
2266 | ``clonebundles`` |
|
2266 | ``clonebundles`` | |
2267 | Whether the "clone bundles" feature is enabled. |
|
2267 | Whether the "clone bundles" feature is enabled. | |
2268 |
|
2268 | |||
2269 | When enabled, :hg:`clone` may download and apply a server-advertised |
|
2269 | When enabled, :hg:`clone` may download and apply a server-advertised | |
2270 | bundle file from a URL instead of using the normal exchange mechanism. |
|
2270 | bundle file from a URL instead of using the normal exchange mechanism. | |
2271 |
|
2271 | |||
2272 | This can likely result in faster and more reliable clones. |
|
2272 | This can likely result in faster and more reliable clones. | |
2273 |
|
2273 | |||
2274 | (default: True) |
|
2274 | (default: True) | |
2275 |
|
2275 | |||
2276 | ``clonebundlefallback`` |
|
2276 | ``clonebundlefallback`` | |
2277 | Whether failure to apply an advertised "clone bundle" from a server |
|
2277 | Whether failure to apply an advertised "clone bundle" from a server | |
2278 | should result in fallback to a regular clone. |
|
2278 | should result in fallback to a regular clone. | |
2279 |
|
2279 | |||
2280 | This is disabled by default because servers advertising "clone |
|
2280 | This is disabled by default because servers advertising "clone | |
2281 | bundles" often do so to reduce server load. If advertised bundles |
|
2281 | bundles" often do so to reduce server load. If advertised bundles | |
2282 | start mass failing and clients automatically fall back to a regular |
|
2282 | start mass failing and clients automatically fall back to a regular | |
2283 | clone, this would add significant and unexpected load to the server |
|
2283 | clone, this would add significant and unexpected load to the server | |
2284 | since the server is expecting clone operations to be offloaded to |
|
2284 | since the server is expecting clone operations to be offloaded to | |
2285 | pre-generated bundles. Failing fast (the default behavior) ensures |
|
2285 | pre-generated bundles. Failing fast (the default behavior) ensures | |
2286 | clients don't overwhelm the server when "clone bundle" application |
|
2286 | clients don't overwhelm the server when "clone bundle" application | |
2287 | fails. |
|
2287 | fails. | |
2288 |
|
2288 | |||
2289 | (default: False) |
|
2289 | (default: False) | |
2290 |
|
2290 | |||
2291 | ``clonebundleprefers`` |
|
2291 | ``clonebundleprefers`` | |
2292 | Defines preferences for which "clone bundles" to use. |
|
2292 | Defines preferences for which "clone bundles" to use. | |
2293 |
|
2293 | |||
2294 | Servers advertising "clone bundles" may advertise multiple available |
|
2294 | Servers advertising "clone bundles" may advertise multiple available | |
2295 | bundles. Each bundle may have different attributes, such as the bundle |
|
2295 | bundles. Each bundle may have different attributes, such as the bundle | |
2296 | type and compression format. This option is used to prefer a particular |
|
2296 | type and compression format. This option is used to prefer a particular | |
2297 | bundle over another. |
|
2297 | bundle over another. | |
2298 |
|
2298 | |||
2299 | The following keys are defined by Mercurial: |
|
2299 | The following keys are defined by Mercurial: | |
2300 |
|
2300 | |||
2301 | BUNDLESPEC |
|
2301 | BUNDLESPEC | |
2302 | A bundle type specifier. These are strings passed to :hg:`bundle -t`. |
|
2302 | A bundle type specifier. These are strings passed to :hg:`bundle -t`. | |
2303 | e.g. ``gzip-v2`` or ``bzip2-v1``. |
|
2303 | e.g. ``gzip-v2`` or ``bzip2-v1``. | |
2304 |
|
2304 | |||
2305 | COMPRESSION |
|
2305 | COMPRESSION | |
2306 | The compression format of the bundle. e.g. ``gzip`` and ``bzip2``. |
|
2306 | The compression format of the bundle. e.g. ``gzip`` and ``bzip2``. | |
2307 |
|
2307 | |||
2308 | Server operators may define custom keys. |
|
2308 | Server operators may define custom keys. | |
2309 |
|
2309 | |||
2310 | Example values: ``COMPRESSION=bzip2``, |
|
2310 | Example values: ``COMPRESSION=bzip2``, | |
2311 | ``BUNDLESPEC=gzip-v2, COMPRESSION=gzip``. |
|
2311 | ``BUNDLESPEC=gzip-v2, COMPRESSION=gzip``. | |
2312 |
|
2312 | |||
2313 | By default, the first bundle advertised by the server is used. |
|
2313 | By default, the first bundle advertised by the server is used. | |
2314 |
|
2314 | |||
2315 | ``color`` |
|
2315 | ``color`` | |
2316 | When to colorize output. Possible value are Boolean ("yes" or "no"), or |
|
2316 | When to colorize output. Possible value are Boolean ("yes" or "no"), or | |
2317 | "debug", or "always". (default: "yes"). "yes" will use color whenever it |
|
2317 | "debug", or "always". (default: "yes"). "yes" will use color whenever it | |
2318 | seems possible. See :hg:`help color` for details. |
|
2318 | seems possible. See :hg:`help color` for details. | |
2319 |
|
2319 | |||
2320 | ``commitsubrepos`` |
|
2320 | ``commitsubrepos`` | |
2321 | Whether to commit modified subrepositories when committing the |
|
2321 | Whether to commit modified subrepositories when committing the | |
2322 | parent repository. If False and one subrepository has uncommitted |
|
2322 | parent repository. If False and one subrepository has uncommitted | |
2323 | changes, abort the commit. |
|
2323 | changes, abort the commit. | |
2324 | (default: False) |
|
2324 | (default: False) | |
2325 |
|
2325 | |||
2326 | ``debug`` |
|
2326 | ``debug`` | |
2327 | Print debugging information. (default: False) |
|
2327 | Print debugging information. (default: False) | |
2328 |
|
2328 | |||
2329 | ``editor`` |
|
2329 | ``editor`` | |
2330 | The editor to use during a commit. (default: ``$EDITOR`` or ``vi``) |
|
2330 | The editor to use during a commit. (default: ``$EDITOR`` or ``vi``) | |
2331 |
|
2331 | |||
2332 | ``fallbackencoding`` |
|
2332 | ``fallbackencoding`` | |
2333 | Encoding to try if it's not possible to decode the changelog using |
|
2333 | Encoding to try if it's not possible to decode the changelog using | |
2334 | UTF-8. (default: ISO-8859-1) |
|
2334 | UTF-8. (default: ISO-8859-1) | |
2335 |
|
2335 | |||
2336 | ``graphnodetemplate`` |
|
2336 | ``graphnodetemplate`` | |
2337 | (DEPRECATED) Use ``command-templates.graphnode`` instead. |
|
2337 | (DEPRECATED) Use ``command-templates.graphnode`` instead. | |
2338 |
|
2338 | |||
2339 | ``ignore`` |
|
2339 | ``ignore`` | |
2340 | A file to read per-user ignore patterns from. This file should be |
|
2340 | A file to read per-user ignore patterns from. This file should be | |
2341 | in the same format as a repository-wide .hgignore file. Filenames |
|
2341 | in the same format as a repository-wide .hgignore file. Filenames | |
2342 | are relative to the repository root. This option supports hook syntax, |
|
2342 | are relative to the repository root. This option supports hook syntax, | |
2343 | so if you want to specify multiple ignore files, you can do so by |
|
2343 | so if you want to specify multiple ignore files, you can do so by | |
2344 | setting something like ``ignore.other = ~/.hgignore2``. For details |
|
2344 | setting something like ``ignore.other = ~/.hgignore2``. For details | |
2345 | of the ignore file format, see the ``hgignore(5)`` man page. |
|
2345 | of the ignore file format, see the ``hgignore(5)`` man page. | |
2346 |
|
2346 | |||
2347 | ``interactive`` |
|
2347 | ``interactive`` | |
2348 | Allow to prompt the user. (default: True) |
|
2348 | Allow to prompt the user. (default: True) | |
2349 |
|
2349 | |||
2350 | ``interface`` |
|
2350 | ``interface`` | |
2351 | Select the default interface for interactive features (default: text). |
|
2351 | Select the default interface for interactive features (default: text). | |
2352 | Possible values are 'text' and 'curses'. |
|
2352 | Possible values are 'text' and 'curses'. | |
2353 |
|
2353 | |||
2354 | ``interface.chunkselector`` |
|
2354 | ``interface.chunkselector`` | |
2355 | Select the interface for change recording (e.g. :hg:`commit -i`). |
|
2355 | Select the interface for change recording (e.g. :hg:`commit -i`). | |
2356 | Possible values are 'text' and 'curses'. |
|
2356 | Possible values are 'text' and 'curses'. | |
2357 | This config overrides the interface specified by ui.interface. |
|
2357 | This config overrides the interface specified by ui.interface. | |
2358 |
|
2358 | |||
2359 | ``large-file-limit`` |
|
2359 | ``large-file-limit`` | |
2360 | Largest file size that gives no memory use warning. |
|
2360 | Largest file size that gives no memory use warning. | |
2361 | Possible values are integers or 0 to disable the check. |
|
2361 | Possible values are integers or 0 to disable the check. | |
2362 | (default: 10000000) |
|
2362 | (default: 10000000) | |
2363 |
|
2363 | |||
2364 | ``logtemplate`` |
|
2364 | ``logtemplate`` | |
2365 | (DEPRECATED) Use ``command-templates.log`` instead. |
|
2365 | (DEPRECATED) Use ``command-templates.log`` instead. | |
2366 |
|
2366 | |||
2367 | ``merge`` |
|
2367 | ``merge`` | |
2368 | The conflict resolution program to use during a manual merge. |
|
2368 | The conflict resolution program to use during a manual merge. | |
2369 | For more information on merge tools see :hg:`help merge-tools`. |
|
2369 | For more information on merge tools see :hg:`help merge-tools`. | |
2370 | For configuring merge tools see the ``[merge-tools]`` section. |
|
2370 | For configuring merge tools see the ``[merge-tools]`` section. | |
2371 |
|
2371 | |||
2372 | ``mergemarkers`` |
|
2372 | ``mergemarkers`` | |
2373 | Sets the merge conflict marker label styling. The ``detailed`` |
|
2373 | Sets the merge conflict marker label styling. The ``detailed`` style | |
2374 |
|
|
2374 | uses the ``command-templates.mergemarker`` setting to style the labels. | |
2375 | The ``basic`` style just uses 'local' and 'other' as the marker label. |
|
2375 | The ``basic`` style just uses 'local' and 'other' as the marker label. | |
2376 | One of ``basic`` or ``detailed``. |
|
2376 | One of ``basic`` or ``detailed``. | |
2377 | (default: ``basic``) |
|
2377 | (default: ``basic``) | |
2378 |
|
2378 | |||
2379 | ``mergemarkertemplate`` |
|
2379 | ``mergemarkertemplate`` | |
2380 | The template used to print the commit description next to each conflict |
|
2380 | (DEPRECATED) Use ``command-templates.mergemarker`` instead. | |
2381 | marker during merge conflicts. See :hg:`help templates` for the template |
|
|||
2382 | format. |
|
|||
2383 |
|
||||
2384 | Defaults to showing the hash, tags, branches, bookmarks, author, and |
|
|||
2385 | the first line of the commit description. |
|
|||
2386 |
|
||||
2387 | If you use non-ASCII characters in names for tags, branches, bookmarks, |
|
|||
2388 | authors, and/or commit descriptions, you must pay attention to encodings of |
|
|||
2389 | managed files. At template expansion, non-ASCII characters use the encoding |
|
|||
2390 | specified by the ``--encoding`` global option, ``HGENCODING`` or other |
|
|||
2391 | environment variables that govern your locale. If the encoding of the merge |
|
|||
2392 | markers is different from the encoding of the merged files, |
|
|||
2393 | serious problems may occur. |
|
|||
2394 |
|
||||
2395 | Can be overridden per-merge-tool, see the ``[merge-tools]`` section. |
|
|||
2396 |
|
2381 | |||
2397 | ``message-output`` |
|
2382 | ``message-output`` | |
2398 | Where to write status and error messages. (default: ``stdio``) |
|
2383 | Where to write status and error messages. (default: ``stdio``) | |
2399 |
|
2384 | |||
2400 | ``channel`` |
|
2385 | ``channel`` | |
2401 | Use separate channel for structured output. (Command-server only) |
|
2386 | Use separate channel for structured output. (Command-server only) | |
2402 | ``stderr`` |
|
2387 | ``stderr`` | |
2403 | Everything to stderr. |
|
2388 | Everything to stderr. | |
2404 | ``stdio`` |
|
2389 | ``stdio`` | |
2405 | Status to stdout, and error to stderr. |
|
2390 | Status to stdout, and error to stderr. | |
2406 |
|
2391 | |||
2407 | ``origbackuppath`` |
|
2392 | ``origbackuppath`` | |
2408 | The path to a directory used to store generated .orig files. If the path is |
|
2393 | The path to a directory used to store generated .orig files. If the path is | |
2409 | not a directory, one will be created. If set, files stored in this |
|
2394 | not a directory, one will be created. If set, files stored in this | |
2410 | directory have the same name as the original file and do not have a .orig |
|
2395 | directory have the same name as the original file and do not have a .orig | |
2411 | suffix. |
|
2396 | suffix. | |
2412 |
|
2397 | |||
2413 | ``paginate`` |
|
2398 | ``paginate`` | |
2414 | Control the pagination of command output (default: True). See :hg:`help pager` |
|
2399 | Control the pagination of command output (default: True). See :hg:`help pager` | |
2415 | for details. |
|
2400 | for details. | |
2416 |
|
2401 | |||
2417 | ``patch`` |
|
2402 | ``patch`` | |
2418 | An optional external tool that ``hg import`` and some extensions |
|
2403 | An optional external tool that ``hg import`` and some extensions | |
2419 | will use for applying patches. By default Mercurial uses an |
|
2404 | will use for applying patches. By default Mercurial uses an | |
2420 | internal patch utility. The external tool must work as the common |
|
2405 | internal patch utility. The external tool must work as the common | |
2421 | Unix ``patch`` program. In particular, it must accept a ``-p`` |
|
2406 | Unix ``patch`` program. In particular, it must accept a ``-p`` | |
2422 | argument to strip patch headers, a ``-d`` argument to specify the |
|
2407 | argument to strip patch headers, a ``-d`` argument to specify the | |
2423 | current directory, a file name to patch, and a patch file to take |
|
2408 | current directory, a file name to patch, and a patch file to take | |
2424 | from stdin. |
|
2409 | from stdin. | |
2425 |
|
2410 | |||
2426 | It is possible to specify a patch tool together with extra |
|
2411 | It is possible to specify a patch tool together with extra | |
2427 | arguments. For example, setting this option to ``patch --merge`` |
|
2412 | arguments. For example, setting this option to ``patch --merge`` | |
2428 | will use the ``patch`` program with its 2-way merge option. |
|
2413 | will use the ``patch`` program with its 2-way merge option. | |
2429 |
|
2414 | |||
2430 | ``portablefilenames`` |
|
2415 | ``portablefilenames`` | |
2431 | Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``. |
|
2416 | Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``. | |
2432 | (default: ``warn``) |
|
2417 | (default: ``warn``) | |
2433 |
|
2418 | |||
2434 | ``warn`` |
|
2419 | ``warn`` | |
2435 | Print a warning message on POSIX platforms, if a file with a non-portable |
|
2420 | Print a warning message on POSIX platforms, if a file with a non-portable | |
2436 | filename is added (e.g. a file with a name that can't be created on |
|
2421 | filename is added (e.g. a file with a name that can't be created on | |
2437 | Windows because it contains reserved parts like ``AUX``, reserved |
|
2422 | Windows because it contains reserved parts like ``AUX``, reserved | |
2438 | characters like ``:``, or would cause a case collision with an existing |
|
2423 | characters like ``:``, or would cause a case collision with an existing | |
2439 | file). |
|
2424 | file). | |
2440 |
|
2425 | |||
2441 | ``ignore`` |
|
2426 | ``ignore`` | |
2442 | Don't print a warning. |
|
2427 | Don't print a warning. | |
2443 |
|
2428 | |||
2444 | ``abort`` |
|
2429 | ``abort`` | |
2445 | The command is aborted. |
|
2430 | The command is aborted. | |
2446 |
|
2431 | |||
2447 | ``true`` |
|
2432 | ``true`` | |
2448 | Alias for ``warn``. |
|
2433 | Alias for ``warn``. | |
2449 |
|
2434 | |||
2450 | ``false`` |
|
2435 | ``false`` | |
2451 | Alias for ``ignore``. |
|
2436 | Alias for ``ignore``. | |
2452 |
|
2437 | |||
2453 | .. container:: windows |
|
2438 | .. container:: windows | |
2454 |
|
2439 | |||
2455 | On Windows, this configuration option is ignored and the command aborted. |
|
2440 | On Windows, this configuration option is ignored and the command aborted. | |
2456 |
|
2441 | |||
2457 | ``pre-merge-tool-output-template`` |
|
2442 | ``pre-merge-tool-output-template`` | |
2458 | A template that is printed before executing an external merge tool. This can |
|
2443 | A template that is printed before executing an external merge tool. This can | |
2459 | be used to print out additional context that might be useful to have during |
|
2444 | be used to print out additional context that might be useful to have during | |
2460 | the conflict resolution, such as the description of the various commits |
|
2445 | the conflict resolution, such as the description of the various commits | |
2461 | involved or bookmarks/tags. |
|
2446 | involved or bookmarks/tags. | |
2462 |
|
2447 | |||
2463 | Additional information is available in the ``local`, ``base``, and ``other`` |
|
2448 | Additional information is available in the ``local`, ``base``, and ``other`` | |
2464 | dicts. For example: ``{local.label}``, ``{base.name}``, or |
|
2449 | dicts. For example: ``{local.label}``, ``{base.name}``, or | |
2465 | ``{other.islink}``. |
|
2450 | ``{other.islink}``. | |
2466 |
|
2451 | |||
2467 | ``quiet`` |
|
2452 | ``quiet`` | |
2468 | Reduce the amount of output printed. |
|
2453 | Reduce the amount of output printed. | |
2469 | (default: False) |
|
2454 | (default: False) | |
2470 |
|
2455 | |||
2471 | ``relative-paths`` |
|
2456 | ``relative-paths`` | |
2472 | Prefer relative paths in the UI. |
|
2457 | Prefer relative paths in the UI. | |
2473 |
|
2458 | |||
2474 | ``remotecmd`` |
|
2459 | ``remotecmd`` | |
2475 | Remote command to use for clone/push/pull operations. |
|
2460 | Remote command to use for clone/push/pull operations. | |
2476 | (default: ``hg``) |
|
2461 | (default: ``hg``) | |
2477 |
|
2462 | |||
2478 | ``report_untrusted`` |
|
2463 | ``report_untrusted`` | |
2479 | Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a |
|
2464 | Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a | |
2480 | trusted user or group. |
|
2465 | trusted user or group. | |
2481 | (default: True) |
|
2466 | (default: True) | |
2482 |
|
2467 | |||
2483 | ``slash`` |
|
2468 | ``slash`` | |
2484 | (Deprecated. Use ``slashpath`` template filter instead.) |
|
2469 | (Deprecated. Use ``slashpath`` template filter instead.) | |
2485 |
|
2470 | |||
2486 | Display paths using a slash (``/``) as the path separator. This |
|
2471 | Display paths using a slash (``/``) as the path separator. This | |
2487 | only makes a difference on systems where the default path |
|
2472 | only makes a difference on systems where the default path | |
2488 | separator is not the slash character (e.g. Windows uses the |
|
2473 | separator is not the slash character (e.g. Windows uses the | |
2489 | backslash character (``\``)). |
|
2474 | backslash character (``\``)). | |
2490 | (default: False) |
|
2475 | (default: False) | |
2491 |
|
2476 | |||
2492 | ``statuscopies`` |
|
2477 | ``statuscopies`` | |
2493 | Display copies in the status command. |
|
2478 | Display copies in the status command. | |
2494 |
|
2479 | |||
2495 | ``ssh`` |
|
2480 | ``ssh`` | |
2496 | Command to use for SSH connections. (default: ``ssh``) |
|
2481 | Command to use for SSH connections. (default: ``ssh``) | |
2497 |
|
2482 | |||
2498 | ``ssherrorhint`` |
|
2483 | ``ssherrorhint`` | |
2499 | A hint shown to the user in the case of SSH error (e.g. |
|
2484 | A hint shown to the user in the case of SSH error (e.g. | |
2500 | ``Please see http://company/internalwiki/ssh.html``) |
|
2485 | ``Please see http://company/internalwiki/ssh.html``) | |
2501 |
|
2486 | |||
2502 | ``strict`` |
|
2487 | ``strict`` | |
2503 | Require exact command names, instead of allowing unambiguous |
|
2488 | Require exact command names, instead of allowing unambiguous | |
2504 | abbreviations. (default: False) |
|
2489 | abbreviations. (default: False) | |
2505 |
|
2490 | |||
2506 | ``style`` |
|
2491 | ``style`` | |
2507 | Name of style to use for command output. |
|
2492 | Name of style to use for command output. | |
2508 |
|
2493 | |||
2509 | ``supportcontact`` |
|
2494 | ``supportcontact`` | |
2510 | A URL where users should report a Mercurial traceback. Use this if you are a |
|
2495 | A URL where users should report a Mercurial traceback. Use this if you are a | |
2511 | large organisation with its own Mercurial deployment process and crash |
|
2496 | large organisation with its own Mercurial deployment process and crash | |
2512 | reports should be addressed to your internal support. |
|
2497 | reports should be addressed to your internal support. | |
2513 |
|
2498 | |||
2514 | ``textwidth`` |
|
2499 | ``textwidth`` | |
2515 | Maximum width of help text. A longer line generated by ``hg help`` or |
|
2500 | Maximum width of help text. A longer line generated by ``hg help`` or | |
2516 | ``hg subcommand --help`` will be broken after white space to get this |
|
2501 | ``hg subcommand --help`` will be broken after white space to get this | |
2517 | width or the terminal width, whichever comes first. |
|
2502 | width or the terminal width, whichever comes first. | |
2518 | A non-positive value will disable this and the terminal width will be |
|
2503 | A non-positive value will disable this and the terminal width will be | |
2519 | used. (default: 78) |
|
2504 | used. (default: 78) | |
2520 |
|
2505 | |||
2521 | ``timeout`` |
|
2506 | ``timeout`` | |
2522 | The timeout used when a lock is held (in seconds), a negative value |
|
2507 | The timeout used when a lock is held (in seconds), a negative value | |
2523 | means no timeout. (default: 600) |
|
2508 | means no timeout. (default: 600) | |
2524 |
|
2509 | |||
2525 | ``timeout.warn`` |
|
2510 | ``timeout.warn`` | |
2526 | Time (in seconds) before a warning is printed about held lock. A negative |
|
2511 | Time (in seconds) before a warning is printed about held lock. A negative | |
2527 | value means no warning. (default: 0) |
|
2512 | value means no warning. (default: 0) | |
2528 |
|
2513 | |||
2529 | ``traceback`` |
|
2514 | ``traceback`` | |
2530 | Mercurial always prints a traceback when an unknown exception |
|
2515 | Mercurial always prints a traceback when an unknown exception | |
2531 | occurs. Setting this to True will make Mercurial print a traceback |
|
2516 | occurs. Setting this to True will make Mercurial print a traceback | |
2532 | on all exceptions, even those recognized by Mercurial (such as |
|
2517 | on all exceptions, even those recognized by Mercurial (such as | |
2533 | IOError or MemoryError). (default: False) |
|
2518 | IOError or MemoryError). (default: False) | |
2534 |
|
2519 | |||
2535 | ``tweakdefaults`` |
|
2520 | ``tweakdefaults`` | |
2536 |
|
2521 | |||
2537 | By default Mercurial's behavior changes very little from release |
|
2522 | By default Mercurial's behavior changes very little from release | |
2538 | to release, but over time the recommended config settings |
|
2523 | to release, but over time the recommended config settings | |
2539 | shift. Enable this config to opt in to get automatic tweaks to |
|
2524 | shift. Enable this config to opt in to get automatic tweaks to | |
2540 | Mercurial's behavior over time. This config setting will have no |
|
2525 | Mercurial's behavior over time. This config setting will have no | |
2541 | effect if ``HGPLAIN`` is set or ``HGPLAINEXCEPT`` is set and does |
|
2526 | effect if ``HGPLAIN`` is set or ``HGPLAINEXCEPT`` is set and does | |
2542 | not include ``tweakdefaults``. (default: False) |
|
2527 | not include ``tweakdefaults``. (default: False) | |
2543 |
|
2528 | |||
2544 | It currently means:: |
|
2529 | It currently means:: | |
2545 |
|
2530 | |||
2546 | .. tweakdefaultsmarker |
|
2531 | .. tweakdefaultsmarker | |
2547 |
|
2532 | |||
2548 | ``username`` |
|
2533 | ``username`` | |
2549 | The committer of a changeset created when running "commit". |
|
2534 | The committer of a changeset created when running "commit". | |
2550 | Typically a person's name and email address, e.g. ``Fred Widget |
|
2535 | Typically a person's name and email address, e.g. ``Fred Widget | |
2551 | <fred@example.com>``. Environment variables in the |
|
2536 | <fred@example.com>``. Environment variables in the | |
2552 | username are expanded. |
|
2537 | username are expanded. | |
2553 |
|
2538 | |||
2554 | (default: ``$EMAIL`` or ``username@hostname``. If the username in |
|
2539 | (default: ``$EMAIL`` or ``username@hostname``. If the username in | |
2555 | hgrc is empty, e.g. if the system admin set ``username =`` in the |
|
2540 | hgrc is empty, e.g. if the system admin set ``username =`` in the | |
2556 | system hgrc, it has to be specified manually or in a different |
|
2541 | system hgrc, it has to be specified manually or in a different | |
2557 | hgrc file) |
|
2542 | hgrc file) | |
2558 |
|
2543 | |||
2559 | ``verbose`` |
|
2544 | ``verbose`` | |
2560 | Increase the amount of output printed. (default: False) |
|
2545 | Increase the amount of output printed. (default: False) | |
2561 |
|
2546 | |||
2562 |
|
2547 | |||
2563 | ``command-templates`` |
|
2548 | ``command-templates`` | |
2564 | --------------------- |
|
2549 | --------------------- | |
2565 |
|
2550 | |||
2566 | Templates used for customizing the output of commands. |
|
2551 | Templates used for customizing the output of commands. | |
2567 |
|
2552 | |||
2568 | ``graphnode`` |
|
2553 | ``graphnode`` | |
2569 | The template used to print changeset nodes in an ASCII revision graph. |
|
2554 | The template used to print changeset nodes in an ASCII revision graph. | |
2570 | (default: ``{graphnode}``) |
|
2555 | (default: ``{graphnode}``) | |
2571 |
|
2556 | |||
2572 | ``log`` |
|
2557 | ``log`` | |
2573 | Template string for commands that print changesets. |
|
2558 | Template string for commands that print changesets. | |
2574 |
|
2559 | |||
|
2560 | ``mergemarker`` | |||
|
2561 | The template used to print the commit description next to each conflict | |||
|
2562 | marker during merge conflicts. See :hg:`help templates` for the template | |||
|
2563 | format. | |||
|
2564 | ||||
|
2565 | Defaults to showing the hash, tags, branches, bookmarks, author, and | |||
|
2566 | the first line of the commit description. | |||
|
2567 | ||||
|
2568 | If you use non-ASCII characters in names for tags, branches, bookmarks, | |||
|
2569 | authors, and/or commit descriptions, you must pay attention to encodings of | |||
|
2570 | managed files. At template expansion, non-ASCII characters use the encoding | |||
|
2571 | specified by the ``--encoding`` global option, ``HGENCODING`` or other | |||
|
2572 | environment variables that govern your locale. If the encoding of the merge | |||
|
2573 | markers is different from the encoding of the merged files, | |||
|
2574 | serious problems may occur. | |||
|
2575 | ||||
|
2576 | Can be overridden per-merge-tool, see the ``[merge-tools]`` section. | |||
|
2577 | ||||
2575 |
|
2578 | |||
2576 | ``web`` |
|
2579 | ``web`` | |
2577 | ------- |
|
2580 | ------- | |
2578 |
|
2581 | |||
2579 | Web interface configuration. The settings in this section apply to |
|
2582 | Web interface configuration. The settings in this section apply to | |
2580 | both the builtin webserver (started by :hg:`serve`) and the script you |
|
2583 | both the builtin webserver (started by :hg:`serve`) and the script you | |
2581 | run through a webserver (``hgweb.cgi`` and the derivatives for FastCGI |
|
2584 | run through a webserver (``hgweb.cgi`` and the derivatives for FastCGI | |
2582 | and WSGI). |
|
2585 | and WSGI). | |
2583 |
|
2586 | |||
2584 | The Mercurial webserver does no authentication (it does not prompt for |
|
2587 | The Mercurial webserver does no authentication (it does not prompt for | |
2585 | usernames and passwords to validate *who* users are), but it does do |
|
2588 | usernames and passwords to validate *who* users are), but it does do | |
2586 | authorization (it grants or denies access for *authenticated users* |
|
2589 | authorization (it grants or denies access for *authenticated users* | |
2587 | based on settings in this section). You must either configure your |
|
2590 | based on settings in this section). You must either configure your | |
2588 | webserver to do authentication for you, or disable the authorization |
|
2591 | webserver to do authentication for you, or disable the authorization | |
2589 | checks. |
|
2592 | checks. | |
2590 |
|
2593 | |||
2591 | For a quick setup in a trusted environment, e.g., a private LAN, where |
|
2594 | For a quick setup in a trusted environment, e.g., a private LAN, where | |
2592 | you want it to accept pushes from anybody, you can use the following |
|
2595 | you want it to accept pushes from anybody, you can use the following | |
2593 | command line:: |
|
2596 | command line:: | |
2594 |
|
2597 | |||
2595 | $ hg --config web.allow-push=* --config web.push_ssl=False serve |
|
2598 | $ hg --config web.allow-push=* --config web.push_ssl=False serve | |
2596 |
|
2599 | |||
2597 | Note that this will allow anybody to push anything to the server and |
|
2600 | Note that this will allow anybody to push anything to the server and | |
2598 | that this should not be used for public servers. |
|
2601 | that this should not be used for public servers. | |
2599 |
|
2602 | |||
2600 | The full set of options is: |
|
2603 | The full set of options is: | |
2601 |
|
2604 | |||
2602 | ``accesslog`` |
|
2605 | ``accesslog`` | |
2603 | Where to output the access log. (default: stdout) |
|
2606 | Where to output the access log. (default: stdout) | |
2604 |
|
2607 | |||
2605 | ``address`` |
|
2608 | ``address`` | |
2606 | Interface address to bind to. (default: all) |
|
2609 | Interface address to bind to. (default: all) | |
2607 |
|
2610 | |||
2608 | ``allow-archive`` |
|
2611 | ``allow-archive`` | |
2609 | List of archive format (bz2, gz, zip) allowed for downloading. |
|
2612 | List of archive format (bz2, gz, zip) allowed for downloading. | |
2610 | (default: empty) |
|
2613 | (default: empty) | |
2611 |
|
2614 | |||
2612 | ``allowbz2`` |
|
2615 | ``allowbz2`` | |
2613 | (DEPRECATED) Whether to allow .tar.bz2 downloading of repository |
|
2616 | (DEPRECATED) Whether to allow .tar.bz2 downloading of repository | |
2614 | revisions. |
|
2617 | revisions. | |
2615 | (default: False) |
|
2618 | (default: False) | |
2616 |
|
2619 | |||
2617 | ``allowgz`` |
|
2620 | ``allowgz`` | |
2618 | (DEPRECATED) Whether to allow .tar.gz downloading of repository |
|
2621 | (DEPRECATED) Whether to allow .tar.gz downloading of repository | |
2619 | revisions. |
|
2622 | revisions. | |
2620 | (default: False) |
|
2623 | (default: False) | |
2621 |
|
2624 | |||
2622 | ``allow-pull`` |
|
2625 | ``allow-pull`` | |
2623 | Whether to allow pulling from the repository. (default: True) |
|
2626 | Whether to allow pulling from the repository. (default: True) | |
2624 |
|
2627 | |||
2625 | ``allow-push`` |
|
2628 | ``allow-push`` | |
2626 | Whether to allow pushing to the repository. If empty or not set, |
|
2629 | Whether to allow pushing to the repository. If empty or not set, | |
2627 | pushing is not allowed. If the special value ``*``, any remote |
|
2630 | pushing is not allowed. If the special value ``*``, any remote | |
2628 | user can push, including unauthenticated users. Otherwise, the |
|
2631 | user can push, including unauthenticated users. Otherwise, the | |
2629 | remote user must have been authenticated, and the authenticated |
|
2632 | remote user must have been authenticated, and the authenticated | |
2630 | user name must be present in this list. The contents of the |
|
2633 | user name must be present in this list. The contents of the | |
2631 | allow-push list are examined after the deny_push list. |
|
2634 | allow-push list are examined after the deny_push list. | |
2632 |
|
2635 | |||
2633 | ``allow_read`` |
|
2636 | ``allow_read`` | |
2634 | If the user has not already been denied repository access due to |
|
2637 | If the user has not already been denied repository access due to | |
2635 | the contents of deny_read, this list determines whether to grant |
|
2638 | the contents of deny_read, this list determines whether to grant | |
2636 | repository access to the user. If this list is not empty, and the |
|
2639 | repository access to the user. If this list is not empty, and the | |
2637 | user is unauthenticated or not present in the list, then access is |
|
2640 | user is unauthenticated or not present in the list, then access is | |
2638 | denied for the user. If the list is empty or not set, then access |
|
2641 | denied for the user. If the list is empty or not set, then access | |
2639 | is permitted to all users by default. Setting allow_read to the |
|
2642 | is permitted to all users by default. Setting allow_read to the | |
2640 | special value ``*`` is equivalent to it not being set (i.e. access |
|
2643 | special value ``*`` is equivalent to it not being set (i.e. access | |
2641 | is permitted to all users). The contents of the allow_read list are |
|
2644 | is permitted to all users). The contents of the allow_read list are | |
2642 | examined after the deny_read list. |
|
2645 | examined after the deny_read list. | |
2643 |
|
2646 | |||
2644 | ``allowzip`` |
|
2647 | ``allowzip`` | |
2645 | (DEPRECATED) Whether to allow .zip downloading of repository |
|
2648 | (DEPRECATED) Whether to allow .zip downloading of repository | |
2646 | revisions. This feature creates temporary files. |
|
2649 | revisions. This feature creates temporary files. | |
2647 | (default: False) |
|
2650 | (default: False) | |
2648 |
|
2651 | |||
2649 | ``archivesubrepos`` |
|
2652 | ``archivesubrepos`` | |
2650 | Whether to recurse into subrepositories when archiving. |
|
2653 | Whether to recurse into subrepositories when archiving. | |
2651 | (default: False) |
|
2654 | (default: False) | |
2652 |
|
2655 | |||
2653 | ``baseurl`` |
|
2656 | ``baseurl`` | |
2654 | Base URL to use when publishing URLs in other locations, so |
|
2657 | Base URL to use when publishing URLs in other locations, so | |
2655 | third-party tools like email notification hooks can construct |
|
2658 | third-party tools like email notification hooks can construct | |
2656 | URLs. Example: ``http://hgserver/repos/``. |
|
2659 | URLs. Example: ``http://hgserver/repos/``. | |
2657 |
|
2660 | |||
2658 | ``cacerts`` |
|
2661 | ``cacerts`` | |
2659 | Path to file containing a list of PEM encoded certificate |
|
2662 | Path to file containing a list of PEM encoded certificate | |
2660 | authority certificates. Environment variables and ``~user`` |
|
2663 | authority certificates. Environment variables and ``~user`` | |
2661 | constructs are expanded in the filename. If specified on the |
|
2664 | constructs are expanded in the filename. If specified on the | |
2662 | client, then it will verify the identity of remote HTTPS servers |
|
2665 | client, then it will verify the identity of remote HTTPS servers | |
2663 | with these certificates. |
|
2666 | with these certificates. | |
2664 |
|
2667 | |||
2665 | To disable SSL verification temporarily, specify ``--insecure`` from |
|
2668 | To disable SSL verification temporarily, specify ``--insecure`` from | |
2666 | command line. |
|
2669 | command line. | |
2667 |
|
2670 | |||
2668 | You can use OpenSSL's CA certificate file if your platform has |
|
2671 | You can use OpenSSL's CA certificate file if your platform has | |
2669 | one. On most Linux systems this will be |
|
2672 | one. On most Linux systems this will be | |
2670 | ``/etc/ssl/certs/ca-certificates.crt``. Otherwise you will have to |
|
2673 | ``/etc/ssl/certs/ca-certificates.crt``. Otherwise you will have to | |
2671 | generate this file manually. The form must be as follows:: |
|
2674 | generate this file manually. The form must be as follows:: | |
2672 |
|
2675 | |||
2673 | -----BEGIN CERTIFICATE----- |
|
2676 | -----BEGIN CERTIFICATE----- | |
2674 | ... (certificate in base64 PEM encoding) ... |
|
2677 | ... (certificate in base64 PEM encoding) ... | |
2675 | -----END CERTIFICATE----- |
|
2678 | -----END CERTIFICATE----- | |
2676 | -----BEGIN CERTIFICATE----- |
|
2679 | -----BEGIN CERTIFICATE----- | |
2677 | ... (certificate in base64 PEM encoding) ... |
|
2680 | ... (certificate in base64 PEM encoding) ... | |
2678 | -----END CERTIFICATE----- |
|
2681 | -----END CERTIFICATE----- | |
2679 |
|
2682 | |||
2680 | ``cache`` |
|
2683 | ``cache`` | |
2681 | Whether to support caching in hgweb. (default: True) |
|
2684 | Whether to support caching in hgweb. (default: True) | |
2682 |
|
2685 | |||
2683 | ``certificate`` |
|
2686 | ``certificate`` | |
2684 | Certificate to use when running :hg:`serve`. |
|
2687 | Certificate to use when running :hg:`serve`. | |
2685 |
|
2688 | |||
2686 | ``collapse`` |
|
2689 | ``collapse`` | |
2687 | With ``descend`` enabled, repositories in subdirectories are shown at |
|
2690 | With ``descend`` enabled, repositories in subdirectories are shown at | |
2688 | a single level alongside repositories in the current path. With |
|
2691 | a single level alongside repositories in the current path. With | |
2689 | ``collapse`` also enabled, repositories residing at a deeper level than |
|
2692 | ``collapse`` also enabled, repositories residing at a deeper level than | |
2690 | the current path are grouped behind navigable directory entries that |
|
2693 | the current path are grouped behind navigable directory entries that | |
2691 | lead to the locations of these repositories. In effect, this setting |
|
2694 | lead to the locations of these repositories. In effect, this setting | |
2692 | collapses each collection of repositories found within a subdirectory |
|
2695 | collapses each collection of repositories found within a subdirectory | |
2693 | into a single entry for that subdirectory. (default: False) |
|
2696 | into a single entry for that subdirectory. (default: False) | |
2694 |
|
2697 | |||
2695 | ``comparisoncontext`` |
|
2698 | ``comparisoncontext`` | |
2696 | Number of lines of context to show in side-by-side file comparison. If |
|
2699 | Number of lines of context to show in side-by-side file comparison. If | |
2697 | negative or the value ``full``, whole files are shown. (default: 5) |
|
2700 | negative or the value ``full``, whole files are shown. (default: 5) | |
2698 |
|
2701 | |||
2699 | This setting can be overridden by a ``context`` request parameter to the |
|
2702 | This setting can be overridden by a ``context`` request parameter to the | |
2700 | ``comparison`` command, taking the same values. |
|
2703 | ``comparison`` command, taking the same values. | |
2701 |
|
2704 | |||
2702 | ``contact`` |
|
2705 | ``contact`` | |
2703 | Name or email address of the person in charge of the repository. |
|
2706 | Name or email address of the person in charge of the repository. | |
2704 | (default: ui.username or ``$EMAIL`` or "unknown" if unset or empty) |
|
2707 | (default: ui.username or ``$EMAIL`` or "unknown" if unset or empty) | |
2705 |
|
2708 | |||
2706 | ``csp`` |
|
2709 | ``csp`` | |
2707 | Send a ``Content-Security-Policy`` HTTP header with this value. |
|
2710 | Send a ``Content-Security-Policy`` HTTP header with this value. | |
2708 |
|
2711 | |||
2709 | The value may contain a special string ``%nonce%``, which will be replaced |
|
2712 | The value may contain a special string ``%nonce%``, which will be replaced | |
2710 | by a randomly-generated one-time use value. If the value contains |
|
2713 | by a randomly-generated one-time use value. If the value contains | |
2711 | ``%nonce%``, ``web.cache`` will be disabled, as caching undermines the |
|
2714 | ``%nonce%``, ``web.cache`` will be disabled, as caching undermines the | |
2712 | one-time property of the nonce. This nonce will also be inserted into |
|
2715 | one-time property of the nonce. This nonce will also be inserted into | |
2713 | ``<script>`` elements containing inline JavaScript. |
|
2716 | ``<script>`` elements containing inline JavaScript. | |
2714 |
|
2717 | |||
2715 | Note: lots of HTML content sent by the server is derived from repository |
|
2718 | Note: lots of HTML content sent by the server is derived from repository | |
2716 | data. Please consider the potential for malicious repository data to |
|
2719 | data. Please consider the potential for malicious repository data to | |
2717 | "inject" itself into generated HTML content as part of your security |
|
2720 | "inject" itself into generated HTML content as part of your security | |
2718 | threat model. |
|
2721 | threat model. | |
2719 |
|
2722 | |||
2720 | ``deny_push`` |
|
2723 | ``deny_push`` | |
2721 | Whether to deny pushing to the repository. If empty or not set, |
|
2724 | Whether to deny pushing to the repository. If empty or not set, | |
2722 | push is not denied. If the special value ``*``, all remote users are |
|
2725 | push is not denied. If the special value ``*``, all remote users are | |
2723 | denied push. Otherwise, unauthenticated users are all denied, and |
|
2726 | denied push. Otherwise, unauthenticated users are all denied, and | |
2724 | any authenticated user name present in this list is also denied. The |
|
2727 | any authenticated user name present in this list is also denied. The | |
2725 | contents of the deny_push list are examined before the allow-push list. |
|
2728 | contents of the deny_push list are examined before the allow-push list. | |
2726 |
|
2729 | |||
2727 | ``deny_read`` |
|
2730 | ``deny_read`` | |
2728 | Whether to deny reading/viewing of the repository. If this list is |
|
2731 | Whether to deny reading/viewing of the repository. If this list is | |
2729 | not empty, unauthenticated users are all denied, and any |
|
2732 | not empty, unauthenticated users are all denied, and any | |
2730 | authenticated user name present in this list is also denied access to |
|
2733 | authenticated user name present in this list is also denied access to | |
2731 | the repository. If set to the special value ``*``, all remote users |
|
2734 | the repository. If set to the special value ``*``, all remote users | |
2732 | are denied access (rarely needed ;). If deny_read is empty or not set, |
|
2735 | are denied access (rarely needed ;). If deny_read is empty or not set, | |
2733 | the determination of repository access depends on the presence and |
|
2736 | the determination of repository access depends on the presence and | |
2734 | content of the allow_read list (see description). If both |
|
2737 | content of the allow_read list (see description). If both | |
2735 | deny_read and allow_read are empty or not set, then access is |
|
2738 | deny_read and allow_read are empty or not set, then access is | |
2736 | permitted to all users by default. If the repository is being |
|
2739 | permitted to all users by default. If the repository is being | |
2737 | served via hgwebdir, denied users will not be able to see it in |
|
2740 | served via hgwebdir, denied users will not be able to see it in | |
2738 | the list of repositories. The contents of the deny_read list have |
|
2741 | the list of repositories. The contents of the deny_read list have | |
2739 | priority over (are examined before) the contents of the allow_read |
|
2742 | priority over (are examined before) the contents of the allow_read | |
2740 | list. |
|
2743 | list. | |
2741 |
|
2744 | |||
2742 | ``descend`` |
|
2745 | ``descend`` | |
2743 | hgwebdir indexes will not descend into subdirectories. Only repositories |
|
2746 | hgwebdir indexes will not descend into subdirectories. Only repositories | |
2744 | directly in the current path will be shown (other repositories are still |
|
2747 | directly in the current path will be shown (other repositories are still | |
2745 | available from the index corresponding to their containing path). |
|
2748 | available from the index corresponding to their containing path). | |
2746 |
|
2749 | |||
2747 | ``description`` |
|
2750 | ``description`` | |
2748 | Textual description of the repository's purpose or contents. |
|
2751 | Textual description of the repository's purpose or contents. | |
2749 | (default: "unknown") |
|
2752 | (default: "unknown") | |
2750 |
|
2753 | |||
2751 | ``encoding`` |
|
2754 | ``encoding`` | |
2752 | Character encoding name. (default: the current locale charset) |
|
2755 | Character encoding name. (default: the current locale charset) | |
2753 | Example: "UTF-8". |
|
2756 | Example: "UTF-8". | |
2754 |
|
2757 | |||
2755 | ``errorlog`` |
|
2758 | ``errorlog`` | |
2756 | Where to output the error log. (default: stderr) |
|
2759 | Where to output the error log. (default: stderr) | |
2757 |
|
2760 | |||
2758 | ``guessmime`` |
|
2761 | ``guessmime`` | |
2759 | Control MIME types for raw download of file content. |
|
2762 | Control MIME types for raw download of file content. | |
2760 | Set to True to let hgweb guess the content type from the file |
|
2763 | Set to True to let hgweb guess the content type from the file | |
2761 | extension. This will serve HTML files as ``text/html`` and might |
|
2764 | extension. This will serve HTML files as ``text/html`` and might | |
2762 | allow cross-site scripting attacks when serving untrusted |
|
2765 | allow cross-site scripting attacks when serving untrusted | |
2763 | repositories. (default: False) |
|
2766 | repositories. (default: False) | |
2764 |
|
2767 | |||
2765 | ``hidden`` |
|
2768 | ``hidden`` | |
2766 | Whether to hide the repository in the hgwebdir index. |
|
2769 | Whether to hide the repository in the hgwebdir index. | |
2767 | (default: False) |
|
2770 | (default: False) | |
2768 |
|
2771 | |||
2769 | ``ipv6`` |
|
2772 | ``ipv6`` | |
2770 | Whether to use IPv6. (default: False) |
|
2773 | Whether to use IPv6. (default: False) | |
2771 |
|
2774 | |||
2772 | ``labels`` |
|
2775 | ``labels`` | |
2773 | List of string *labels* associated with the repository. |
|
2776 | List of string *labels* associated with the repository. | |
2774 |
|
2777 | |||
2775 | Labels are exposed as a template keyword and can be used to customize |
|
2778 | Labels are exposed as a template keyword and can be used to customize | |
2776 | output. e.g. the ``index`` template can group or filter repositories |
|
2779 | output. e.g. the ``index`` template can group or filter repositories | |
2777 | by labels and the ``summary`` template can display additional content |
|
2780 | by labels and the ``summary`` template can display additional content | |
2778 | if a specific label is present. |
|
2781 | if a specific label is present. | |
2779 |
|
2782 | |||
2780 | ``logoimg`` |
|
2783 | ``logoimg`` | |
2781 | File name of the logo image that some templates display on each page. |
|
2784 | File name of the logo image that some templates display on each page. | |
2782 | The file name is relative to ``staticurl``. That is, the full path to |
|
2785 | The file name is relative to ``staticurl``. That is, the full path to | |
2783 | the logo image is "staticurl/logoimg". |
|
2786 | the logo image is "staticurl/logoimg". | |
2784 | If unset, ``hglogo.png`` will be used. |
|
2787 | If unset, ``hglogo.png`` will be used. | |
2785 |
|
2788 | |||
2786 | ``logourl`` |
|
2789 | ``logourl`` | |
2787 | Base URL to use for logos. If unset, ``https://mercurial-scm.org/`` |
|
2790 | Base URL to use for logos. If unset, ``https://mercurial-scm.org/`` | |
2788 | will be used. |
|
2791 | will be used. | |
2789 |
|
2792 | |||
2790 | ``maxchanges`` |
|
2793 | ``maxchanges`` | |
2791 | Maximum number of changes to list on the changelog. (default: 10) |
|
2794 | Maximum number of changes to list on the changelog. (default: 10) | |
2792 |
|
2795 | |||
2793 | ``maxfiles`` |
|
2796 | ``maxfiles`` | |
2794 | Maximum number of files to list per changeset. (default: 10) |
|
2797 | Maximum number of files to list per changeset. (default: 10) | |
2795 |
|
2798 | |||
2796 | ``maxshortchanges`` |
|
2799 | ``maxshortchanges`` | |
2797 | Maximum number of changes to list on the shortlog, graph or filelog |
|
2800 | Maximum number of changes to list on the shortlog, graph or filelog | |
2798 | pages. (default: 60) |
|
2801 | pages. (default: 60) | |
2799 |
|
2802 | |||
2800 | ``name`` |
|
2803 | ``name`` | |
2801 | Repository name to use in the web interface. |
|
2804 | Repository name to use in the web interface. | |
2802 | (default: current working directory) |
|
2805 | (default: current working directory) | |
2803 |
|
2806 | |||
2804 | ``port`` |
|
2807 | ``port`` | |
2805 | Port to listen on. (default: 8000) |
|
2808 | Port to listen on. (default: 8000) | |
2806 |
|
2809 | |||
2807 | ``prefix`` |
|
2810 | ``prefix`` | |
2808 | Prefix path to serve from. (default: '' (server root)) |
|
2811 | Prefix path to serve from. (default: '' (server root)) | |
2809 |
|
2812 | |||
2810 | ``push_ssl`` |
|
2813 | ``push_ssl`` | |
2811 | Whether to require that inbound pushes be transported over SSL to |
|
2814 | Whether to require that inbound pushes be transported over SSL to | |
2812 | prevent password sniffing. (default: True) |
|
2815 | prevent password sniffing. (default: True) | |
2813 |
|
2816 | |||
2814 | ``refreshinterval`` |
|
2817 | ``refreshinterval`` | |
2815 | How frequently directory listings re-scan the filesystem for new |
|
2818 | How frequently directory listings re-scan the filesystem for new | |
2816 | repositories, in seconds. This is relevant when wildcards are used |
|
2819 | repositories, in seconds. This is relevant when wildcards are used | |
2817 | to define paths. Depending on how much filesystem traversal is |
|
2820 | to define paths. Depending on how much filesystem traversal is | |
2818 | required, refreshing may negatively impact performance. |
|
2821 | required, refreshing may negatively impact performance. | |
2819 |
|
2822 | |||
2820 | Values less than or equal to 0 always refresh. |
|
2823 | Values less than or equal to 0 always refresh. | |
2821 | (default: 20) |
|
2824 | (default: 20) | |
2822 |
|
2825 | |||
2823 | ``server-header`` |
|
2826 | ``server-header`` | |
2824 | Value for HTTP ``Server`` response header. |
|
2827 | Value for HTTP ``Server`` response header. | |
2825 |
|
2828 | |||
2826 | ``static`` |
|
2829 | ``static`` | |
2827 | Directory where static files are served from. |
|
2830 | Directory where static files are served from. | |
2828 |
|
2831 | |||
2829 | ``staticurl`` |
|
2832 | ``staticurl`` | |
2830 | Base URL to use for static files. If unset, static files (e.g. the |
|
2833 | Base URL to use for static files. If unset, static files (e.g. the | |
2831 | hgicon.png favicon) will be served by the CGI script itself. Use |
|
2834 | hgicon.png favicon) will be served by the CGI script itself. Use | |
2832 | this setting to serve them directly with the HTTP server. |
|
2835 | this setting to serve them directly with the HTTP server. | |
2833 | Example: ``http://hgserver/static/``. |
|
2836 | Example: ``http://hgserver/static/``. | |
2834 |
|
2837 | |||
2835 | ``stripes`` |
|
2838 | ``stripes`` | |
2836 | How many lines a "zebra stripe" should span in multi-line output. |
|
2839 | How many lines a "zebra stripe" should span in multi-line output. | |
2837 | Set to 0 to disable. (default: 1) |
|
2840 | Set to 0 to disable. (default: 1) | |
2838 |
|
2841 | |||
2839 | ``style`` |
|
2842 | ``style`` | |
2840 | Which template map style to use. The available options are the names of |
|
2843 | Which template map style to use. The available options are the names of | |
2841 | subdirectories in the HTML templates path. (default: ``paper``) |
|
2844 | subdirectories in the HTML templates path. (default: ``paper``) | |
2842 | Example: ``monoblue``. |
|
2845 | Example: ``monoblue``. | |
2843 |
|
2846 | |||
2844 | ``templates`` |
|
2847 | ``templates`` | |
2845 | Where to find the HTML templates. The default path to the HTML templates |
|
2848 | Where to find the HTML templates. The default path to the HTML templates | |
2846 | can be obtained from ``hg debuginstall``. |
|
2849 | can be obtained from ``hg debuginstall``. | |
2847 |
|
2850 | |||
2848 | ``websub`` |
|
2851 | ``websub`` | |
2849 | ---------- |
|
2852 | ---------- | |
2850 |
|
2853 | |||
2851 | Web substitution filter definition. You can use this section to |
|
2854 | Web substitution filter definition. You can use this section to | |
2852 | define a set of regular expression substitution patterns which |
|
2855 | define a set of regular expression substitution patterns which | |
2853 | let you automatically modify the hgweb server output. |
|
2856 | let you automatically modify the hgweb server output. | |
2854 |
|
2857 | |||
2855 | The default hgweb templates only apply these substitution patterns |
|
2858 | The default hgweb templates only apply these substitution patterns | |
2856 | on the revision description fields. You can apply them anywhere |
|
2859 | on the revision description fields. You can apply them anywhere | |
2857 | you want when you create your own templates by adding calls to the |
|
2860 | you want when you create your own templates by adding calls to the | |
2858 | "websub" filter (usually after calling the "escape" filter). |
|
2861 | "websub" filter (usually after calling the "escape" filter). | |
2859 |
|
2862 | |||
2860 | This can be used, for example, to convert issue references to links |
|
2863 | This can be used, for example, to convert issue references to links | |
2861 | to your issue tracker, or to convert "markdown-like" syntax into |
|
2864 | to your issue tracker, or to convert "markdown-like" syntax into | |
2862 | HTML (see the examples below). |
|
2865 | HTML (see the examples below). | |
2863 |
|
2866 | |||
2864 | Each entry in this section names a substitution filter. |
|
2867 | Each entry in this section names a substitution filter. | |
2865 | The value of each entry defines the substitution expression itself. |
|
2868 | The value of each entry defines the substitution expression itself. | |
2866 | The websub expressions follow the old interhg extension syntax, |
|
2869 | The websub expressions follow the old interhg extension syntax, | |
2867 | which in turn imitates the Unix sed replacement syntax:: |
|
2870 | which in turn imitates the Unix sed replacement syntax:: | |
2868 |
|
2871 | |||
2869 | patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i] |
|
2872 | patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i] | |
2870 |
|
2873 | |||
2871 | You can use any separator other than "/". The final "i" is optional |
|
2874 | You can use any separator other than "/". The final "i" is optional | |
2872 | and indicates that the search must be case insensitive. |
|
2875 | and indicates that the search must be case insensitive. | |
2873 |
|
2876 | |||
2874 | Examples:: |
|
2877 | Examples:: | |
2875 |
|
2878 | |||
2876 | [websub] |
|
2879 | [websub] | |
2877 | issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i |
|
2880 | issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i | |
2878 | italic = s/\b_(\S+)_\b/<i>\1<\/i>/ |
|
2881 | italic = s/\b_(\S+)_\b/<i>\1<\/i>/ | |
2879 | bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/ |
|
2882 | bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/ | |
2880 |
|
2883 | |||
2881 | ``worker`` |
|
2884 | ``worker`` | |
2882 | ---------- |
|
2885 | ---------- | |
2883 |
|
2886 | |||
2884 | Parallel master/worker configuration. We currently perform working |
|
2887 | Parallel master/worker configuration. We currently perform working | |
2885 | directory updates in parallel on Unix-like systems, which greatly |
|
2888 | directory updates in parallel on Unix-like systems, which greatly | |
2886 | helps performance. |
|
2889 | helps performance. | |
2887 |
|
2890 | |||
2888 | ``enabled`` |
|
2891 | ``enabled`` | |
2889 | Whether to enable workers code to be used. |
|
2892 | Whether to enable workers code to be used. | |
2890 | (default: true) |
|
2893 | (default: true) | |
2891 |
|
2894 | |||
2892 | ``numcpus`` |
|
2895 | ``numcpus`` | |
2893 | Number of CPUs to use for parallel operations. A zero or |
|
2896 | Number of CPUs to use for parallel operations. A zero or | |
2894 | negative value is treated as ``use the default``. |
|
2897 | negative value is treated as ``use the default``. | |
2895 | (default: 4 or the number of CPUs on the system, whichever is larger) |
|
2898 | (default: 4 or the number of CPUs on the system, whichever is larger) | |
2896 |
|
2899 | |||
2897 | ``backgroundclose`` |
|
2900 | ``backgroundclose`` | |
2898 | Whether to enable closing file handles on background threads during certain |
|
2901 | Whether to enable closing file handles on background threads during certain | |
2899 | operations. Some platforms aren't very efficient at closing file |
|
2902 | operations. Some platforms aren't very efficient at closing file | |
2900 | handles that have been written or appended to. By performing file closing |
|
2903 | handles that have been written or appended to. By performing file closing | |
2901 | on background threads, file write rate can increase substantially. |
|
2904 | on background threads, file write rate can increase substantially. | |
2902 | (default: true on Windows, false elsewhere) |
|
2905 | (default: true on Windows, false elsewhere) | |
2903 |
|
2906 | |||
2904 | ``backgroundcloseminfilecount`` |
|
2907 | ``backgroundcloseminfilecount`` | |
2905 | Minimum number of files required to trigger background file closing. |
|
2908 | Minimum number of files required to trigger background file closing. | |
2906 | Operations not writing this many files won't start background close |
|
2909 | Operations not writing this many files won't start background close | |
2907 | threads. |
|
2910 | threads. | |
2908 | (default: 2048) |
|
2911 | (default: 2048) | |
2909 |
|
2912 | |||
2910 | ``backgroundclosemaxqueue`` |
|
2913 | ``backgroundclosemaxqueue`` | |
2911 | The maximum number of opened file handles waiting to be closed in the |
|
2914 | The maximum number of opened file handles waiting to be closed in the | |
2912 | background. This option only has an effect if ``backgroundclose`` is |
|
2915 | background. This option only has an effect if ``backgroundclose`` is | |
2913 | enabled. |
|
2916 | enabled. | |
2914 | (default: 384) |
|
2917 | (default: 384) | |
2915 |
|
2918 | |||
2916 | ``backgroundclosethreadcount`` |
|
2919 | ``backgroundclosethreadcount`` | |
2917 | Number of threads to process background file closes. Only relevant if |
|
2920 | Number of threads to process background file closes. Only relevant if | |
2918 | ``backgroundclose`` is enabled. |
|
2921 | ``backgroundclose`` is enabled. | |
2919 | (default: 4) |
|
2922 | (default: 4) |
@@ -1,317 +1,346 b'' | |||||
1 | $ hg init |
|
1 | $ hg init | |
2 | $ cat << EOF > a |
|
2 | $ cat << EOF > a | |
3 | > Small Mathematical Series. |
|
3 | > Small Mathematical Series. | |
4 | > One |
|
4 | > One | |
5 | > Two |
|
5 | > Two | |
6 | > Three |
|
6 | > Three | |
7 | > Four |
|
7 | > Four | |
8 | > Five |
|
8 | > Five | |
9 | > Hop we are done. |
|
9 | > Hop we are done. | |
10 | > EOF |
|
10 | > EOF | |
11 | $ hg add a |
|
11 | $ hg add a | |
12 | $ hg commit -m ancestor |
|
12 | $ hg commit -m ancestor | |
13 | $ cat << EOF > a |
|
13 | $ cat << EOF > a | |
14 | > Small Mathematical Series. |
|
14 | > Small Mathematical Series. | |
15 | > 1 |
|
15 | > 1 | |
16 | > 2 |
|
16 | > 2 | |
17 | > 3 |
|
17 | > 3 | |
18 | > 4 |
|
18 | > 4 | |
19 | > 5 |
|
19 | > 5 | |
20 | > Hop we are done. |
|
20 | > Hop we are done. | |
21 | > EOF |
|
21 | > EOF | |
22 | $ hg commit -m branch1 |
|
22 | $ hg commit -m branch1 | |
23 | $ hg co 0 |
|
23 | $ hg co 0 | |
24 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
24 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
25 | $ cat << EOF > a |
|
25 | $ cat << EOF > a | |
26 | > Small Mathematical Series. |
|
26 | > Small Mathematical Series. | |
27 | > 1 |
|
27 | > 1 | |
28 | > 2 |
|
28 | > 2 | |
29 | > 3 |
|
29 | > 3 | |
30 | > 6 |
|
30 | > 6 | |
31 | > 8 |
|
31 | > 8 | |
32 | > Hop we are done. |
|
32 | > Hop we are done. | |
33 | > EOF |
|
33 | > EOF | |
34 | $ hg commit -m branch2 |
|
34 | $ hg commit -m branch2 | |
35 | created new head |
|
35 | created new head | |
36 |
|
36 | |||
37 | $ hg merge 1 |
|
37 | $ hg merge 1 | |
38 | merging a |
|
38 | merging a | |
39 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
39 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
40 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
40 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
41 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
41 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
42 | [1] |
|
42 | [1] | |
43 |
|
43 | |||
44 | $ hg id |
|
44 | $ hg id | |
45 | 618808747361+c0c68e4fe667+ tip |
|
45 | 618808747361+c0c68e4fe667+ tip | |
46 |
|
46 | |||
47 | $ echo "[commands]" >> $HGRCPATH |
|
47 | $ echo "[commands]" >> $HGRCPATH | |
48 | $ echo "status.verbose=true" >> $HGRCPATH |
|
48 | $ echo "status.verbose=true" >> $HGRCPATH | |
49 | $ hg status |
|
49 | $ hg status | |
50 | M a |
|
50 | M a | |
51 | ? a.orig |
|
51 | ? a.orig | |
52 | # The repository is in an unfinished *merge* state. |
|
52 | # The repository is in an unfinished *merge* state. | |
53 |
|
53 | |||
54 | # Unresolved merge conflicts: |
|
54 | # Unresolved merge conflicts: | |
55 | # |
|
55 | # | |
56 | # a |
|
56 | # a | |
57 | # |
|
57 | # | |
58 | # To mark files as resolved: hg resolve --mark FILE |
|
58 | # To mark files as resolved: hg resolve --mark FILE | |
59 |
|
59 | |||
60 | # To continue: hg commit |
|
60 | # To continue: hg commit | |
61 | # To abort: hg merge --abort |
|
61 | # To abort: hg merge --abort | |
62 |
|
62 | |||
63 | $ hg status -Tjson |
|
63 | $ hg status -Tjson | |
64 | [ |
|
64 | [ | |
65 | { |
|
65 | { | |
66 | "itemtype": "file", |
|
66 | "itemtype": "file", | |
67 | "path": "a", |
|
67 | "path": "a", | |
68 | "status": "M", |
|
68 | "status": "M", | |
69 | "unresolved": true |
|
69 | "unresolved": true | |
70 | }, |
|
70 | }, | |
71 | { |
|
71 | { | |
72 | "itemtype": "file", |
|
72 | "itemtype": "file", | |
73 | "path": "a.orig", |
|
73 | "path": "a.orig", | |
74 | "status": "?" |
|
74 | "status": "?" | |
75 | }, |
|
75 | }, | |
76 | { |
|
76 | { | |
77 | "itemtype": "morestatus", |
|
77 | "itemtype": "morestatus", | |
78 | "unfinished": "merge", |
|
78 | "unfinished": "merge", | |
79 | "unfinishedmsg": "To continue: hg commit\nTo abort: hg merge --abort" |
|
79 | "unfinishedmsg": "To continue: hg commit\nTo abort: hg merge --abort" | |
80 | } |
|
80 | } | |
81 | ] |
|
81 | ] | |
82 |
|
82 | |||
83 | $ cat a |
|
83 | $ cat a | |
84 | Small Mathematical Series. |
|
84 | Small Mathematical Series. | |
85 | 1 |
|
85 | 1 | |
86 | 2 |
|
86 | 2 | |
87 | 3 |
|
87 | 3 | |
88 | <<<<<<< working copy: 618808747361 - test: branch2 |
|
88 | <<<<<<< working copy: 618808747361 - test: branch2 | |
89 | 6 |
|
89 | 6 | |
90 | 8 |
|
90 | 8 | |
91 | ======= |
|
91 | ======= | |
92 | 4 |
|
92 | 4 | |
93 | 5 |
|
93 | 5 | |
94 | >>>>>>> merge rev: c0c68e4fe667 - test: branch1 |
|
94 | >>>>>>> merge rev: c0c68e4fe667 - test: branch1 | |
95 | Hop we are done. |
|
95 | Hop we are done. | |
96 |
|
96 | |||
97 | $ hg status --config commands.status.verbose=0 |
|
97 | $ hg status --config commands.status.verbose=0 | |
98 | M a |
|
98 | M a | |
99 | ? a.orig |
|
99 | ? a.orig | |
100 |
|
100 | |||
101 | Verify custom conflict markers |
|
101 | Verify custom conflict markers | |
102 |
|
102 | |||
103 | $ hg up -q --clean . |
|
103 | $ hg up -q --clean . | |
104 | $ cat <<EOF >> .hg/hgrc |
|
104 | $ cat <<EOF >> .hg/hgrc | |
|
105 | > [command-templates] | |||
|
106 | > mergemarker = '{author} {rev}' | |||
|
107 | > EOF | |||
|
108 | ||||
|
109 | $ hg merge 1 | |||
|
110 | merging a | |||
|
111 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |||
|
112 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |||
|
113 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |||
|
114 | [1] | |||
|
115 | ||||
|
116 | $ cat a | |||
|
117 | Small Mathematical Series. | |||
|
118 | 1 | |||
|
119 | 2 | |||
|
120 | 3 | |||
|
121 | <<<<<<< working copy: test 2 | |||
|
122 | 6 | |||
|
123 | 8 | |||
|
124 | ======= | |||
|
125 | 4 | |||
|
126 | 5 | |||
|
127 | >>>>>>> merge rev: test 1 | |||
|
128 | Hop we are done. | |||
|
129 | ||||
|
130 | Verify custom conflict markers with legacy config name | |||
|
131 | ||||
|
132 | $ hg up -q --clean . | |||
|
133 | $ cat <<EOF >> .hg/hgrc | |||
105 | > [ui] |
|
134 | > [ui] | |
106 | > mergemarkertemplate = '{author} {rev}' |
|
135 | > mergemarkertemplate = '{author} {rev}' | |
107 | > EOF |
|
136 | > EOF | |
108 |
|
137 | |||
109 | $ hg merge 1 |
|
138 | $ hg merge 1 | |
110 | merging a |
|
139 | merging a | |
111 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
140 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
112 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
141 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
113 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
142 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
114 | [1] |
|
143 | [1] | |
115 |
|
144 | |||
116 | $ cat a |
|
145 | $ cat a | |
117 | Small Mathematical Series. |
|
146 | Small Mathematical Series. | |
118 | 1 |
|
147 | 1 | |
119 | 2 |
|
148 | 2 | |
120 | 3 |
|
149 | 3 | |
121 | <<<<<<< working copy: test 2 |
|
150 | <<<<<<< working copy: test 2 | |
122 | 6 |
|
151 | 6 | |
123 | 8 |
|
152 | 8 | |
124 | ======= |
|
153 | ======= | |
125 | 4 |
|
154 | 4 | |
126 | 5 |
|
155 | 5 | |
127 | >>>>>>> merge rev: test 1 |
|
156 | >>>>>>> merge rev: test 1 | |
128 | Hop we are done. |
|
157 | Hop we are done. | |
129 |
|
158 | |||
130 | Verify line splitting of custom conflict marker which causes multiple lines |
|
159 | Verify line splitting of custom conflict marker which causes multiple lines | |
131 |
|
160 | |||
132 | $ hg up -q --clean . |
|
161 | $ hg up -q --clean . | |
133 | $ cat >> .hg/hgrc <<EOF |
|
162 | $ cat >> .hg/hgrc <<EOF | |
134 | > [ui] |
|
163 | > [command-templates] | |
135 |
> mergemarker |
|
164 | > mergemarker={author} {rev}\nfoo\nbar\nbaz | |
136 | > EOF |
|
165 | > EOF | |
137 |
|
166 | |||
138 | $ hg -q merge 1 |
|
167 | $ hg -q merge 1 | |
139 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
168 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
140 | [1] |
|
169 | [1] | |
141 |
|
170 | |||
142 | $ cat a |
|
171 | $ cat a | |
143 | Small Mathematical Series. |
|
172 | Small Mathematical Series. | |
144 | 1 |
|
173 | 1 | |
145 | 2 |
|
174 | 2 | |
146 | 3 |
|
175 | 3 | |
147 | <<<<<<< working copy: test 2 |
|
176 | <<<<<<< working copy: test 2 | |
148 | 6 |
|
177 | 6 | |
149 | 8 |
|
178 | 8 | |
150 | ======= |
|
179 | ======= | |
151 | 4 |
|
180 | 4 | |
152 | 5 |
|
181 | 5 | |
153 | >>>>>>> merge rev: test 1 |
|
182 | >>>>>>> merge rev: test 1 | |
154 | Hop we are done. |
|
183 | Hop we are done. | |
155 |
|
184 | |||
156 | Verify line trimming of custom conflict marker using multi-byte characters |
|
185 | Verify line trimming of custom conflict marker using multi-byte characters | |
157 |
|
186 | |||
158 | $ hg up -q --clean . |
|
187 | $ hg up -q --clean . | |
159 | $ "$PYTHON" <<EOF |
|
188 | $ "$PYTHON" <<EOF | |
160 | > fp = open('logfile', 'wb') |
|
189 | > fp = open('logfile', 'wb') | |
161 | > fp.write(b'12345678901234567890123456789012345678901234567890' + |
|
190 | > fp.write(b'12345678901234567890123456789012345678901234567890' + | |
162 | > b'1234567890') # there are 5 more columns for 80 columns |
|
191 | > b'1234567890') # there are 5 more columns for 80 columns | |
163 | > |
|
192 | > | |
164 | > # 2 x 4 = 8 columns, but 3 x 4 = 12 bytes |
|
193 | > # 2 x 4 = 8 columns, but 3 x 4 = 12 bytes | |
165 | > fp.write(u'\u3042\u3044\u3046\u3048'.encode('utf-8')) |
|
194 | > fp.write(u'\u3042\u3044\u3046\u3048'.encode('utf-8')) | |
166 | > |
|
195 | > | |
167 | > fp.close() |
|
196 | > fp.close() | |
168 | > EOF |
|
197 | > EOF | |
169 | $ hg add logfile |
|
198 | $ hg add logfile | |
170 | $ hg --encoding utf-8 commit --logfile logfile |
|
199 | $ hg --encoding utf-8 commit --logfile logfile | |
171 |
|
200 | |||
172 | $ cat >> .hg/hgrc <<EOF |
|
201 | $ cat >> .hg/hgrc <<EOF | |
173 | > [ui] |
|
202 | > [command-templates] | |
174 |
> mergemarker |
|
203 | > mergemarker={desc|firstline} | |
175 | > EOF |
|
204 | > EOF | |
176 |
|
205 | |||
177 | $ hg -q --encoding utf-8 merge 1 |
|
206 | $ hg -q --encoding utf-8 merge 1 | |
178 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
207 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
179 | [1] |
|
208 | [1] | |
180 |
|
209 | |||
181 | $ cat a |
|
210 | $ cat a | |
182 | Small Mathematical Series. |
|
211 | Small Mathematical Series. | |
183 | 1 |
|
212 | 1 | |
184 | 2 |
|
213 | 2 | |
185 | 3 |
|
214 | 3 | |
186 | <<<<<<< working copy: 1234567890123456789012345678901234567890123456789012345... |
|
215 | <<<<<<< working copy: 1234567890123456789012345678901234567890123456789012345... | |
187 | 6 |
|
216 | 6 | |
188 | 8 |
|
217 | 8 | |
189 | ======= |
|
218 | ======= | |
190 | 4 |
|
219 | 4 | |
191 | 5 |
|
220 | 5 | |
192 | >>>>>>> merge rev: branch1 |
|
221 | >>>>>>> merge rev: branch1 | |
193 | Hop we are done. |
|
222 | Hop we are done. | |
194 |
|
223 | |||
195 | Verify basic conflict markers |
|
224 | Verify basic conflict markers | |
196 |
|
225 | |||
197 | $ hg up -q --clean 2 |
|
226 | $ hg up -q --clean 2 | |
198 | $ printf "\n[ui]\nmergemarkers=basic\n" >> .hg/hgrc |
|
227 | $ printf "\n[ui]\nmergemarkers=basic\n" >> .hg/hgrc | |
199 |
|
228 | |||
200 | $ hg merge 1 |
|
229 | $ hg merge 1 | |
201 | merging a |
|
230 | merging a | |
202 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
231 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
203 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
232 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
204 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
233 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
205 | [1] |
|
234 | [1] | |
206 |
|
235 | |||
207 | $ cat a |
|
236 | $ cat a | |
208 | Small Mathematical Series. |
|
237 | Small Mathematical Series. | |
209 | 1 |
|
238 | 1 | |
210 | 2 |
|
239 | 2 | |
211 | 3 |
|
240 | 3 | |
212 | <<<<<<< working copy |
|
241 | <<<<<<< working copy | |
213 | 6 |
|
242 | 6 | |
214 | 8 |
|
243 | 8 | |
215 | ======= |
|
244 | ======= | |
216 | 4 |
|
245 | 4 | |
217 | 5 |
|
246 | 5 | |
218 | >>>>>>> merge rev |
|
247 | >>>>>>> merge rev | |
219 | Hop we are done. |
|
248 | Hop we are done. | |
220 |
|
249 | |||
221 | internal:merge3 |
|
250 | internal:merge3 | |
222 |
|
251 | |||
223 | $ hg up -q --clean . |
|
252 | $ hg up -q --clean . | |
224 |
|
253 | |||
225 | $ hg merge 1 --tool internal:merge3 |
|
254 | $ hg merge 1 --tool internal:merge3 | |
226 | merging a |
|
255 | merging a | |
227 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
256 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
228 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
257 | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
229 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
258 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
230 | [1] |
|
259 | [1] | |
231 | $ cat a |
|
260 | $ cat a | |
232 | Small Mathematical Series. |
|
261 | Small Mathematical Series. | |
233 | <<<<<<< working copy |
|
262 | <<<<<<< working copy | |
234 | 1 |
|
263 | 1 | |
235 | 2 |
|
264 | 2 | |
236 | 3 |
|
265 | 3 | |
237 | 6 |
|
266 | 6 | |
238 | 8 |
|
267 | 8 | |
239 | ||||||| base |
|
268 | ||||||| base | |
240 | One |
|
269 | One | |
241 | Two |
|
270 | Two | |
242 | Three |
|
271 | Three | |
243 | Four |
|
272 | Four | |
244 | Five |
|
273 | Five | |
245 | ======= |
|
274 | ======= | |
246 | 1 |
|
275 | 1 | |
247 | 2 |
|
276 | 2 | |
248 | 3 |
|
277 | 3 | |
249 | 4 |
|
278 | 4 | |
250 | 5 |
|
279 | 5 | |
251 | >>>>>>> merge rev |
|
280 | >>>>>>> merge rev | |
252 | Hop we are done. |
|
281 | Hop we are done. | |
253 |
|
282 | |||
254 | Add some unconflicting changes on each head, to make sure we really |
|
283 | Add some unconflicting changes on each head, to make sure we really | |
255 | are merging, unlike :local and :other |
|
284 | are merging, unlike :local and :other | |
256 |
|
285 | |||
257 | $ hg up -C |
|
286 | $ hg up -C | |
258 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
287 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
259 | updated to "e0693e20f496: 123456789012345678901234567890123456789012345678901234567890????" |
|
288 | updated to "e0693e20f496: 123456789012345678901234567890123456789012345678901234567890????" | |
260 | 1 other heads for branch "default" |
|
289 | 1 other heads for branch "default" | |
261 | $ printf "\n\nEnd of file\n" >> a |
|
290 | $ printf "\n\nEnd of file\n" >> a | |
262 | $ hg ci -m "Add some stuff at the end" |
|
291 | $ hg ci -m "Add some stuff at the end" | |
263 | $ hg up -r 1 |
|
292 | $ hg up -r 1 | |
264 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
293 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
265 | $ printf "Start of file\n\n\n" > tmp |
|
294 | $ printf "Start of file\n\n\n" > tmp | |
266 | $ cat a >> tmp |
|
295 | $ cat a >> tmp | |
267 | $ mv tmp a |
|
296 | $ mv tmp a | |
268 | $ hg ci -m "Add some stuff at the beginning" |
|
297 | $ hg ci -m "Add some stuff at the beginning" | |
269 |
|
298 | |||
270 | Now test :merge-other and :merge-local |
|
299 | Now test :merge-other and :merge-local | |
271 |
|
300 | |||
272 | $ hg merge |
|
301 | $ hg merge | |
273 | merging a |
|
302 | merging a | |
274 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') |
|
303 | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | |
275 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
304 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
276 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
305 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
277 | [1] |
|
306 | [1] | |
278 | $ hg resolve --tool :merge-other a |
|
307 | $ hg resolve --tool :merge-other a | |
279 | merging a |
|
308 | merging a | |
280 | (no more unresolved files) |
|
309 | (no more unresolved files) | |
281 | $ cat a |
|
310 | $ cat a | |
282 | Start of file |
|
311 | Start of file | |
283 |
|
312 | |||
284 |
|
313 | |||
285 | Small Mathematical Series. |
|
314 | Small Mathematical Series. | |
286 | 1 |
|
315 | 1 | |
287 | 2 |
|
316 | 2 | |
288 | 3 |
|
317 | 3 | |
289 | 6 |
|
318 | 6 | |
290 | 8 |
|
319 | 8 | |
291 | Hop we are done. |
|
320 | Hop we are done. | |
292 |
|
321 | |||
293 |
|
322 | |||
294 | End of file |
|
323 | End of file | |
295 |
|
324 | |||
296 | $ hg up -C |
|
325 | $ hg up -C | |
297 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
326 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
298 | updated to "18b51d585961: Add some stuff at the beginning" |
|
327 | updated to "18b51d585961: Add some stuff at the beginning" | |
299 | 1 other heads for branch "default" |
|
328 | 1 other heads for branch "default" | |
300 | $ hg merge --tool :merge-local |
|
329 | $ hg merge --tool :merge-local | |
301 | merging a |
|
330 | merging a | |
302 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
331 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
303 | (branch merge, don't forget to commit) |
|
332 | (branch merge, don't forget to commit) | |
304 | $ cat a |
|
333 | $ cat a | |
305 | Start of file |
|
334 | Start of file | |
306 |
|
335 | |||
307 |
|
336 | |||
308 | Small Mathematical Series. |
|
337 | Small Mathematical Series. | |
309 | 1 |
|
338 | 1 | |
310 | 2 |
|
339 | 2 | |
311 | 3 |
|
340 | 3 | |
312 | 4 |
|
341 | 4 | |
313 | 5 |
|
342 | 5 | |
314 | Hop we are done. |
|
343 | Hop we are done. | |
315 |
|
344 | |||
316 |
|
345 | |||
317 | End of file |
|
346 | End of file |
General Comments 0
You need to be logged in to leave comments.
Login now