darcs

Issue 2036 pull => failed to commute common patches (2.5)

Title pull => failed to commute common patches (2.5)
Priority bug Status duplicate
Milestone Resolved in
Superseder Nosy List kowey
Assigned To
Topics

Created on 2011-01-20.16:30:55 by kowey, last changed 2016-03-13.21:51:20 by bfrk.

Files
File name Uploaded Type Edit Remove
account2field.dpatch simon, 2011-06-03.00:15:50 application/octet-stream
issue2036-unstable-context kowey, 2011-01-20.16:35:09 text/plain
Messages
msg13537 (view) Author: kowey Date: 2011-01-20.16:30:54
I was trying to review patch530 when I ran into this problem.  I wonder 
if the use of ask-deps is related.

I think the basic recipe is (see file2257)

darcs get http://darcs.net/screened --lazy --context ignoring-
applytoworking-return-value-is-safe.dpatch
cd screened
darcs apply ../applytoworking-return-value-is-safe.dpatch
cd ..
darcs get http://darcs.net unstable --lazy
cd unstable
darcs pull -a ../screened -p "Ignoring applyToWorking return value is 
safe"
darcs pull -a ../screened -p "Remove redundant Packs and NoPacks"

The result of this is
darcs: bug at src/Darcs/Patch/Depends.hs:208 compiled Jan  5 2011 
17:44:09
Failed to commute common patches:
Tue Jan 18 09:36:54 GMT 2011  Gabriel Kerneis <kerneis@pps.jussieu.fr>
  * Ignoring applyToWorking return value is safe
  
  See issue1988.
Fri Jan 14 15:44:49 GMT 2011  Florent Becker <florent.becker@ens-
lyon.org>
  * add a --no-record option to rollback
Tue Nov 23 07:42:43 GMT 2010  Ganesh Sittampalam <ganesh@earth.li>
  * abstract Prim behind a class
Sun Nov 21 17:01:27 GMT 2010  Ganesh Sittampalam <ganesh@earth.li>
  * resolve more conflicts with issue332 patch
See http://wiki.darcs.net/BugTracker/Reporting for help on bug 
reporting.

What we need now is to turn this into some kind of minimal test case. 

Note that darcs-2.4 reports this as a bug in get_extra (so we're making 
UI progress at least!)
msg13538 (view) Author: kowey Date: 2011-01-20.16:35:09
Here's a context file for unstable so we can reproduce this more easily 
in the future.
Attachments
msg13545 (view) Author: kerneis Date: 2011-01-20.17:03:19
But the following works:

darcs get http://darcs.net/screened --lazy --context
issue2036-unstable-context
darcs  get http://darcs.net unstable --lazy
cd unstable
darcs pull -a ../screened
# 92 patches to pull, do you really want them all?
cd ../screened
darcs apply ./applytoworking-return-value-is-safe.dpatch
cd ../unstable
darcs pull -a

No idea what this means.

Also note that I can reproduce the bug even if I re-record the patch
without ask-deps, so it has nothing to do with it.
msg13548 (view) Author: kerneis Date: 2011-01-20.17:16:17
Even stranger, if you follow exactly the same procedure, but pull the
patches in reverse order, it works too:

darcs get http://darcs.net/screened --lazy --context ignoring-
applytoworking-return-value-is-safe.dpatch
cd screened
darcs apply ../applytoworking-return-value-is-safe.dpatch
cd ..
darcs get http://darcs.net unstable --lazy
cd unstable
darcs pull -a ../screened -p "Remove redundant Packs and NoPacks"
darcs pull -a ../screened -p "Ignoring applyToWorking return value is safe"
msg13596 (view) Author: kowey Date: 2011-01-27.13:31:56
Applying the patches in the reverse order does seem to work.  We still 
need to debug this, but at least we aren't blocked on applying patch530
msg14481 (view) Author: simon Date: 2011-06-03.00:15:11
I have another example of this, if needed - a patch just recorded against 
the hledger repo (with darcs 2.4.4) triggers this error when applied (with 
all darcs versions).
msg19080 (view) Author: bfrk Date: 2016-03-13.21:51:18
At its core this is most probably a duplicate of issue1327 which is
about the broken darcs patch theory. In short: whether a commute of
three or more patches succeeds or fails may depend on the order in which
we try it.
History
Date User Action Args
2011-01-20 16:30:55koweycreate
2011-01-20 16:35:12koweysetfiles: + issue2036-unstable-context
messages: + msg13538
2011-01-20 17:03:20kerneissetmessages: + msg13545
2011-01-20 17:16:17kerneissetmessages: + msg13548
2011-01-27 13:31:57koweysetmessages: + msg13596
2011-06-03 00:15:12simonsetmessages: + msg14481
2011-06-03 00:15:50simonsetfiles: + account2field.dpatch
2016-03-13 21:51:20bfrksetstatus: needs-reproduction -> duplicate
messages: + msg19080