diff --git a/mercurial/store.py b/mercurial/store.py --- a/mercurial/store.py +++ b/mercurial/store.py @@ -171,8 +171,9 @@ class basicstore: self.pathjoiner = pathjoiner self.path = path self.createmode = _calcmode(path) - self.opener = opener(self.path) - self.opener.createmode = self.createmode + op = opener(self.path) + op.createmode = self.createmode + self.opener = lambda f, *args, **kw: op(encodedir(f), *args, **kw) def join(self, f): return self.pathjoiner(self.path, encodedir(f)) diff --git a/tests/test-fncache b/tests/test-fncache --- a/tests/test-fncache +++ b/tests/test-fncache @@ -48,4 +48,23 @@ echo echo "% hg verify" hg verify +# try non store repo encoding +cd .. +echo % non store repo +hg --config format.usestore=False init foo +cd foo +mkdir tst.d +echo foo > tst.d/foo +hg ci -Amfoo +ls -R .hg + +cd .. +echo % non fncache repo +hg --config format.usefncache=False init bar +cd bar +mkdir tst.d +echo foo > tst.d/Foo +hg ci -Amfoo +ls -R .hg + exit 0 diff --git a/tests/test-fncache.out b/tests/test-fncache.out --- a/tests/test-fncache.out +++ b/tests/test-fncache.out @@ -41,3 +41,41 @@ checking files 3 files, 3 changesets, 3 total revisions 3 integrity errors encountered! (first damaged changeset appears to be 0) +% non store repo +adding tst.d/foo +.hg: +00changelog.i +00manifest.i +data +dirstate +requires +undo +undo.branch +undo.dirstate + +.hg/data: +tst.d.hg + +.hg/data/tst.d.hg: +foo.i +% non fncache repo +adding tst.d/Foo +.hg: +00changelog.i +dirstate +requires +store +undo.branch +undo.dirstate + +.hg/store: +00changelog.i +00manifest.i +data +undo + +.hg/store/data: +tst.d.hg + +.hg/store/data/tst.d.hg: +_foo.i