[darcs-users] How to record only patches, not original files

Josef Svenningsson josef.svenningsson at gmail.com
Mon Jun 18 17:59:04 UTC 2007


On 6/18/07, Robin Bate Boerop <robin at shorestreet.com> wrote:
> On 18-Jun-07, at 8:02 AM, Josef Svenningsson wrote:
> >> To me, this is the same as making and distributing patches with
> >> "diff" and "patch".  Is it not?
> >>
> > No. The patches are still managed by darcs and they can be commuted
> > when applied to a repository. Suppose you have a developer who wants
> > to apply your patches to his repository but have made changes to it so
> > that it differs from the one you started out from. When he applies
> > your patches darcs will take care of the commutation and conflict
> > resolving for him instead of just getting an error from patch.
>
> That's true.  I was thinking instead of the effort required by me to
> distribute my patches.  Instead of just pushing patches to the repo
> whenever I like, I would have to use darcs send to create a patche,
> darcs apply to apply the patch to the repo, and then (if that works)
> I would have to make the patch available for download.  It is that
> kind of work that I want to avoid.  Further, doing it that way, I
> could not use darcs optimize to "bunch" patches together.
>
I'm not quite sure I follow. Why would you want to do 'darcs apply'
and to what repo? Is it just for safety measure, to make sure that the
patch bundle is OK?

Apart from that, yes there is a little bit of work involved for you as
a maintainer. You have to do 'darcs send' and make the resulting patch
bundle available for download. But if you write a little script it
should only be a single command. That seems feasible to me. In
particular it is the same amount of work as doing a 'darcs push' to a
public repo, which is, as I understand it, the method you first
contemplated.

It's true that you wouldn't be able to bunch the patches together into
a single patch with this method. But the only method I know which
accomplishes this is to create a partial repo and that would mean that
any user would have to download the whole code base, not just your
changes.  That seems contrary to the goals you mentioned earlier. So
while I agree with you that it would be nice to bunch patches together
I don't know of any way to do it.

> If I am misunderstanding your suggested method of distribution, let
> me know.
>
I was never very specific with how it was supposed to work so there
was not much to misunderstand.

Cheers,

Josef



More information about the darcs-users mailing list