My question is, when merging in accordance with the procedure below, the last step of the procedure “folding branches back into the trunk” is the right way to do this in a best practice scenario?
I have been using svn for many years. In my personal projects, I always happily run along the trunk without second thoughts, and version control in a single-linear linear mode has long been close to perfection. Simple and efficient. Everything was bliss, until the day when I wanted to have more control over third-party libraries.
Today I am in a project that I feel has outgrown an approach based on hacking with a direct move. I have multiple third-party libraries, some of which change weekly, and I really need more control over what happens. I need the ability to view specific changesets between a version of a third-party lib version and track changes that I made for specific libraries. I saw several times when the code base was very confused and it was difficult to return to working condition with an inexperienced builder, I can not afford to make mistakes more often here.
So, I looked at the fork of the vendor, read several articles here and there. I have a great book, Version Control with Subversion, but the examples I see sometimes contradict each other in their approach, and I would like to have a sense of branching. I was going to follow the approach given in this post by Evan Weaver .
I outlined the procedure below, my concern is in the last section, “Folding a branch into the trunk”. It seems that the buildmasters I worked with in the past usually “merged” the change branches on the trunk, and I don't think the branches are even deleted. Is this the right approach?
Create a branch
1 - Pay attention to the current version of the chapter:
svn info svn://server.com/svn/repository/trunk | grep Revision
2 - . -. your_branch, HEAD_REVISION , 1..
svn cp svn://server.com/svn/repository/trunk \
svn://server.com/svn/repository/branches/your_branch \
-m "Branching from trunk to your_branch at HEAD_REVISION"
3 - , ( ):
svn switch --relocate \
svn:
svn:
4 - , _branch, ok:
svn info | grep URL
svn up
5 - .
_branch, , your_branch.
1 - - .
2. Subversion, , ( , ). :
svn log --limit 500 | grep -B 3 your_branch
3 - :
svn info svn://server.com/svn/repository/trunk | grep Revision
4 - your_branch, LAST_MERGED_REVISION , 2 HEAD_REVISION, , 3:
svn merge -r LAST_MERGED_REVISION:HEAD_REVISION \
svn://server.com/svn/repository/trunk .
5.a - . ? , ? , . , svn revert -R
5.b - 5.a , , :
svn status | egrep '^C|^.C'
6 - , COMMAND 4.:
svn ci -m "Merged changes from trunk to your_branch: COMMAND"
, . .
1 - ( " " ), your_branch .
2 - :
svn del svn://server.com/svn/repository/trunk
3 - your_branch :
svn mv svn://server.com/svn/repository/branches/your_branch \
svn://server.com/svn/repository/trunk
4 - :
svn switch --relocate \
svn://server.com/svn/repository/branches/your_branch \
svn://server.com/svn/repository/trunk
!
, , .