[darcs-users] apply a darcs patch to non-darcs tree

Isaac Dupree ml at isaac.cedarswampstudios.org
Thu Nov 4 11:12:08 UTC 2010


On 11/04/10 05:56, Christian Maeder wrote:
> Am 03.11.2010 14:04, schrieb Eric Kow:
>> On Wed, Nov 03, 2010 at 13:33:57 +0100, Christian Maeder wrote:
>>> how can I apply a darcs patch (with extension .dpatch) to a non-darcs
>>> source tree using plain (GNU) patch?
>>
>> If you have a copy of the darcs repository somewhere, you can apply it
>> via darcs, and then use darcs diff to generate a diff that you can then
>> apply to the non-darcs source tree.
>
> Thanks, for your answer. I don't know what made me think, it was
> possible. Maybe this fact should be more documented to avoid other
> people wasting time with GNU-patch on .dpatch files.

I naively hope that a .dpatch file contains as much (and more) 
information as a .patch file.  My naive hope is clearly (if Eric and 
Christian's implication is correct) wrong.  An explanation of why it 
can't work would be nice somewhere (e.g. of why one would think it might 
work, and where that reasoning goes wrong).  Of course, in any case you 
would sacrifice the nice "patching is always correct" semantics of 
darcs, but then that's what I'd expect from converting to .patch 
(unified diff format presumably).

(If it actually is possible, then maybe it's a feature-request -- that, 
of course, we might or might not want to implement, per the usual 
caution about adding features; it might make more sense as an external 
tool if anyone really wanted it).

-Isaac


More information about the darcs-users mailing list