Managing branches in SVN
-
Requirements and Dependencies
- svnmerge.py - a python script that helps you keep your branches in synch with the trunk. The script and full documentation are available at http://www.orcaware.com/svn/wiki/Svnmerge.py
- define a bash variable of the svn path ($TIS_SVN_URL in this case)
-
Creating the branch
- stop your development server
- commit any outstanding changes to the trunk
- copy the trunk to a branch
svn copy $TIS_SVN_URL/trunk $TIS_SVN_URL/branches/branch-name
- switch over to that branch
svn switch $TIS_SVN_URL/branches/branch-name
- initialize the branch
svnmerge.py init
- commit:
svn commit -F svnmerge-commit-message.txt
-
Working with the branch
- stop your development server
- occasionally perform svnmerge.py merge to keep in sync with the trunk
-
Merging branch back into the trunk
- stop your development server
- with a clean branch switch over to the trunk:
svn switch $TIS_SVN_URL/trunk
- check properties on trunk for any merge stuff:
svn proplist -v .
- Initialize the merge tracking support on the trunk, related to the given branch, using:
svnmerge.py init $TIS_SVN_URL/branches/alpha02-dashboard
- commit:
svn commit -F svnmerge-commit-message.txt
- update
- merge:
svnmerge.py merge --bidirectional -S $TIS_SVN_URL/branches/alpha02-dashboard > merge_log.txt
- check merge log for any conflicts
- resolve any conflicts
- rake test
- commit:
svn commit -F svnmerge-commit-message.txt
- svnmerge.py uninit -S $TIS_SVN_URL/branches/alpha02-dashboard
- commit:
svn commit -F svnmerge-commit-message.txt
- svn rm -m ‘removing branch’ $TIS_SVN_URL/branches/alpha02-dashboard
Trackbacks
Trackbacks are closed.