Branch the trunk to start your work
Remember, this is not actually copying all the files in the repository, its mostly a database change, very little space consumed. This operation should be considered consuming almost no disk space, and you should feel free to make branches anytime. The alternative would be messed up merges, miscellaneously copied files and lost SVN commits which is unacceptable.
# svn copy -m "[Issue number] Branching to develop a fix for Issue number." http:/google/trunk http://google/branches/Issue number
Checkout your new branch
# svn co http://google/branches/Issue Number
Fix your bug
# cd Issue Number/
# svn status
# vi ..
# make
# cd source/
# svn status -q
Commit your changes to your branch
# svn commit -m "[Issue Number] Committing changes for review to my branch"
Adds/remove files and junk.
Transmitting file data ...........
Review
Damnit man, someone should check your code by easily checking out your branch.
Merging your branch back to the trunk
Change into your branch directory
# cd Issue Number/
Switch your branch to point to the trunk
# svn switch http://google/trunk
The only thing here should ONLY ONLY ONLY BE IS FILES BEING UPDATED. NOT ADDED.
Updated to revision 29242.
Find the r number from when the branch was created
# svn log --stop-on-copy http://google/branches/Issue Number
------------------------------------------------------------------------
r29130 | not this crap but bellow.
[TL-1788] Committing changes for review to my branch
------------------------------------------------------------------------
r29129 | stuff here.
[Issue Number] Branching to develop a fix for Issue number
------------------------------------------------------------------------
Find the r number of the trunk
# svn info
Path: .
URL: http://google/trunk
Repository Root: http://google/storage
Repository UUID: 0e262ef1-e203-0410-bf88-cba8cc7d4a2f
Revision: 29242
Node Kind: directory
Schedule: normal
Merge the branch to the trunk
# svn merge -r29129:29242 http://google/branches/Issue Number
Look at your changes, now merged into the trunk
# svn status -q
# cd source
Commit those changes, if no conflicts, to the trunk
# svn commit -m "[Issue Number] Checking in fix for blah... to trunk"
...
Transmitting file data ...........
Committed revision 28953.
Remove your old branch
# svn delete -m "[Issue Number] Removing development branch" http://google/branches/Issue Number
No comments:
Post a Comment