[darcs-devel] Activation Patches

Jason Dagit dagit at codersbase.com
Wed Jun 6 11:51:24 PDT 2007


On 6/4/07, Ganesh Sittampalam <ganesh at earth.li> wrote:
> On Wed, 30 May 2007, Jason Dagit wrote:
>
> > As you may know, I'm part of an effort to improve conflict handling in
> > darcs.  We have come up with a plan that allows users to cancel and
> > activate patches (more on this later).  Implementing activation
> > patches is the first step in this direction.
>
> As they stand, activation patches don't seem very different from merges,
> conflictors and the like.

I never understood mergers and conflictors so I can't really comment here.

> But I guess cancel patches will answer this
> objection. Will the eventual structure be a graph or a tree?

Yes :)  Actually, I don't think a graph is needed, just a tree.

The pristine cache will be a single sequence, but the repository state
can be thought of as having branches.  For there to be no conflicts
the unwanted branches must be canceled.  Otherwise the repository is
in a conflicted state.

> > 2)  An activation patch is its own inverse.  Since the activation
> > patch does not modify the repository state, it should be clear that
> > the patch is its own inverse.
>
> I'm not convinced by this, or the later justification that it's the
> simplest of many possible inverses.
>
> An activation patch doesn't commute with the patch it activates, but does
> commute with all other patches. Does this include the inverse of the patch
> it activates?
>
> For example, A_A_ seems to be a valid patch sequence. Presumably I can
> invert it; if _A_^ = _A_, this is _A_A^. Now if _A_ commutes with every
> other patch than A, I can make this into A^_A_ (perhaps with some changes
> to _A_).  Take inverses again and I've got _A_A, and so I've commuted it
> past A.

I haven't thought about inverting sequences of patches.  Does this
derive from a patchwise invert?  It is a bit worrisome that we could
commute the activation past the activated patch.

> > Suppose we have patches, A, B, C, D and E which all commute with each
> > other.  Then suppose we have this sequence of patches:
> > (_A_BCD)E
>
> If B,C and D commute with A, how did we get this activation patch in the
> first place? You say above that this notation means that B,C and D don't
> commute with A.

Sorry, I misstated that bit of hypothesis.  But, you can infer from
the worked example that A did not commute with B, C or D but E does
commute with all the patches (including A).

It looks like we're going to try Ian's way of storing the activation
patches for now.  It looks like the implementation for that is a
subset of the current implementation of activation patches.  So that's
nice because if we change our mind later we're just adding a bit more
but not really forced to throw anything away.

Thanks,
Jason


More information about the darcs-devel mailing list