darcs

Issue 1809 darcs convert makes no attempt to turn mergers into conflictors

Title darcs convert makes no attempt to turn mergers into conflictors
Priority bug Status resolved
Milestone 2.8.0 Resolved in 2.8.0
Superseder Nosy List Serware, darcs-devel, dmitry.kurochkin, ganesh, kowey
Assigned To
Topics Conflicts, Darcs2, Devel

Created on 2010-04-02.10:58:09 by ganesh, last changed 2010-10-31.18:07:53 by noreply.

Messages
msg10626 (view) Author: ganesh Date: 2010-04-02.10:58:09
In theory, darcs convert should try to convert mergers into conflictors. 
Although it won't be possible to do this faithfully for all mergers, it 
should at least make an attempt.

In this patch, code that does make an attempt was introduced:

Thu Mar  6 16:49:45 GMT 2008  David Roundy <droundy@darcs.net>
  * make convert less lossy (may address issue585, at least partially).

However, this patch seems to have accidentally disabled this:

Wed Mar 26 17:31:21 GMT 2008  David Roundy <droundy@darcs.net>
  * resolve issue744: have convert remove some useless mv patches.

The problem is that the patch introduces a call to modernize_patch, 
which unconditionally flattens out mergers, making the subsequent 
attempts at turning mergers into conflictors rather irrelevant.

Given that this behaviour has been present in all releases of darcs 2, I 
don't know if we should actually try to fix it, but it's at least worth 
having the history of the code documented.
msg10627 (view) Author: kowey Date: 2010-04-02.11:03:10
OK, so it looks like we should try to determine if introducing a less
lossy convert is a good use of our hacking time.

Seems like it may be nice to have some conservative attempts, eg. for
simple one-layer mergers.  Then darcs convert could say
"congratulations! No lossy conversions needed for this repo".

Perhaps we could start the discussion on darcs-users when the time is right.
msg10628 (view) Author: ganesh Date: 2010-04-02.11:05:52
BTW the code fix should be easy. The issue will be figuring out if it 
causes any problems for the converted repos. We have no test cases for 
actual conversions at all :-(
msg12730 (view) Author: ganesh Date: 2010-10-16.23:12:11
After playing with this a bit with a few test repos, I am now reasonably 
confident that it's ok to put the old behaviour back. I've submitted 
patch420.
msg12856 (view) Author: noreply Date: 2010-10-31.18:07:52
The following patch sent by Ganesh Sittampalam <ganesh@earth.li> updated issue issue1809 with
status=resolved;resolvedin=2.8.0 HEAD

* resolve issue1809: don't call modernizePatch during conversion 
Ignore-this: 884eedd93a6718c791494c995eedcc03

The call to modernizePatch was introduced to fix issue744, but:
(a) It seems to have been ineffective as it's only called for
patches where isMerger is true, so none of the patch transformations
can kick in.
(b) It had the apparently unwanted side-effect of completely disabling
any attempts to convert mergers into conflictors.

This patch reverts that, and adds some test material for the
'darcs convert' command.
History
Date User Action Args
2010-04-02 10:58:09ganeshcreate
2010-04-02 11:03:12koweysetpriority: bug
topic: + Conflicts, Darcs2, Devel
messages: + msg10627
nosy: + kowey, Serware
2010-04-02 11:05:54ganeshsetmessages: + msg10628
2010-10-16 23:12:12ganeshsetstatus: needs-reproduction -> has-patch
messages: + msg12730
milestone: 2.8.0
2010-10-31 18:07:53noreplysetstatus: has-patch -> resolved
messages: + msg12856
resolvedin: 2.8.0