[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1075802 - in /subversion/trunk/subversion: libsvn_client/merge.c libsvn_wc/merge.c tests/cmdline/merge_tests.py

From: Daniel Becroft <djcbecroft_at_gmail.com>
Date: Wed, 9 Mar 2011 07:38:10 +1000

On Sat, Mar 5, 2011 at 8:27 AM, Daniel Becroft <djcbecroft_at_gmail.com> wrote:

> On Fri, Mar 4, 2011 at 11:35 PM, Arwin Arni <arwin_at_collab.net> wrote:
>
>> On Friday 04 March 2011 05:15 PM, Philip Martin wrote:
>>
>>> Arwin Arni<arwin_at_collab.net> writes:
>>>
>>> On Friday 04 March 2011 04:52 PM, Philip Martin wrote:
>>>>
>>>>> Arwin Arni<arwin_at_collab.net> writes:
>>>>>
>>>>> Post this fix, I noticed that **merge --dry-run** throws an
>>>>>> interactive conflict resolution dialog and create the merge-left and
>>>>>> merge-right files.
>>>>>>
>>>>>
>>>>> Does this apply to all files or just binary files?
>>>>>
>>>>> This applies only to binary files. For text files (dry-run), no
>>>> conflict resolution dialog, no left/right files..
>>>>
>>>
>>> So dry-run on a text-file conflict gives notification but no resolution
>>> and no wc mods?
>>>
>> Absolutely right.
>>
>> That sounds sensible, and I think binary files should
>>> do the same.
>>>
>>> Yes, I too think so. But post r1075802 this behaviour has changed and
>> none of the regression tests catch this because they don't do a
>> run_and_verify_merge with dry_run as TRUE in the "binary merge with
>> conflict" scenario.
>>
>
> Yep, my fault. Sorry.
>
> I've got a patch to fix up the binary merge to not raise the conflict
> notification. I'll add a test case for this as well

Hey guys,

I'm still working through some issues with my test case (and patch) for
this. For some reason, my reproduction script now works with the below
patch, but the test case does not (it creates the conflict files for both
text and binary). I'm almost 100% certain that it's something to do with how
I've written the test case, so I'll keep looking at it.

Cheers,
Daniel B.

Index: subversion/libsvn_wc/merge.c
===================================================================
--- subversion/libsvn_wc/merge.c (revision 1078960)
+++ subversion/libsvn_wc/merge.c (working copy)
@@ -1144,6 +1144,11 @@ merge_binary_file(svn_skel_t **work_items,
       *merge_outcome = svn_wc_merge_merged;
       return SVN_NO_ERROR;
     }
+ else if (dry_run)
+ {
+ *merge_outcome = svn_wc_merge_conflict;
+ return SVN_NO_ERROR;
+ }

   /* Give the conflict resolution callback a chance to clean
      up the conflict before we mark the file 'conflicted' */
Received on 2011-03-08 22:39:03 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.