[darcs-users] on-disk formats of patches

Ganesh Sittampalam ganesh at earth.li
Sun Oct 17 10:33:13 UTC 2010

On Sun, 17 Oct 2010, Eric Kow wrote:

> On Sat, Oct 16, 2010 at 14:47:43 +0100, Ganesh Sittampalam wrote:
>> Although in theory ComP could be nested, I've never seen this
>> happen.
> General plan seems sensible.
> I might be more comfortable with a stronger statement than "I've never
> seen this happen" :-), something along the lines of "in the source code,
> Darcs only ever uses the ComP constructor with non-ComP prims", or
> "darcs treats ComP [ComP foo bar] exactly as it might ComP [foo bar]"

I'm fairly sure it treats ComP [x] like x in general, otherwise we'd have 
seen some pretty weird bugs. However from a quick look at the code, I 
can't be absolutely certain of that,

> In any case, quite reassuring to see that at the very least, we now
> knom more about the on disk patch format.

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.


More information about the darcs-users mailing list