On 13.08.2016 00:20, Ryan Schmidt wrote:
>> On Aug 12, 2016, at 3:00 PM, André Roy <an...@dsa-ltd.ca> wrote:
>>
>> Hi all,
>>
>> First time posting.
>>
>> -Create a repository (trunk/tags/branches), 
>> -Checkout /trunk, 
>> -Create branch1 in /branches/branch1, and checkout.
>> -Create and checkout branch2.   
>> -Create file.txt in Trunk + add + commit.  
>> -Merge trunk changes into branch1 and commit.  
>> -Merge trunk changes into branch2 and commit.  
>>
>> The problem: 
>> -Merge branch1 changes into branch2, gives me a Tree conflict with file.txt.
>>
>> Am I doing something wrong?
> Probably :)
>
> Show us the exact transcript of commands you used for the above?
>
> Review the merging chapter in the book?
>
> http://svnbook.red-bean.com/en/1.7/svn.branchmerge.html


It appears to be a bug in our merge algorithm, it doesn't notice from
mergeinfo that the file was already merged from the same source. See the
attached reproduction script and transcripts for 1.9.x and trunk: the
only difference is that the trunk merge resolver gives more options for
resolving the conflict (thank you, stsp!)


-- Brane

Attachment: repeat.sh
Description: Bourne shell script

$ ./repeat.sh
+ svnadmin create repo
+ svn mkdir -mtest file:///svntest/repo/trunk
Committing transaction...
Committed revision 1.
+ svn mkdir -mtest file:///svntest/repo/branches
Committing transaction...
Committed revision 2.
+ svn mkdir -mtest file:///svntest/repo/tags
Committing transaction...
Committed revision 3.
+ svn co file:///svntest/repo/trunk
Checked out revision 3.
+ svn cp -mtest file:///svntest/repo/trunk file:///svntest/repo/branches/branch1
Committing transaction...
Committed revision 4.
+ svn co file:///svntest/repo/branches/branch1
Checked out revision 4.
+ svn cp -mtest file:///svntest/repo/trunk file:///svntest/repo/branches/branch2
Committing transaction...
Committed revision 5.
+ svn co file:///svntest/repo/branches/branch2
Checked out revision 5.
+ touch trunk/file.txt
+ svn add trunk/file.txt
A         trunk/file.txt
+ svn ci -mtest trunk
Adding         trunk/file.txt
Transmitting file data .done
Committing transaction...
Committed revision 6.
+ cd branch1
+ svn up
Updating '.':
At revision 6.
+ svn merge '^/trunk' .
--- Merging r4 through r6 into '.':
A    file.txt
--- Recording mergeinfo for merge of r4 through r6 into '.':
 U   .
+ svn ci -mtest
Sending        .
Adding         file.txt
Committing transaction...
Committed revision 7.
+ cd ..
+ cd branch2
+ svn up
Updating '.':
At revision 7.
+ svn merge '^/trunk' .
--- Merging r5 through r7 into '.':
A    file.txt
--- Recording mergeinfo for merge of r5 through r7 into '.':
 U   .
+ svn ci -mtest
Sending        .
Adding         file.txt
Committing transaction...
Committed revision 8.
+ cd ..
+ cd branch2
+ svn up
Updating '.':
At revision 8.
+ svn merge '^/branches/branch1' .
--- Merging r4 through r8 into '.':
   C file.txt
 G   .
--- Recording mergeinfo for merge of r4 through r8 into '.':
 U   .
Summary of conflicts:
  Tree conflicts: 1
Tree conflict on 'file.txt'
   > local file obstruction, incoming file add upon merge
Select: (r) mark resolved, (p) postpone, (q) quit resolution, (h) help: p
Summary of conflicts:
  Tree conflicts: 1
+ svn ci -mtest
svn: E155015: Commit failed (details follow):
svn: E155015: Aborting commit: '/svntest/branch2/file.txt' remains in conflict

Attachment: transcript-trunk.sh
Description: Bourne shell script

Reply via email to