equal
deleted
inserted
replaced
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 |
258 # read the local repository .hgrc into a local ui object |
259 path = earlygetopt(["-R", "--repository"], args) or localrepo.findrepo() or "" |
259 # this will trigger its extensions to load |
|
260 path = earlygetopt(["-R", "--repository"], args) |
|
261 if not path: |
|
262 path = localrepo.findrepo() or "" |
260 if path: |
263 if path: |
261 try: |
264 try: |
262 lui = commands.ui.ui(parentui=ui) |
265 lui = commands.ui.ui(parentui=ui) |
263 lui.readconfig(os.path.join(path, ".hg", "hgrc")) |
266 lui.readconfig(os.path.join(path, ".hg", "hgrc")) |
264 except IOError: |
267 except IOError: |
296 |
299 |
297 if cmd not in commands.norepo.split(): |
300 if cmd not in commands.norepo.split(): |
298 repo = None |
301 repo = None |
299 try: |
302 try: |
300 repo = hg.repository(ui, path=path) |
303 repo = hg.repository(ui, path=path) |
301 #ui = repo.ui |
304 ui = repo.ui |
302 if not repo.local(): |
305 if not repo.local(): |
303 raise util.Abort(_("repository '%s' is not local") % path) |
306 raise util.Abort(_("repository '%s' is not local") % path) |
304 except hg.RepoError: |
307 except hg.RepoError: |
305 if cmd not in commands.optionalrepo.split(): |
308 if cmd not in commands.optionalrepo.split(): |
306 raise |
309 raise |