Peter's Gekko

Sponsors

The Lounge

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Getting started with subversion

Good tools are half the job. Being a one person shop I believed VSS was good enough for my source control needs. Almost everybody says Subversion is a far better alternative. The main advantage mentioned is (beside stability and all that) the different and better way subversion handles multiple users working on the same file. As a one person shop that's not that important. The main downside mentioned is a somewhat steep learning curve. But recently, after another frustrating struggle with VSS, I had enough and spent my energy on an exploration of Subversion.

It was a delight. The learning curve is by far not as steep as I feared. Besides that the documentation included is quite good. My only problem was to find a good starting point. I found this in TortoiseSVN, which presents itself as just a client but does contain everything I need. The help files tell all you want to know about Subversion and more. Here I'll just summarize the things you need for a jumpstart.

TortoiseSVN presents itself as a shell extension. So it is available in all explorer windows. Subversions stores the sources (or any other file) of a project in a repository. A repository is a folder in the file system. The procedure to create a repository and a working copy is different than VSS, there is no such thing as "Add to source control". You have to create and fill the repository first and create a new working copy after that. These are the steps:

  • Install TortoiseSVN
  • Create a folder to store your repositories. After setting up a repository you will not work with this folder yourself. All interaction runs through the TortoiseSVN shell extensions
  • Setup a template folder. This folder describes the structure of new repositories. Recommended is the trunk/branches/tag tree you meet everywhere in subversion docs.
  • Create new empty folder for the project.
  • Right click it and pick create repository here in the TortoiseSVN context menu. This will fail when the folder is not empty.
  • Select the template folder and pick Import in the TortoiseSVN context menu. You will be asked for a repository. Select the repository folder for the project you just created.
  • Select the folder of the project you want to add to the repository. Again pick Import from the context menu. Select the repository and pick the trunk folder.
  • Create a new empty working folder for the project.
  • In the context menu pick SVN checkout and select the repository. TortoiseSVN will warn when the folder is not empty.

And now source control is fully integrated in the windows explorer, including all dialogs. An update from or a commit to the repository are just a context click away. TortoiseSVN presents the status of the folder in icon overlays.

You don't want all files to be under control. Because they muddle up your repository, but also because they spoil the visible status. Just building the project would turn the icon of the root folder red. TortoiseSVN has loads off ways to describe excluded files. I'm still wrestling somewhat with the list. So far I've come up with

*.dll* *.pdb *.CACHE  _ReSharper.* *resharper* Iesi.Collections.xml Castle.DynamicProxy.xml log4net.xml NHibernate.xml

But there will be a better way without any doubt. There is also a Visual Studio add-in for SVN, the only Subversion commercial product I know of. (Yes, also subversion is an open source project) But I haven't looked at that yet.

I have only talked about this client tool. For the moment this does fulfill all my needs. I can reach repositories over the network using a file url like  file://HARAHARA/Users/Peter/SubversionRepositories/Gekko\Website/trunk (mind the (back-)slashes). In case I need more, there is whole load of subversion servers available for any platform.

That's about it. Another great tool added to my box.


Posted Thu, May 22 2008 10:41 AM by pvanooijen

[Advertisement]

Comments

Pages tagged "learning" wrote Pages tagged "learning"
on Thu, May 22 2008 5:18 AM

Pingback from  Pages tagged "learning"

Jeremy wrote re: Getting started with subversion
on Thu, May 22 2008 7:01 AM

Some other useful wilcards for svn:ignore properties on folders:

*.suo

*.FileList.txt

*.FileListAbsolute.txt

Thumbs.db

build.force

By the way, have you noticed yet that Tortoise adds a "Subversion" tab to the regular Windows Explorer folder properties dialog? This is very useful as it lets you add all your ignore properties to the root folder, and apply them recursively down the tree.

Gabriel Lozano-Moran wrote re: Getting started with subversion
on Thu, May 22 2008 7:08 AM

Try AnkhSVN and to be more specific one of the pre-release versions of one of the nightly builds of version 2.0.

ankhsvn.open.collab.net/.../ProjectDocumentList

karl wrote re: Getting started with subversion
on Thu, May 22 2008 8:52 AM

Here's my ignore list:

log bin obj Logs *.user *.suo Thumbs.db *.Publish.xml _ReSharper* *.resharper globals_user.php *.sqlite.db db/schema.db tmp *.class *.iws out

pvanooijen wrote re: Getting started with subversion
on Thu, May 22 2008 9:02 AM

Thanks everybody for your ignore lists.

@Jeremy: Yes I did notice that one. And that's quite a powerfull tab. The nice thing about tortoise that it's UI adapts so wonderfully well to what's (not) possible. Very, very intuitive

Darrell Mozingo wrote re: Getting started with subversion
on Thu, May 22 2008 9:16 AM

