Solving long paths by hashing

Adrian Buehlmann adrian at cadifra.com
Sun Jun 29 07:18:52 CDT 2008


On 29.06.2008 14:00, Dirkjan Ochtman wrote:
> Adrian Buehlmann wrote:
>> Instead of writing a reverse mapping of encoded -> unencoded filenames
>> into a single file as Jesse's patch does (the "longnames" file), we could:
>>
>> Prepend a new prefix to the content of every name-hashed *.i file in the
>> store, consisting of
>>
>> a) a new revlog-header
>> b) followed by the unencoded filename
>> c) followed by some limiter
>>
>> and then followed by whatever *.i files currently contain (somewhat similar
>> to adding another layer to a protocol).
> 
> That seems overly complex, and a bit of a layer violation (storing the 
> filename, or something which was used to determine the filename, in the 
> file itself). I think I'd prefer a longnames file containing this info.

I don't think there's a layer violation.

Writing to a single longnames file needs write locking.

Plus it's inefficient and scales badly.

Needing to update the longnames file requires complex code and more
memory (caching).

You have to read the whole longnames file before you can start
streamcloning.


More information about the Mercurial-devel mailing list