Branching from trunk

Branching from trunk

So you want to make some changes to an existing package that perhaps is maintained by someone else, or is maintained by you but is a major change (eg new set of features). Assuming you have the package descriptions checked out at ~/opencsw you can do the following.

cd ~/opencsw/$packagedir    # eg packagedir=rbgems/rake
svn info .

Now grab the $svnurl to use in the following:

svn copy $svnurl/trunk $svnurl/branches/$branchname -m "$packagedir: add branch $branchname for $somepurpose"
svn up --ignore-externals

Example:

svn copy https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/rbgems/rake/trunk https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/rbgems/rake/branches/rb18 -m "rbgems/rake: create branch for new package naming convention CSWrb18-rake"

testing9x:~/opencsw/rbgems/rake $ svn up --ignore-externals
A    branches/rb18
A    branches/rb18/files
A    branches/rb18/checksums
A    branches/rb18/Makefile
Updated to revision 15355.

Now you can cd into the branch and start hacking. To commit changes you can use mgar instead of svn, which has the benefit of prepending your commit message with the package path:

mgar commit -m "$commitmessage"

Eg if you put "switch name to CSWrb18-rake naming standard" as the commit message to mgar when committing in rbgems/rake/branches/rb18, it will come out in the wash as "rbgems/rake/branches/rb18: switch name to CSWrb18-rake naming standard".

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License