[darcs-users] Forkin' universe

Tommy Pettersson ptp at lysator.liu.se
Sun Mar 13 20:10:10 UTC 2005

On Sun, Mar 13, 2005 at 07:26:14PM +0100, Luke Gorrie wrote:
>   Keep in sync by pulling from one another's repos and from the
>   pristine repos.

Here's where it goes (or after enough time will go) wrong.
The CVS feed will not sync with your darcs patches.

Take a bunch of common patches (C) that is the initial checkin
of the repo.  You will create a bunch of patches (Y1:C)
on top of C, and CVS will feed a bunch of patches (F1:C)
also on top of C.  Now Y1 and F1 are in parallel and might
therefor conflict, and you'll have to resolve the conflicts
with a bunch of patches (R1:F1-Y1-C).  Next round you will
create another bunch of patches (Y2:R1-F1-Y1-C) on top of all
the other patches, and CVS will feed another bunch of patches
(F2:F1-C) on top of *ALARM* F1 and C, since it hasn't (and
can't) pulled any of your patches and conflict resolutions.
Now F2 will be in parallel with Y2-R1-Y1 (notice Y1) and
will of cause create rather complicated conflicts.  Ok, so
you resolve them with R2 and go on: (Y3:R2-F2-Y2-R1-F1-Y1-C)
and (F3:F2-F1-C) will have F3 in parallel with Y3-R2-Y2-R1-Y1
(notice Y1!) and cause gravely complicated conflicts.

There's no end to this (other than darcs' time to merge
increases exponentially).  The changes from CVS must be
recorded on top of other patches (in serial, and not in
parallel with the entire history all way down to Y1).

It can be done manually by applying unidiffs in a darcs
working dir.  I think it could be done automatically with
some sort of three way diff between the CVS feed repo and
the "main" repo, that keeps track of the last sync points
(with tags) and merges the new differences in the two trees,
and records it as a new patch into the "main" repo.

Tommy Pettersson <ptp at lysator.liu.se>

More information about the darcs-users mailing list