[darcs-devel] [issue1327] Failed to commute common patches

Ben Franksen bugs at darcs.net
Tue May 24 21:53:17 UTC 2016


Ben Franksen <ben.franksen at online.de> added the comment:

There might be another way to fix this bug. We could try to restore
consistency of failure by introducing a "relaxed" form of commutation,
where we drop the condition that modifications to a file depend on the
change that adds the file. If we take care to perform these "relaxed"
commutations only if we previously (e.g. during patch selection) proved
that the finally resulting permutation is reachable via a sequence of
"strict" commutations, then this should be safe (in the sense that the
resulting patch sequence can actually be applied to a tree).

It could be that such a change would be less invasive then the
previously proposed one (i.e. to drop all assumptions of consistency of
failure in the code). The main caveat is that I am not sure whether
"duplicate add-file plus modify-file" is the only scenario where
consistency of failure breaks down. For other cases the solution
indicated above might not work (without changing the patch format).
Also, I have no idea yet how to actually implement this effectively (the
naive copy-paste-modify method would, I fear, involve enormous amounts
of code duplication). If anyone has a good idea... (Ganesh?)

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1327>
__________________________________


More information about the darcs-devel mailing list