Mercurial > hg-stable
changeset 8633:c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 26 May 2009 23:49:53 +0200 |
parents | 9e055cfdd620 |
children | 7659eecd9da2 |
files | mercurial/store.py tests/test-fncache tests/test-fncache.out |
diffstat | 3 files changed, 60 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/store.py Tue May 26 22:59:52 2009 +0200 +++ b/mercurial/store.py Tue May 26 23:49:53 2009 +0200 @@ -171,8 +171,9 @@ 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))
--- a/tests/test-fncache Tue May 26 22:59:52 2009 +0200 +++ b/tests/test-fncache Tue May 26 23:49:53 2009 +0200 @@ -48,4 +48,23 @@ 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
--- a/tests/test-fncache.out Tue May 26 22:59:52 2009 +0200 +++ b/tests/test-fncache.out Tue May 26 23:49:53 2009 +0200 @@ -41,3 +41,41 @@ 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