Mercurial > public > mercurial-scm > hg
diff mercurial/localrepo.py @ 3791:8643b9f90b51
introduce localrepo.spath for the store path, sopener fixes
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 05 Dec 2006 11:28:23 +0100 |
parents | f183c18568df |
children | bd7011246fab |
line wrap: on
line diff
--- a/mercurial/localrepo.py Tue Dec 05 11:28:21 2006 +0100 +++ b/mercurial/localrepo.py Tue Dec 05 11:28:23 2006 +0100 @@ -31,12 +31,15 @@ " here (.hg not found)")) path = p self.path = os.path.join(path, ".hg") + self.spath = self.path if not os.path.isdir(self.path): if create: if not os.path.exists(path): os.mkdir(path) os.mkdir(self.path) + if self.spath != self.path: + os.mkdir(self.spath) else: raise repo.RepoError(_("repository %s not found") % path) elif create: @@ -46,7 +49,7 @@ self.origroot = path self.ui = ui.ui(parentui=parentui) self.opener = util.opener(self.path) - self.sopener = util.opener(self.path) + self.sopener = util.opener(self.spath) self.wopener = util.opener(self.root) try: @@ -395,7 +398,7 @@ return os.path.join(self.path, f) def sjoin(self, f): - return os.path.join(self.path, f) + return os.path.join(self.spath, f) def wjoin(self, f): return os.path.join(self.root, f)