Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Jun 11 21:09:24 2007 -0500 +++ b/mercurial/localrepo.py Mon Jun 11 21:09:24 2007 -0500 @@ -29,12 +29,7 @@ self.transhandle = None def __init__(self, parentui, path=None, create=0): repo.repository.__init__(self) - if not path: - path = findrepo() - if not path: - raise repo.RepoError(_("There is no Mercurial repository" - " here (.hg not found)")) - + self.path = path self.root = os.path.realpath(path) self.path = os.path.join(self.root, ".hg") self.origroot = path