How to create a SVN branch ?

Reinhold Kainhofer reinhold at kainhofer.com
Thu Jul 21 11:37:13 CEST 2005


Am Donnerstag, 21. Juli 2005 11:14 schrieb Stephan Kulow:
> Am Donnerstag 21 Juli 2005 10:14 schrieb Tomas Mecir:
> > Hi folks,
> >
> > so, everyone keeps telling me that I need to commit my changes to a
> > branch, instead of simply keeping it home, then committing when things
> > are in compileable state ... And herein lies the problem ... I've
> > tried to read through the SVN handbook to find out how to create a
> > branch, only to find out that the branching concept is very
> > complicated, compared to cvs, where I had no problems.
> >
> > So - my question is:
> > assume that I have a local copy with some modifications in it, that
> > are not committed anywhere. How do I commit these into a branch,
> > without losing'em upon branch creation ?
>
> That depends a bit if you have some completly new code or if you branched
> of from some other project.

To me his descriptions sounds as if he wants to branch an existing project, 
but he has already local changes...

Well:
1) Create a diff of your local changed using "svn diff > ~/your.patch"

2) Branch the project/dir that you need (SoC branches are typically 
in /branches/work/soc-****, see http://websvn.kde.org)

> If you branch of from e.g. kspread, then do
> svn copy https://svn.kde.org/home/kde/trunk/koffice/kspread \
>    https://svn.kde.org/home/kde/branches/work/soc-mykspread 
> svn co https://svn.kde.org/home/kde/branches/work/soc-mykspread
> cd soc-mykspread

3) Now apply the patch "patch -p0 < ~/your.patch"

4) If you have completely new files, copy them to that checkout from branch 
and add them via svn add.

> <do your changes to it - including svn add>
> svn commit


Do you really only need the kspread dir, or will you also change something in 
the koffice libs? Either way, I think it would be simpler to branch all of 
koffice, since then you don't have to checkout the other dirs from trunk 
(you'll need the build system and the libs, and probably other parts to make 
kspread even compile), but can take everything from your branch.


Cheers, 
Reinhold
-- 
------------------------------------------------------------------
Reinhold Kainhofer, Vienna, Austria
email: reinhold at kainhofer.com, http://reinhold.kainhofer.com/
 * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at
 * K Desktop Environment, http://www.kde.org/, KOrganizer / KPilot maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-soc/attachments/20050721/18d041a4/attachment.pgp


More information about the Kde-soc mailing list