[darcs-users] Re: Patch dependency question
catalin.marinas at arm.com
Wed Nov 3 14:06:15 UTC 2004
David Roundy <droundy at abridgegame.org> writes:
> Yes, in theory these two patches could be made to commute. However, note
> that this is a special case where both patches only add lines, and don't
> remove or modify any lines. If either P1 or P3 were to remove some lines
> as well, the question would be moot, since commutation would no longer be
I am aware of this.
> In practice, it's hard to see a need to add special commutation behavior
> for this situation. On the other hand, perhaps there are scenarios
> (e.g. makefiles) where addition of lines is common, and you *really* would
> like to avoid conflicts.
I was mainly referring to cherry-picking changes from one tree and
avoiding retrieving patches which are dependent based on this
situation (e.g. makefile patches).
> On the third hand, this particular commutation
> will never avoid a conflict, since there's no ways for two patches created
> in parallel to get into this situation.
Not for parallel patches but for successively applied patches to the
This is a hypothetical situation. Even with makefiles, adding a new
file to be built, for example, might mean extending an existing line
with that file name, which means modifying the line of an existing
patch and hence creating a dependency (character-oriented patches
would allow this).
Anyway, darcs' patch dependency tracking works much better than
generating diff's which do not allow any commuting. Unfortunately, I
cannot use it with the Linux kernel (that's what I mainly do) because
it is very slow (3 hours for a big patch merging) and uses a lot of
memory (over 600MB). I don't know if the current structure allows this
(and I don't know Haskell either, I should learning it) but patch
commuting and dependency tracking could probably be done by only
looking at the line numbers a hunk modifies, without loading the
hunks text into memory. The hunks text should be loaded from disk only
when applying them or when saving the commuted patch. This might
reduce the RAM usage.
Thanks for your reply.
More information about the darcs-users