[PATCH 0 of 2 ] encodedir in C
Adrian Buehlmann
adrian at cadifra.com
Tue Sep 18 05:02:16 CDT 2012
Bryan created a C implementation of the store.encodedir function.
As a first step, I'd like to propose to use that and make it available as
a Python function.
The new repo format we've talked about may no longer have the paths inside
.hg/store/fncache direncoded, so it will no longer be needed to encodedir() and
decodedir() it when writing and reading it.
Also, the direncoding will probably be folded into a single C function as soon
as Bryan's C code for the filename encoding is included.
So these might be arguments against having encodedir in C.
But:
The encodedir / decodedir dance has to be done at the wire ends for stream-cloning
(since we don't change the wire-format).
It also needs to be done for repositories in the basic format (store.basicstore, config
option format.usestore=False), which still makes sense to be used on Linux.
So I think it makes sense to have that function in C and include Bryans work done
for that function (no matter what we do next).
More information about the Mercurial-devel
mailing list