Mercurial > public > mercurial-scm > hg-stable
diff mercurial/statichttprepo.py @ 3853:c0b449154a90
switch to the .hg/store layout, fix the tests
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Fri, 01 Dec 2006 13:34:09 +0100 |
parents | 8f18e31c4441 |
children | 8c24b6fd5866 |
line wrap: on
line diff
--- a/mercurial/statichttprepo.py Sun Dec 10 00:07:02 2006 +0100 +++ b/mercurial/statichttprepo.py Fri Dec 01 13:34:09 2006 +0100 @@ -32,10 +32,10 @@ class statichttprepository(localrepo.localrepository): def __init__(self, ui, path): self._url = path - self.path = (path + "/.hg") - self.spath = self.path self.ui = ui self.revlogversion = 0 + + self.path = (path + "/.hg") self.opener = opener(self.path) # find requirements try: @@ -48,8 +48,15 @@ raise repo.RepoError(_("requirement '%s' not supported") % r) # setup store - self.spath = self.path - self.sopener = opener(self.spath) + if "store" in requirements: + self.encodefn = util.encodefilename + self.decodefn = util.decodefilename + self.spath = self.path + "/store" + else: + self.encodefn = lambda x: x + self.decodefn = lambda x: x + self.spath = self.path + self.sopener = util.encodedopener(opener(self.spath), self.encodefn) self.manifest = manifest.manifest(self.sopener) self.changelog = changelog.changelog(self.sopener)