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

Re: Howto: Merge Branch Into Trunk

From: Ali Yakout <ali.yakout_at_gmail.com>
Date: Thu, 26 Jun 2008 11:43:17 +0300

Hi,

I'm using svn version 1.4.0 (r21228) and my Project structure looks like
DEMO_PROJECT
branches
ali
sally
tags
trunk

I do merge as follows, I checked out the project "demo_project", and create
a copy of the trunk to branch ali and branch sally.
I modify files under the 2 branches, and commit.
Now I try to merge,

ali_at_linux-yfg0:~/svn/demo_project/trunk> cat myfile.txt
Original file
ali_at_linux-yfg0:~/svn/demo_project/trunk> cd ../branches/ali
ali_at_linux-yfg0:~/svn/demo_project/branches/ali> vi myfile.txt
ali_at_linux-yfg0:~/svn/demo_project/branches/ali> cat myfile.txt
Original file
Added by Ali
ali_at_linux-yfg0:~/svn/demo_project/branches/ali> svn commit -m "Modified"
Sending ali/myfile.txt
Transmitting file data .
Committed revision 540.
ali_at_linux-yfg0:~/svn/demo_project/branches/ali> cd ../sally/
ali_at_linux-yfg0:~/svn/demo_project/branches/sally> vi myfile.txt
ali_at_linux-yfg0:~/svn/demo_project/branches/sally> svn commit -m "Modified"
Sending sally/myfile.txt
Transmitting file data .
Committed revision 541.
ali_at_linux-yfg0:~/svn/demo_project/branches/sally> svn log --stop-on-copy
------------------------------------------------------------------------
r539 | ealiyak | 2008-06-26 11:14:34 +0300 (Thu, 26 Jun 2008) | 1 line

------------------------------------------------------------------------
ali_at_linux-yfg0:~/svn/demo_project/branches/sally> cd ../../trunk/
ali_at_linux-yfg0:~/svn/demo_project/trunk> svn update
At revision 541.
ali_at_linux-yfg0:~/svn/demo_project/trunk> svn merge -r 539:541
svn+ssh://ealiyak@cas/usr/local/svn/cacrepos/demo_project/branches/sally
U myfile.txt
ali_at_linux-yfg0:~/svn/demo_project/trunk> svn commit -m "Commit Sally
changes"
Sending trunk/myfile.txt
Transmitting file data .
Committed revision 542.
ali_at_linux-yfg0:~/svn/demo_project/trunk> cd ../branches/ali/
ali_at_linux-yfg0:~/svn/demo_project/branches/ali> svn log --stop-on-copy
------------------------------------------------------------------------
r538 | ealiyak | 2008-06-26 11:13:57 +0300 (Thu, 26 Jun 2008) | 1 line

------------------------------------------------------------------------
ali_at_linux-yfg0:~/svn/demo_project/branches/ali> cd ../../trunk/
ali_at_linux-yfg0:~/svn/demo_project/trunk> svn update
At revision 542.
ali_at_linux-yfg0:~/svn/demo_project/trunk> svn merge -r 538:542
svn+ssh://ealiyak@cas/usr/local/svn/cacrepos/demo_project/branches/ali
C myfile.txt
ali_at_linux-yfg0:~/svn/demo_project/trunk> ls
myfile.txt myfile.txt.merge-left.r538 myfile.txt.merge-right.r542
myfile.txt.working
ali_at_linux-yfg0:~/svn/demo_project/trunk> more *
::::::::::::::
myfile.txt
::::::::::::::
<<<<<<< .working
Original file - Added by sally
=======
Original file
Added by Ali
>>>>>>> .merge-right.r542
::::::::::::::
myfile.txt.merge-left.r538
::::::::::::::
Original file
::::::::::::::
myfile.txt.merge-right.r542
::::::::::::::
Original file
Added by Ali
::::::::::::::
myfile.txt.working
::::::::::::::
Original file - Added by sally
ali_at_linux-yfg0:~/svn/demo_project/trunk>

I had a conflict in "C myfile.txt", instead I wanted to merge Ali and Sally
work!

How can I merge the changes made by Ali and Sally in their branches?

Thanks
Ali

On Wed, Jun 25, 2008 at 2:29 PM, Ryan Schmidt <
subversion-2008b_at_ryandesign.com> wrote:

>
> On Jun 25, 2008, at 06:21, Ali Yakout wrote:
>
> I'm using Smartsvn as my subversion client, I'm trying to merge my branch
>> to the trunk (I use Modify->Modify from URL), the merge succeeds but the
>> changes are not actually "merged" into the trunk, instead it is "replaced"
>> by the branch.
>>
>
> Then you gave the wrong arguments to the merge command.
>
> I tried also the command line merge as in <http://www.sepcot.com/blog/2007/04/SVN-Merge-Branch-Trunk>
>> tutorial but I got the same results.
>>
>> How can I do real merges?
>>
>
> Show us the actual command you used.
>
> Also, note that Subversion 1.5, now released, has much-improved merge
> support, with improved syntax as well. Let us know if you're using
> Subversion 1.5 or a different version so we can be sure to guide you to the
> right instructions.
>
>
Received on 2008-06-26 10:43:50 CEST

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

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