equal
deleted
inserted
replaced
236 argcount -= 1 |
236 argcount -= 1 |
237 else: |
237 else: |
238 pos += 1 |
238 pos += 1 |
239 return values |
239 return values |
240 |
240 |
|
241 _loaded = {} |
241 def _dispatch(ui, args): |
242 def _dispatch(ui, args): |
242 # read --config before doing anything else |
243 # read --config before doing anything else |
243 # (e.g. to change trust settings for reading .hg/hgrc) |
244 # (e.g. to change trust settings for reading .hg/hgrc) |
244 config = _earlygetopt(['--config'], args) |
245 config = _earlygetopt(['--config'], args) |
245 if config: |
246 if config: |
267 path = lui.expandpath(rpath[-1]) |
268 path = lui.expandpath(rpath[-1]) |
268 lui = _ui.ui(parentui=ui) |
269 lui = _ui.ui(parentui=ui) |
269 lui.readconfig(os.path.join(path, ".hg", "hgrc")) |
270 lui.readconfig(os.path.join(path, ".hg", "hgrc")) |
270 |
271 |
271 extensions.loadall(lui) |
272 extensions.loadall(lui) |
|
273 for name, module in extensions.extensions(): |
|
274 if name in _loaded: |
|
275 continue |
|
276 cmdtable = getattr(module, 'cmdtable', {}) |
|
277 overrides = [cmd for cmd in cmdtable if cmd in commands.table] |
|
278 if overrides: |
|
279 ui.warn(_("extension '%s' overrides commands: %s\n") |
|
280 % (name, " ".join(overrides))) |
|
281 commands.table.update(cmdtable) |
|
282 _loaded[name] = 1 |
272 # check for fallback encoding |
283 # check for fallback encoding |
273 fallback = lui.config('ui', 'fallbackencoding') |
284 fallback = lui.config('ui', 'fallbackencoding') |
274 if fallback: |
285 if fallback: |
275 util._fallbackencoding = fallback |
286 util._fallbackencoding = fallback |
276 |
287 |