I'm ccing darcs-users on this, since it seems like others might be
interested in listening on our discussion of conflictors...
David
On Sun, May 04, 2008 at 11:39:58PM +0100, Ian Lynagh wrote:
> On Thu, May 01, 2008 at 07:24:30AM -0700, David Roundy wrote:
> > On Thu, May 01, 2008 at 02:32:08PM +0100, Ian Lynagh wrote:
> > >
> > > If we have the repo
> > > PS C
> > > where
> > > C = Conflictor QS ES M
> > > (I'm ignoring contexts here) then
> > >
> > > * This is the patch M
> > > * Its effect is ES^
> > >
> > > * E \in ES <=> E \in PS
> > > E is not conflicted in PS
> > > M conflict*s with E
> > > * Q \in QS <=> Q \in PS
> > > Q is conflicted in PS
> > > Either
> > > M conflict*s with Q
> > > or
> > > There is a P \in PS such that
> > > P conflict*s with M
> > > and
> > > P conflict*s with Q
> >
> > Yes, that sounds right
>
> I could be having a dopey moment, but is there a reason that we need to
> keep all of the last class of patches in the conflictor? i.e. those that
> we transitively conflict with?
The problem is that if you remove the secondary conflicts, it becomes very
hard to write the commute, and it also becomes impossible to understand a
conflict just by looking at a single (or pair of?) conflictor.
e.g. consider patches A, B and C where A conflicts with B and A conflicts
with C. Merging all three, we'd get something like
A [{} A | B] [{AB} | C]
if we didn't mention B in the third conflictor, it would look like
A [{} A | B] [{A} | C]
so when we examine [{A} | C] we know that there is a third patch involved
in the conflict, but we don't know what that patch is.
It gets more complicated if we involve more patches in the conflict.
e.g. now let's add D which behaves like C and D (conflicting only with A),
then we get
A [{} A | B] [{A} | C] [{A} | D]
which doesn't look much worse, although now we've got two patches "C" and
"D", which now don't include the information that we've actually got four
patches involved in the conflict.
But now let's start commuting patches a bit...
B [{} B | A] [{A} | C] [{A} | D]
B C [{} BC | A] [{A} | D]
Hmmmm... that does look like at least in trivial cases this would work.
The trouble is that it removes the possibility of doing consistency checks
to ensure that the effect of a patch is correct, since there's no purely
local way to determine whether a patch should be [{A} | B] or [{} A | B].
It's also distinctly possible that this would fail in one or more of the
difficult cases, and I can't work out difficult cases in my head.
--
David Roundy
Department of Physics
Oregon State University
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users