Skip to content

Using rsync together with Subversion

I am using rsync to synch my local filesystem with the server. As described in the linked article this is quite comfortable – and fast.

Introducing (advanced)

This weekend I (re-)installed Subversion to put more of my harddisk’s content under version control. I’ve used Subversion (together with TortoiseSVN) during writing my diploma-thesis. I’ve versioned not only code but mainly text. Since I’ve written my thesis with DocBook, the text consisted of XML-files which can be version-controlled nicely.

Reading Tip 23 Always Use Source Code Control (even if it is not source code) in ThePragmaticProgrammer I decided to give Subversion another, broader try.

Subversion basically allows to ways to access a repository: Either via file:// or via http://. For the latter apache must be installed. I decided for the latter and updated my apache-installation. That went quite smooth.

I downloaded the lates version of TortoiseSVN (TSVN) – a GUI-client for subversion, implemented as a shell extension for Windows Explorer. This didn’t work out very well. The TSVN-entries do not show up in the context menu. Most likely I misbehavied uninstalling the previous installation via secure-mode-console (because of bound DLLs)!? 😐

So currently I am using Subversion via its CLI which works out quite nicely, BTW. I’ve noticed that the explorer-icon-overlays that TSVN installs do work. Strange. The now even work in TotalCommander the alternative to explorer I use. Nifty.

There are some introductory sites linked to from my Subversion-wikipage. Please have a look there for more detailed information on Subversion and VersionControl in general.

rsyncing subversion-controlled directories

Subversion adds a .-directory to all directories under VersionControl. Since I don’t want those .svn-directories on my webserver I had to tell rsync to ignore (‚exclude‘ in rsync-speak) those directories. Not so easy.

Adding .svn or .svn/ to my exclude-file did not have the intended effect. I tried --cvs-exclude which is supposed to support svn, too. Nope.

The solution

Adding .svn/* to my exclude-file did the trick.

{ 2 } Comments

  1. Mike | 2008/12/21 at 01:46 | Permalink

    Your method also works for me.. but adding –exclude-cvs works perfect for me on 3.0.3 & 2.6.4.

  2. Steffen | 2008/12/21 at 10:28 | Permalink

    I just checked – I am using 2.6.0 – maybe that’s too old to support SVN…

{ 2 } Trackbacks

  1. […] I described my failure of getting Rsync to work with Subversion smoothly in Using rsync together with Subversion – Part I and Part II. I […]

  2. […] Seitdem ich Subversion (wieder) installiert habe versuche ich auch TortoiseSVN, einen Subversion-Client in Form einer Windowsexplorer-Erweiterung ebenfalls zu installieren. Bislang ohne Erfolg. Das Deinstallieren endet dann meist im abgesicherten Modus, um auch die DLLs entfernen zu können… […]

Post a Comment

Your email is never published nor shared. Required fields are marked *