[darcs-users] Patch dependency question
catalin.marinas at arm.com
Mon Nov 1 17:21:29 UTC 2004
I understand how darcs determines the patch dependencies but there are
some cases which I do not find being consistent.
Let's say that the P1 patch adds 2 lines at the end of a file. The file
P2 adds another line at the end of the file:
P1 and P2 can easily commute and so one can only pull P2 to his branch.
If P2 really depends on P2, one can probably set a manual dependency.
Now, if P3 adds a line which splits P1's hunk, the file becomes:
Darcs thinks that P3 is dependent on P1. There are cases where this is
not the case (i.e. adding a new definition in a C header file, sorted
alphabetically or by other criteria). One can say that 'ddd' is an
addition to P1 but the same can be said about 'ccc' added by P3.
I think darcs should allow P1 and P3 commuting. At the moment, darcs can
only commute two patches applied to the same file if the hunks as a
whole can commute. In this case, the commuted P1' patch would have two
separate hunks, aaa and bbb.
There should be two types of dependencies - (1) a weak dependency, as
described above, and the user could choose whether to pull the other
patches and (2) a strong dependency where a patch removes/modifies lines
from an existing patch.
Does this sound correct or I'm missing something?
More information about the darcs-users