I've read that branching/tagging is one of the nice features of SVN (See Mark Phippard's blog and the subversion book). However, it took me a little while to figure out how to set up my directory structure with the recommended "trunk", "branches", and "tags" folders. These are my basic step-by-step notes for how I set up my Subclipse project and then created a branch. This assumes you've already installed Subclipse and set up a repository. If you have not done that, see How to install Subversion (SVN) with Eclipse on Windows.
Filesystem has no item svn: URL 'svn://localhost/myproject/trunk' non-existent in that revision Bad URL passed to RA layer svn: URL 'svn://localhost/myproject' non-existent in revision '234' mkdir -m "Initial import." svn://localhost/myproject mkdir -m "Initial import." svn://localhost/myproject/trunk checkout -N -r HEAD svn://localhost/myproject/trunk Checked out revision 236. add -N C:\path\to\myproject\.settings A C:/path/to/myproject/.settings add -N C:\path\to\myproject\.settings\org.eclipse.cdt.core.prefs A C:/path/to/myproject/.settings/org.eclipse.cdt.core.prefs add -N C:\path\to\myproject\.cdtbuild A C:/path/to/myproject/.cdtbuild add -N C:\path\to\myproject\.settings\org.eclipse.cdt.managedbuilder.core.prefs A C:/path/to/myproject/.settings/org.eclipse.cdt.managedbuilder.core.prefs add -N C:\path\to\myproject\.cdtproject A C:/path/to/myproject/.cdtproject add -N C:\path\to\myproject\.project A C:/path/to/myproject/.project commit -m "Initial import." C:/path/to/myproject/.cdtbuild C:/path/to/myproject/.cdtproject C:/path/to/myproject/.project C:/path/to/myproject/.settings C:/path/to/myproject/.settings/org.eclipse.cdt.core.prefs C:/path/to/myproject/.settings/org.eclipse.cdt.managedbuilder.core.prefs Adding path/to/myproject/.cdtbuild Adding path/to/myproject/.cdtproject Adding path/to/myproject/.project Adding path/to/myproject/.settings Adding path/to/myproject/.settings/org.eclipse.cdt.core.prefs Adding path/to/myproject/.settings/org.eclipse.cdt.managedbuilder.core.prefs Transmitting file data ... Committed revision 237.
mkdir -m "Created branches folder." svn://localhost/myproject/branches
copy -rHEAD svn://localhost/myproject/trunk svn://localhost/myproject/branches/mybranch
switch svn://localhost/myproject/branches/mybranch C:/path/to/myproject -rHEAD At revision 239.
Branching steps were taken from How to branch with Subclipse.
Cheers for this. I've been looking for a decent explanation of all this stuff for ages. I've now spent the last 2 hours setting up all my Eclipse projects with SVN, which is something I should have done years ago. Thanks again.
thanks you for this short but helpfully example. Canvin
This short article was really helpful. I was struggling quiet a while to incorporate branches for my project. Thanks again.
thanks , high quality tutorial
Excellent! Exactly what I needed, and couldn't find elsewhere.
really thanks. Struggled for 3-4 hrs but understand completely now due to this very helpful doc.Thanks again
Tks, very helpful tute on SVN branching in Eclipse, exactly what official eclipse manual is missing.
Anyway you can improve its ranking in Google?
Tung: Thanks for the link on your blog. That'll help the Google ranking. :)
Thanks Very Much !!! This tutorial was of great help.
A super howto. Thanks for posting this. In my case there was one added step needed as I have multiple repos under one directory and the only access to my repos is with apache webdav (I'm not running the svn deamon).
parentPath = /svn
repo1 = /svn/dave http://host/svn/dave
repo2 = /svn/sue http://host/svn/sue`
If I select one of the repos to share then the "Enter Folder Name" dialog ends up like this:
which doesn't exist as a valid repo.
So at that point I created a new repository location using "http://host/parentPath". Then I could add a repo name in that dialog and it will check out that repo. This parentPath repository won't work under eclipse subversion listing, but that's not needed anyway. The files check out fine and svn functions work fine.
Without your howto I would have had a much harder time figuring it all out.
Good really help full
Very useful post! Thanks
It was very helpful to me to setup trunk, branch and tag for the first time, Thank you! I found this guide very clear and concise.
Good explanation, thank you
Many thanks for this very useful post.Cheers for this.
Thank you very much, glad I found this.