I’ve finally decided to make the switch to Subversion for all of my personal work which includes source control of software projects as well as managing documents across multiple work and home computers and operating systems.
Here are the 3 things I’ve noticed so far that are just great:
1. Subversion keeps a local copy of file history so I can do a svn diff or svn status offline and it doesn’t need to go back to the server.
2. If I want to see which files I’ve modified or need to be added I just run svn status. I’ve never liked having to do a cvs -nq update.
3. Renaming and moving files and directories is fully supported, Amen!
I prefer to do my SCM over SSH so I don’t have to deal with yet another daemon process, apache modules, and so on. So I’m running Subversion over SSH, just like I used to with CVS. The only downside with this approach is to make it usable (just like with CVS) you really need to use public keys for SSH authentication so you don’t have to type your password over and over and over.
Here’s what was involved in setting up Subversion on my server:
1. On my Linux server I installed the Linux RPMs. If you don’t have root access to your machine you can also build it from source and install it under your users home directory.
2. Then I created a directory to hold the subversion repositories under my home directory: mkdir /home/myuser/svn
3. Then I created a repository under that directory: svnadmin create –fs-type fsfs svn/myproject. Note I’m using the newer filesystem (fsfs) type repository because it uses less space and I’ve heard it’s more stable.
Then to use the repository from my Windows desktop I did the following:
1. I’m a Cygwin user so I just ran Cygwin’s setup.exe and opted to install Subversion. You can also download and install the packages without Cygwin.
2. Then I went to the parent directory containing the directoy I wanted to import and ran the following: svn import myprojectdir svn+ssh://email@example.com/home/myuser/svn/myproject -m “initial import”.
3. Then to make sure it worked I try a checkout: svn checkout svn+ssh://firstname.lastname@example.org/home/myuser/svn/myproject myproject.
To install Subversion on my Linux desktop I just installed the Subversion RPMs like I did on my server. On MacOSX you can use fink to install the it.
Lastly, for managing documents in Windows I’ve always enjoyed TortoiseCVS because it integrates directly with the file explorer, I’m hopeful that TortoiseSVN will work just as well but have yet to try it.