[darcs-users] darcs patch: resolve issue1111: patchset_intersection used wrong selection for partitionRL

Tommy Pettersson ptp at lysator.liu.se
Sat Oct 4 13:10:31 UTC 2008


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.


-- 
Tommy Pettersson <ptp at lysator.liu.se>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resolve-issue1111_-patchset_intersection-used-wrong-selection-for-partitionrl.dpatch
Type: text/x-darcs-patch
Size: 1405 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20081004/dc125fe3/attachment.bin 


More information about the darcs-users mailing list