[darcs-users] Idea: Free floating patches?

David Roundy droundy at abridgegame.org
Sat Nov 13 15:42:17 UTC 2004

On Fri, Nov 12, 2004 at 09:24:00AM +0100, Norbert Nemec wrote:
> Hi there,


> is there a possibility to create "free-floating" patches which could be
> simply transferred to anyone who can then just apply the patch to their
> repository?  The idea would be that the specially formatted patch file
> should contain information about all the patches it depends on. When the
> patch is then applied somewhere else and any of the depended-upon patches
> is missing in the target repo, darcs simply complains. Otherwise, it just
> applies the patch.
> The algorithm for creating such a free-floating patch file should of
> course try to commute it up in the tree as far as possible, so the result
> depends on as few patches as possible.

This could be done, but I'm not so sure it would be useful.  Finding the
minimal context would be a very slow process on large repositories, since
it's an O(n^2) process.  In addition, I'm not sure how often one would
really want a minimal context, and this also increases the probability that
you'd not include a patch that is needed by others.

I think a somewhat less lofty goal of adding a --to-tag option to send,
which would allow you to create a bundle of patches that can be applied to
a particular tagged version of the repositories.  Such a patch bundle would
often be smaller than the "minimal context" bundle, since the context would
be a single tag, rather than a whole list of patches, and would be a bit
easier to explain ("here's a patch to darcs 1.0.0").
David Roundy

More information about the darcs-users mailing list