You should definitely give VisualSVN a shot. Integrates seamlessly with Visual Studio and the price isn't too bad. They make a one-click (or close to it) SVN server install package too, which has worked quite well for me in the past.

Rafael Rosa wrote re: Getting started with subversion
on Thu, May 22 2008 10:38 AM

Hi.

SVN is great, but if your changing tools I would recomend you to take a look at Git. It's quite new, but seems to be the replacement tools for SVN, and is gaining momentum. It was designed by Linus Torvalds and is used to manage the Linux kernel, Ruby on Rails and many others.

Besides that, it's easy to integrate it with SVN repositories, and there's a new tool to use it under Windows, called MSys on Git. Needless to say, it's all open source :)

Official site: http://git.or.cz/

MSys on Git : code.google.com/.../msysgit

Best regards,

Rafael.

Kyle Baley wrote re: Getting started with subversion
on Thu, May 22 2008 3:17 PM

AnkhSVN wasn't ready for primetime when I first looked at it a year ago. VisualSVN is priced at the right side of the "how much billable time is this product going to save me?" equation.

ADO.NET programming wrote re: Getting started with subversion
on Thu, May 22 2008 4:15 PM

" Being a one person shop ". So am I. Been using SourceGear Vault ( free for one person). At least the standalone GUI is like VSS (not using it integrated) and SQL Server/webservice based = I can access it from anywhere. Actually I did try Subversion, but as you say, steep earning curve if you're from the VSS world.

pvanooijen wrote re: Getting started with subversion
on Fri, May 23 2008 6:17 AM

As stated in the post I found the learning curve not that steep at all. The help files of tortoise are very very good.

When it comes to functionality subvesrion far better fits than VSS

Arjan`s World » LINKBLOG for May 23, 2008 wrote Arjan`s World » LINKBLOG for May 23, 2008
on Fri, May 23 2008 4:23 PM

