[darcs-devel] [issue2432] pull --reorder does not commute reordered patches

noreply bugs at darcs.net
Wed Mar 4 00:13:04 UTC 2015


noreply <noreply at darcs.net> added the comment:

The following patch sent by Ganesh Sittampalam <ganesh at earth.li> updated issue issue2432 with
status=resolved;resolvedin=2.10.0 HEAD

* resolve issue2432: use the merged version of the local patches 
Ignore-this: 3c2a8e1cc4d6c8b8040f683e6f2a3dc0

The previous code gave a false sense of security in its use of witnesses
on the Repository type, because those can be implicitly mutated by
operations on the repository but the Repository value with its old
witnesses is still available for use.

The bug was that tentativelyReplacePatches should be passed the replacement
patches, as it just adds them to the repository at the end after commuting
out the previous versions. So when doing pull/apply --reorder, we need
to pass in the local patches merged with the remote patches, rather than
in their original form.

I reworked the code so that the witnesses are correct, which provokes
a type error, and fixed the error by changing merge2FL to return both the
merged remote patches and the merged local patches so the latter can be
passed in to tentativelyReplacePatches.

----------
resolvedin:  -> 2.10.0 HEAD
status: needs-diagnosis/design -> resolved

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


More information about the darcs-devel mailing list