Show More
@@ -255,8 +255,11 b' def dispatch(ui, args):' | |||
|
255 | 255 | extensions.loadall(ui) |
|
256 | 256 | ui.addreadhook(extensions.loadall) |
|
257 | 257 | |
|
258 |
# read the local |
|
|
259 | path = earlygetopt(["-R", "--repository"], args) or localrepo.findrepo() or "" | |
|
258 | # read the local repository .hgrc into a local ui object | |
|
259 | # this will trigger its extensions to load | |
|
260 | path = earlygetopt(["-R", "--repository"], args) | |
|
261 | if not path: | |
|
262 | path = localrepo.findrepo() or "" | |
|
260 | 263 | if path: |
|
261 | 264 | try: |
|
262 | 265 | lui = commands.ui.ui(parentui=ui) |
@@ -298,7 +301,7 b' def dispatch(ui, args):' | |||
|
298 | 301 | repo = None |
|
299 | 302 | try: |
|
300 | 303 | repo = hg.repository(ui, path=path) |
|
301 |
|
|
|
304 | ui = repo.ui | |
|
302 | 305 | if not repo.local(): |
|
303 | 306 | raise util.Abort(_("repository '%s' is not local") % path) |
|
304 | 307 | except hg.RepoError: |
@@ -29,12 +29,7 b' class localrepository(repo.repository):' | |||
|
29 | 29 | self.transhandle = None |
|
30 | 30 | def __init__(self, parentui, path=None, create=0): |
|
31 | 31 | repo.repository.__init__(self) |
|
32 |
|
|
|
33 | path = findrepo() | |
|
34 | if not path: | |
|
35 | raise repo.RepoError(_("There is no Mercurial repository" | |
|
36 | " here (.hg not found)")) | |
|
37 | ||
|
32 | self.path = path | |
|
38 | 33 | self.root = os.path.realpath(path) |
|
39 | 34 | self.path = os.path.join(self.root, ".hg") |
|
40 | 35 | self.origroot = path |
General Comments 0
You need to be logged in to leave comments.
Login now