equal
deleted
inserted
replaced
7 |
7 |
8 from node import * |
8 from node import * |
9 from i18n import _ |
9 from i18n import _ |
10 import os, sys, mdiff, bdiff, util, templater, patch, commands |
10 import os, sys, mdiff, bdiff, util, templater, patch, commands |
11 import atexit, signal, pdb, hg, lock, fancyopts, traceback |
11 import atexit, signal, pdb, hg, lock, fancyopts, traceback |
12 import socket, revlog, version, extensions, errno |
12 import socket, revlog, version, extensions, errno, localrepo |
13 |
13 |
14 revrangesep = ':' |
14 revrangesep = ':' |
15 |
15 |
16 class UnknownCommand(Exception): |
16 class UnknownCommand(Exception): |
17 """Exception raised if command is not in the command table.""" |
17 """Exception raised if command is not in the command table.""" |
253 os.chdir(cwd) |
253 os.chdir(cwd) |
254 |
254 |
255 extensions.loadall(ui) |
255 extensions.loadall(ui) |
256 ui.addreadhook(extensions.loadall) |
256 ui.addreadhook(extensions.loadall) |
257 |
257 |
|
258 # read the local extension info into a local ui object |
|
259 rcpath = earlygetopt(["-R", "--repository"], args) or localrepo.findrepo() |
|
260 if rcpath: |
|
261 try: |
|
262 lui = commands.ui.ui(parentui=ui) |
|
263 lui.readconfig(os.path.join(rcpath, ".hg", "hgrc")) |
|
264 except IOError: |
|
265 pass |
|
266 |
258 cmd, func, args, options, cmdoptions = parse(ui, args) |
267 cmd, func, args, options, cmdoptions = parse(ui, args) |
259 |
268 |
260 if options["encoding"]: |
269 if options["encoding"]: |
261 util._encoding = options["encoding"] |
270 util._encoding = options["encoding"] |
262 if options["encodingmode"]: |
271 if options["encodingmode"]: |