darcs

Issue 1043 pull => mergeAfterConflicting failed in geteff (2.0.2+)

Title pull => mergeAfterConflicting failed in geteff (2.0.2+)
Priority bug Status resolved
Milestone 2.0.x Resolved in
Superseder Nosy List Serware, darcs-devel, dmitry.kurochkin, galbolle, kowey, thorkilnaur, twb
Assigned To
Topics Conflicts, Darcs2, IncludesExampleOrTest

Created on 2008-08-29.16:56:31 by galbolle, last changed 2010-06-15.21:20:35 by admin.

Files
File name Uploaded Type Edit Remove
darcs-ix-rix galbolle, 2008-08-30.07:47:07 application/text
Messages
msg5798 (view) Author: galbolle Date: 2008-08-29.16:56:23
I have a repository at http://code.haskell.org/~galbolle/darcs2-bug/darcs-doc/
which tracks http://darcs.net with some (quite a lot of) conflicts.

I resolved these conflicts and recorded the resolutions, but when I try to pull
>Wed Aug 27 12:58:43 CEST 2008  Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
>  * Refactor get_matcher and apply_inv_to_matcher functions from Darcs.Match
>module.
i get the following error:
darcs: mergeAfterConflicting failed in geteff

then a huge where ix is, which i attach.
msg5806 (view) Author: kowey Date: 2008-08-30.07:26:15
Hi, I think you may have forgotten the attachment :-)
msg5809 (view) Author: galbolle Date: 2008-08-30.07:49:18
The attached repository has recorded conflict markers, but they are not the
cause of the bug: unpulling the whole «resoliving conflicts» sequence and
re-recording it the right way hit the same bug.
msg5813 (view) Author: kowey Date: 2008-08-30.09:55:35
Here is a nice reproducible darcs 2 bug.

Steps: get http://code.haskell.org/~galbolle/darcs2-bug/darcs-doc/ and pull
http://darcs.net (2 patches) and boom!

Florent, would you be interested in trying to boil this down to a minimal test
case, along the lines of those in bugs/ ?
msg6143 (view) Author: dagit Date: 2008-09-26.15:47:36
The trouble code is here:

src/Darcs/Patch/Real.lhs

geteff :: [Non RealPatch C(x)] -> FL Prim C(x y) -> ([Non RealPatch C(x)], FL
RealPatch C(x y))
geteff _ NilFL = ([],NilFL)
geteff ix (x:>:xs) | Just ix' <- mapM (remP (Normal x)) ix
                               = --traceDoc (greenText "I got rid of x" $$
showPatch x) $
                                 case geteff ix' xs of
                                 (ns,xs') -> (non (Normal x) : map (addP (Normal
x)) ns,
                                              Normal x :>: xs')
geteff ix xx = case mergeConflictingNons ix of
               Nothing -> errorDoc $ redText "mergeConflictingNons failed in
geteff with ix" $$
                          showNons ix $$ redText "xx" $$ showPatch xx
               Just rix -> case mergeAfterConflicting rix xx of
                           Just (a,x) -> (map (addPs (reverseFL a)) $ toNons x,
                                          a +>+ x)
                           Nothing -> errorDoc $ redText "mergeAfterConflicting
failed in geteff"$$
                                      redText "where ix" $$ showNons ix $$
                                      redText "and xx" $$ showPatch xx $$
                                      redText "and rix" $$ showPatch rix
msg6702 (view) Author: droundy Date: 2008-11-20.00:04:12
The following patch updated the status of issue1043 to be resolved:

* resolve issue1043: avoid use of sort_coalesceFL in Patch.Real. 
Ignore-this: 79003144c8571ef746108e09192cb4ed
The trouble was that sort_coalesceFL does the "coalescing" which isn't
governed by strict rules.  This might have been fixed by changing
sort_coalesceFL to also run canonize, but the cleaner solution is to
simply acknowledge that what I really wanted was just to join together
pairs of inverses, which is much easier than the problem
sort_coalesceFL is trying to solve.
History
Date User Action Args
2008-08-29 16:56:31galbollecreate
2008-08-30 07:26:24koweysetstatus: unread -> waiting-for
nosy: kowey, dagit, Serware, galbolle
messages: + msg5806
assignedto: galbolle
2008-08-30 07:47:15galbollesetfiles: + darcs-ix-rix
nosy: kowey, dagit, Serware, galbolle
2008-08-30 07:49:26galbollesetnosy: kowey, dagit, Serware, galbolle
messages: + msg5809
2008-08-30 09:55:42koweysetstatus: waiting-for -> unknown
assignedto: galbolle ->
messages: + msg5813
nosy: + droundy
title: darcs2 cannot apply conflicting patch -> pull => mergeAfterConflicting failed in geteff (2.0.2+)
2008-09-26 15:47:44dagitsetnosy: + simon
messages: + msg6143
2008-10-23 15:38:57koweysettopic: + Target-2.0
nosy: + dmitry.kurochkin, thorkilnaur
2008-11-04 10:04:11twbsetnosy: + twb
2008-11-20 00:04:15droundysetstatus: unknown -> resolved-in-unstable
nosy: droundy, kowey, dagit, simon, twb, thorkilnaur, dmitry.kurochkin, Serware, galbolle
messages: + msg6702
2009-04-22 03:33:40twbsetstatus: resolved-in-unstable -> resolved
nosy: droundy, kowey, dagit, simon, twb, thorkilnaur, dmitry.kurochkin, Serware, galbolle
2009-08-06 17:59:56adminsetnosy: + markstos, jast, darcs-devel, zooko, mornfall, tommy, beschmi, - droundy, twb, galbolle
2009-08-06 21:12:06adminsetnosy: - beschmi
2009-08-10 21:47:57adminsetnosy: + galbolle, twb, - tommy, markstos, darcs-devel, zooko, jast, mornfall
2009-08-10 23:44:17adminsetnosy: - dagit
2009-08-25 17:25:44adminsetnosy: + darcs-devel, - simon
2009-08-27 14:18:59adminsetnosy: kowey, darcs-devel, twb, thorkilnaur, dmitry.kurochkin, Serware, galbolle
2009-10-23 22:44:35adminsetnosy: + serware, - Serware
2009-10-23 23:30:18adminsetnosy: + Serware, - serware
2010-06-15 21:20:32adminsetmilestone: 2.0.x
2010-06-15 21:20:35adminsettopic: - Target-2.0