[darcs-users] Darcs in kernel-like development model

Magnus Henoch mange at freemail.hu
Sun Feb 10 07:51:45 UTC 2008


John Goerzen <jgoerzen at complete.org> writes:

> Now, how would we accomplish this in Darcs?  As far as I know, Darcs
> has no equivolent of rebase.  While it does have amend-record and
> similar unrecord types of features, it does not have a way to
> arbitrarily merge two patches back in the history -- at least not a
> convenient way.  And as far as I can see, there's no equivolent of
> rebase.

It seems to me that writing "darcs rebase" shouldn't be very hard.

U  = sequence of patches in upstream at time of branching
U' = sequence of patches added to upstream after U
V  = sequence of patches in topic branch (based on U)

Let V' = V || U'  [merge]
If the result contains merger patches or other undesirable things, let
the user edit the patch by hand.
Record it.

If you care about the consumers of your tree not getting their copies
tangled, omit the "edit by hand" step and do the resolution with an
extra patch.  That would conflict with upstream's desire for clean
patches, though.

(As usual, the difference between theory and practice is that in theory
there is no difference.  I haven't tried to do this myself…)

Magnus



More information about the darcs-users mailing list