The answer to your problem is that C doesn *not* depend on A, since you never told it that it depends on A. It depends, rather, on the primitive change which is present in either A or B. If you want the dependency to be on A itself, you need to make this explicit. I would call this a feature, rather than a bug, except that we don't use it consistently. It's definitely more consistent in darcs-2 semantics than in darcs-1 semantics, since in darcs-2 A and B don't conflict.
David On Tue, Aug 12, 2008 at 6:20 AM, Ian Lynagh <[EMAIL PROTECTED]> wrote: > > 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