Pingback from  Arjan`s World    » LINKBLOG for May 23, 2008

Luciano Evaristo Guerche (Gorše) wrote re: Getting started with subversion
on Mon, May 26 2008 3:57 PM

I would recommend you:

1) VisualSVN

www.visualsvn.com/download.html

2) VisualSVN Server

www.visualsvn.com/server

3) Git (from Linus Torvalds)

en.wikipedia.org/.../Git_(software)

http://git.or.cz/

4) Bazaar (from Canonical Ltd., the maker of Ubuntu)

http://bazaar-vcs.org/

--

Luciano Evaristo Guerche (Gorše)

Taboão da Serra, SP, Brazil

Peter's Gekko wrote VisualSVN and TortoiseSVN
on Mon, Jun 30 2008 10:06 AM

Almost holiday time, time to tidy up all work. Recently I moved to Tortoise SVN for all my source control

Community Blogs wrote VisualSVN and TortoiseSVN
on Mon, Jun 30 2008 10:28 AM

Almost holiday time, time to tidy up all work. Recently I moved to Tortoise SVN for all my source control

7 Open Source Version Control Systems Reviewed | Developer's Toolbox | Smashing Magazine wrote 7 Open Source Version Control Systems Reviewed | Developer's Toolbox | Smashing Magazine
on Thu, Sep 18 2008 1:42 PM

Pingback from  7 Open Source Version Control Systems Reviewed | Developer's Toolbox | Smashing Magazine

7 Open Source Version Control Systems Reviewed | Free Wordpress Templates (Themes) wrote 7 Open Source Version Control Systems Reviewed | Free Wordpress Templates (Themes)
on Thu, Sep 18 2008 10:42 PM

Pingback from  7 Open Source Version Control Systems Reviewed | Free Wordpress Templates (Themes)

7 Open Source Version Control Systems Reviewed | "IT" - I LIKE "IT" ! wrote 7 Open Source Version Control Systems Reviewed | "IT" - I LIKE "IT" !
on Fri, Sep 19 2008 12:02 AM

Pingback from  7 Open Source Version Control Systems Reviewed | "IT" - I LIKE "IT" !

7 Open Source Version Control Systems Reviewed wrote 7 Open Source Version Control Systems Reviewed
on Fri, Sep 19 2008 2:26 AM

Pingback from  7 Open Source Version Control Systems Reviewed

7 Open Source Version Control Systems Reviewed | POLPDESIGN wrote 7 Open Source Version Control Systems Reviewed | POLPDESIGN
on Fri, Sep 19 2008 2:38 AM

Pingback from  7 Open Source Version Control Systems Reviewed | POLPDESIGN

7 Open Source Version Control Systems Reviewed | rowebdesign wrote 7 Open Source Version Control Systems Reviewed | rowebdesign
on Fri, Sep 19 2008 5:17 AM

Pingback from  7 Open Source Version Control Systems Reviewed | rowebdesign

Tom Brander wrote re: Getting started with subversion
on Fri, Sep 19 2008 10:22 AM

Great article, I'd like to extend the question a bit however. I'm at a very basic level but building my new development environment. As a lone wolf developer with MySQL, and using BRIT, a sub project of eclipse and I have no version control experience... I've barely got my hands around eclipse. And I intend to use it for most languages, Java, Python etc..(currently in a windows environment.) I also have a collection of SQL scripts that I can see getting out of control rapidly.

Friends have recommended SVN but I'm very wary of how to start, and how to integrate it into my environment (Eclipse, MYSQL, etc.) And is it what I ought to do? Advice??? Remember very basic here!!!

Version Control? « Life and Musings wrote Version Control? « Life and Musings
on Fri, Sep 19 2008 10:57 AM

Pingback from  Version Control? « Life and Musings

7 Open Source Version Control Systems Reviewed | The Creative Children wrote 7 Open Source Version Control Systems Reviewed | The Creative Children
on Fri, Sep 19 2008 6:16 PM

Pingback from  7 Open Source Version Control Systems Reviewed | The Creative Children

7 Open Source Version Control Systems Reviewed | rafdesign wrote 7 Open Source Version Control Systems Reviewed | rafdesign
on Sat, Sep 20 2008 7:07 AM

Pingback from  7 Open Source Version Control Systems Reviewed | rafdesign

7 Open Source Version Control Systems Reviewed | rafdesign wrote 7 Open Source Version Control Systems Reviewed | rafdesign
on Sat, Sep 20 2008 7:25 AM

Pingback from  7 Open Source Version Control Systems Reviewed | rafdesign

Os 6 melhores controle vers??es OpenSource « Ederson Melo wrote Os 6 melhores controle vers??es OpenSource « Ederson Melo
on Mon, Sep 22 2008 8:35 AM

Pingback from  Os 6 melhores controle vers??es OpenSource « Ederson Melo

Vieno wrote Vieno
on Tue, Sep 23 2008 4:01 AM

Pingback from  Vieno

7 Version Control Systems Reviewed | Proba wrote 7 Version Control Systems Reviewed | Proba
on Wed, Sep 24 2008 11:57 PM

Pingback from  7 Version Control Systems Reviewed | Proba

7 Version Control Systems Reviewed | rafdesign wrote 7 Version Control Systems Reviewed | rafdesign
on Thu, Sep 25 2008 8:01 PM

Pingback from  7 Version Control Systems Reviewed | rafdesign

Popular Open Source Version Control systems | Mind Tree wrote Popular Open Source Version Control systems | Mind Tree
on Fri, Sep 26 2008 8:31 AM

Pingback from  Popular Open Source Version Control systems | Mind Tree

Antilogic Media - Design, Technology, SEO, Online Marketing and more…:: Antilogic Media wrote Antilogic Media - Design, Technology, SEO, Online Marketing and more…:: Antilogic Media
on Fri, Sep 26 2008 2:23 PM

Pingback from  Antilogic Media - Design, Technology, SEO, Online Marketing and more…:: Antilogic Media

Technoboria » 7 Version Control Systems Reviewed wrote Technoboria » 7 Version Control Systems Reviewed
on Wed, Oct 8 2008 6:22 PM

Pingback from  Technoboria   » 7 Version Control Systems Reviewed

Top open-source version control systems « The Brook Song - ?????????????????? ????????? wrote Top open-source version control systems « The Brook Song - ?????????????????? ?????????
on Tue, Oct 14 2008 1:41 AM

Pingback from  Top open-source version control systems « The Brook Song - ?????????????????? ?????????

7 Open Source Version Control Systems Reviewed | MY LIBRARY wrote 7 Open Source Version Control Systems Reviewed | MY LIBRARY
on Thu, Dec 11 2008 3:50 AM

Pingback from  7 Open Source Version Control Systems Reviewed | MY LIBRARY

Oswaldo Bernardes wrote re: Getting started with subversion
on Tue, Apr 28 2009 9:10 AM

I've tried to install the windows version 1.6.1  several times unsucessfully with the message that "the  download didn't seem to be a  valid MSI package and that I would better contact the vendor about".

Unfortunately the oficial site of TortoiseSVN dont't give me any chance of doing that.

Any suggestion?

Tks for any information

Tom Brander wrote re: Getting started with subversion
on Tue, Apr 28 2009 3:03 PM

I think you may be missing out if you don't get on Mercurial.

Like you I am a sole dev but working more in the open source community and the only real question is whether it is moving to Git or Mercurial.

Mercurial is much more accessible to mere mortals, will soon be supported in Google code has a TortiseHG extension much like SVN,, it is the wave of the future...with

www.selenic.com/.../wiki

Add a Comment

(required)  
(optional)
(required)  
Remember Me?