[darcs-users] on-disk formats of patches

Ganesh Sittampalam ganesh at earth.li
Thu Oct 21 22:21:34 UTC 2010


On Sun, 17 Oct 2010, Ganesh Sittampalam wrote:

> It turns out on further testing (luckily triggered by some tests I added for 
> something different!) that we do actually need the "write singleton without 
> braces" behaviour to maintain compatibility with patch bundle hashes :-( So 
> I'm going to preserve that for V1 patches but declare that future patch types 
> will use braces consistently. Grmph. I could in principle special-case the 
> hashing code, but I'd rather not.

So it also turns out that there are repositories with nested ComP, and 
since we need to be able to round-trip the patches with their braces so we 
can check patch bundle hashes, I ended up having to make an intermediate 
structure just for that purpose. [You can't just hash the text you read 
in, as that includes hunk patches with lines of context, but those aren't 
part of the text that is actually hashed!]

So the end result is that our reading and writing behaviour will be 
exactly as it was before. It's all in patch421.

Along the way, I've written a few backwards compatibility tests. We need 
more.

Ganesh


More information about the darcs-users mailing list