[darcs-users] darcs patch: resolve issue1111: patchset_intersection used wrong selection for partitionRL
droundy at darcs.net
Sat Oct 4 14:34:44 UTC 2008
On Sat, Oct 04, 2008 at 03:10:31PM +0200, Tommy Pettersson wrote:
> On Sat, Oct 04, 2008 at 08:19:53AM -0400, David Roundy wrote:
> > On Sat, Oct 04, 2008 at 02:01:28PM +0200, Tommy Pettersson wrote:
> > > hunk ./src/Darcs/Patch/Depends.lhs 483
> > > case mapRL info a `intersect` mapRL info b of
> > > morecommon ->
> > > case partitionRL (\e -> info e `elem` morecommon) a of
> > > - commonps :> _ -> seal $ commonps :<: common
> > > + _ :> commonps -> seal $ commonps :<: common
> > Ah, this change isn't quite right (and would have been caught by the type
> > witnesses on push). The problem is that partitionRL returns two ordered
> > sequences of patches, and the right-hand one is after the left-hand one, so
> > you can't sequence it with common as you do. The correct fix (apparently)
> > is to change `elem` to `notElem` to reverse the meaning of the two outputs
> > (but retain them in the proper order).
> I know there was something I didn't get with these colon-arrows,
> but now I think I understand. The `elem` partitioning commuted
> them the wrong way, so they were in the wrong context, and
> couldn't be appended to the preceding patch set.
> > Tommy, I'll let you make this change, so you get the credit,
> > since you're the one who tracked this down.
> Thanks! Attached.
More information about the darcs-users