Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 4170:7b5723c95a82
Save an absolute path in repo.path
This should keep things working if the process changes directories
after creating a repo object.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 10 Mar 2007 22:03:20 -0300 |
parents | bbfe5a3fc80c |
children | f9bbcebcacea ba51a8225a60 8e947b0e53cc |
comparison
equal
deleted
inserted
replaced
4169:0182cb2e4aac | 4170:7b5723c95a82 |
---|---|
31 if p == oldp: | 31 if p == oldp: |
32 raise repo.RepoError(_("There is no Mercurial repository" | 32 raise repo.RepoError(_("There is no Mercurial repository" |
33 " here (.hg not found)")) | 33 " here (.hg not found)")) |
34 path = p | 34 path = p |
35 | 35 |
36 self.path = os.path.join(path, ".hg") | |
37 self.root = os.path.realpath(path) | 36 self.root = os.path.realpath(path) |
37 self.path = os.path.join(self.root, ".hg") | |
38 self.origroot = path | 38 self.origroot = path |
39 self.opener = util.opener(self.path) | 39 self.opener = util.opener(self.path) |
40 self.wopener = util.opener(self.root) | 40 self.wopener = util.opener(self.root) |
41 | 41 |
42 if not os.path.isdir(self.path): | 42 if not os.path.isdir(self.path): |