[darcs-users] [patch156] replace slurpies with hashed-storage

Ganesh Sittampalam bugs at darcs.net
Wed Mar 24 22:14:22 UTC 2010


Ganesh Sittampalam <ganesh at earth.li> added the comment:

Status update: I need to look at the latest round of updates properly.

We also need to deal with the issue of the hashed filenames in pristine, 
which Petr raised on the mailing list some weeks back. In the past, 
darcs has varied between using "size-hash" and "hash", the most recent 
choice being size-hash which means that almost all existing repositories 
will use that. With the advent of hashed-storage, there's no need for 
the size-hash format, and the ambiguity leads to there not being any 
unique hash for directories. Hashed-storage also doesn't write size-hash 
format, in the interests of code simplicity.

The problem with directories not having unique hashes is that diff 
becomes less efficient, because it can't detect unchanged directories as 
often. So ideally we'd migrate all repos to completely use hash.

Obviously this will involve some pain. The situation will be worst for 
people using different versions of darcs (pre-2.5 and 2.5) on the same 
repo via direct filesystem access - e.g. NFS mounts etc. I believe this 
is a rare but not unknown situation.

As I understand it the current submission eagerly switches to hash 
format when any write is made to pristine and a size-hash file is found. 
It does this in a relatively inefficient but simple way, just writing 
out the whole of pristine again. A smarter implementation that renames 
files as needed would be possible.

Whether we use a more efficient conversion or not, I believe we should 
at least print out a warning to the user explaining why things are slow. 

The alternative to automatically converting on every write is to just 
print out a warning recommending that the user run darcs optimize --
pristine.

Petr, please correct me if any of this is wrong.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch156>
__________________________________


More information about the darcs-users mailing list