On Sat, 15 Jul 2006, David Roundy wrote:

On Sat, Jul 15, 2006 at 10:52:44AM +0100, Ganesh Sittampalam wrote:
Resolutions are starting to look more and more like inverse patches to me.
Why can't they just be inverse patches, and not kill off the resolved
patch? Given that we want resolutions to commute like AA^ (etc), why
not just make AA^ commute how we want and use that directly?

Mostly because we already tried that and failed. That's the idea behind conflictors.

With conflictors we wanted a one-one mapping between the original patches and the conflictors, in the sense that if you pulled B into a repo with just A in it, you'd end up with a repo with just two patches, whether or not A and B conflicted.

That was why they caused such problems, because ever more complicated scenarios led to ever more complicated conflictors to keep track of the necessary patches to be inverted at each stage in the sequence, together with enough information to guarantee that we could work out what should change if they were commuted.

With this approach, and following your earlier idea (just mentioned on IRC I think) of just magicing resolutions into being as needed, we can magic as many inverses into being as we need, whenever we need them. So if a pull creates a new live conflict, we add all the inverses needed for these live conflicts immediately. Mark these inverses as "provisional" somehow, so they don't get pulled elsewhere and so that they effectively form a record of what is in conflict in this repository. We can keep all the patches in the repository in a sequence, with no need for branches. Once the user decides on a resolution, some of the inverses will become "concrete" and placed in the resolution patch.

I haven't properly considered any difficult scenarios, so I'll try to do that next. But somehow this view "feels" right to me.

Another way of looking at the difference with conflictors is that conflictors tried to codify conflicts in a form that could be correctly pulled elsewhere. Now that we've given up that idea, we just have to recalculate conflicts locally each time, and things are much simpler. The fundamental idea of introduces inverses into the patch sequence was sound, it's just that we were trying to do too much with them.

Cheers,

Ganesh

_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel

Reply via email to