Show More
@@ -255,8 +255,11 b' def dispatch(ui, args):' | |||||
255 | extensions.loadall(ui) |
|
255 | extensions.loadall(ui) | |
256 | ui.addreadhook(extensions.loadall) |
|
256 | ui.addreadhook(extensions.loadall) | |
257 |
|
257 | |||
258 |
# read the local |
|
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) | |
@@ -298,7 +301,7 b' def dispatch(ui, args):' | |||||
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 |
|
|
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: |
@@ -29,12 +29,7 b' class localrepository(repo.repository):' | |||||
29 | self.transhandle = None |
|
29 | self.transhandle = None | |
30 | def __init__(self, parentui, path=None, create=0): |
|
30 | def __init__(self, parentui, path=None, create=0): | |
31 | repo.repository.__init__(self) |
|
31 | repo.repository.__init__(self) | |
32 |
|
|
32 | self.path = path | |
33 | path = findrepo() |
|
|||
34 | if not path: |
|
|||
35 | raise repo.RepoError(_("There is no Mercurial repository" |
|
|||
36 | " here (.hg not found)")) |
|
|||
37 |
|
||||
38 | self.root = os.path.realpath(path) |
|
33 | self.root = os.path.realpath(path) | |
39 | self.path = os.path.join(self.root, ".hg") |
|
34 | self.path = os.path.join(self.root, ".hg") | |
40 | self.origroot = path |
|
35 | self.origroot = path |
General Comments 0
You need to be logged in to leave comments.
Login now