Hi all,
Apologies if this is already known, but had fallen out of my head.
I realised last night that if primitive patches don't have names, then
dependencies of named patches /cannot/ behave as I would expect when
duplicate changes are involved.
An example demonstrating this with actual darcs1 repos (also works with
darcs2 repos) is here:
http://urchin.earth.li/~ian/identical_patches.txt
but the rest of this e-mail explains the problem.
The details of what is inside a conflictor is irrelevant, so I'll just
write [X,Ys] for the patch representing X, that has effect Ys.
To start off with, we record a patch A in one repo, and B in another
repo. A and B are the same primitive patch, but part of two different
named patches. We also record a patch C that depends on A. So we have
three repos:
A
B
AC
Now merge A and B:
A[B,A^]
AC
and merge those two repos:
A[B,A^][C,]
Now, this must commute to
AC[B,C^A^]
and we can then unpull the B conflictor to get AC.
But going back to
A[B,A^][C,]
this must also commute to
B[A,B^][C,]
But if A and B are not named, and represent the same primitive patches,
then [B,A^] and [A,B^] look identical to the C conflictor! So this must
commute to
BC[A,C^B^]
and again we can unpull to get BC. But in the land of named patches, C
is supposed to depend on A!
So my conclusion is that we must either have this counter-intuitive
behaviour, or we must name primitive patches.
Have I missed anything?
Thanks
Ian
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users