Subversion in-place import

I am in the process of investigating SubVersion - with a view to moving source control away from VSS.

Something I've been struggling with for a while, is how to add a tree to SubVersion, and make the added folder a working copy.

This is possibly something that wouldn't need to be done that often once using a complete subversion work flow for all development - but as the moment as I am adding projects individually from my web root, I'm wanting to do this quite a bit.

In the end, I imported the tree into SubVersion, deleted it from the file system, and then checked out the tree to the same location.

I thought I must be missing something completely obvious - but after speaking to other users, it seems that in place importing really is not possible :(

I did find this work around suggested on the official SubVersion FAQ: subversion.tigris.org/faq.html#in-place-import, which basically involves the following:

  • Manually create empty folder in repositry
  • Checkout the empty folder to the file system folder at the root of the tree you wish to add
  • Add the subfolders / files etc. to SubVersion
  • Commit the root folder
This does seem a rather long winded work around for a relatively common task to me...

What does everyone else do???

Comments
Stephen Moretti's Gravatar I really should update my blog entry about getting set up with SVN....

What you should do, as you're an eclipse user, if you haven't already, install subclipse.
Right click on your project in eclipse. In the menu you'll see a menu option "Team". Under this menu item there is share project. Select this. You'll get a pop-up with 2 options; CVS and SVN. Selecting SVN will give you a list of the repositories you've previously added or allow you to create a new repository. Select the appropriate repository, select "Use Specified Folder Name", so that you can browse to the correct trunk/tag/Branch folder in your repository, then hit finish and away it goes....

Hope that helps! Oh and thanks for the Scotch banner ;)
# Posted By Stephen Moretti | 07/03/07 09:30
Danlance's Gravatar Thanks Stephen.
I'm already using Subclipse - but so far I'd only opened a project that had already been added to SVN. I hadn't realised that subclipse did the adding to SVN as well. That's much easier :)

You're welcome with the banner - I'll be coming to Scotch - and to the Pre-Scotch training, with 2 of my colleagues - looking forward to it ;)
# Posted By Danlance | 08/03/07 12:24
BlogCFC was created by Raymond Camden. This blog is running version 5.5.1, hosted by TalkWebSolutions.