Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 4555:1843d31bfdbf
localrepo: don't search from path
All current callers already pass in the repo root.
This normalizes things a bit. Now all repo types take a direct path to
repo root and only the command line interface (or the dispatcher)
searches from the current directory.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 11 Jun 2007 21:09:24 -0500 |
parents | 3f4555babe74 |
children | 30bc57094bfc |
comparison
equal
deleted
inserted
replaced
4554:9dbabb9d466c | 4555:1843d31bfdbf |
---|---|
27 | 27 |
28 def __del__(self): | 28 def __del__(self): |
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 if not path: | 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 |
41 self.opener = util.opener(self.path) | 36 self.opener = util.opener(self.path) |
42 self.wopener = util.opener(self.root) | 37 self.wopener = util.opener(self.root) |