svn merge from the release branch to the trunk

Let’s say we develop in trunk (main branch).We decide to make a 0.24 branch for the release:

svn mkdir svn://hostname/repo/myproject/braches -m"create branch folder"
svn mkdir svn://hostname/repo/myproject/braches -m"create 0.24 branch"
svn copy svn://hostname/repo/myproject/trunk svn://hostname/repo/myproject/branches/0.24/

Now we make a fix in the branch, commit the fix and merge that back to the trunk:

cd branch/0.24

We need to get the revision at which the branch 0.24 was created:

svn log --stop-on-copy
------------------------------------------------------------------------
r22929 | bawi | 2008-03-10 22:52:20 +0100 (Mon, 10 Mar 2008) | 1 line
copy for branch 0.24
————————————————————————

We switch back to the trunk:

svn switch svn://hostname/repo/myproject/trunk

You can make sure that you are not in the trunk by:

svn info
[...]
Path: .
URL: svn://hostname/repo/myproject/trunk
[...]

We merge all the changes from the moment of creating the branch (revision 22929) to latest revision (HEAD) from the branch to the trunk (we are now in the trunk):

svn merge -r 22929:HEAD svn://hostname/repo/myproject/branches/0.24
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s