Category Archives: Subversion

Subversion on Mac OS X

A Rank Amateur Upgrades His Subversion Repository

As I mentioned previously, I’m using Subversion to store stuff I’m working on — articles, code examples, personal projects, etc. It’s a handy way to get a replica of all my work on all the computers I use, both at home and at work, without having to worry about whether the latest version of a given file is on this computer or that computer. And because it’s a version control system I don’t have to worry about screwing up a version of a document or program (if I make a huge mistake, I can just revert to an earlier version).

I’m an OK programmer, but I was born without that part of the brain that lets me do system administration tasks confidently. For people who don’t have hands-on experience with either programming or administration, or both, this probably sounds nutty: "C’mon, you’re a big computer guy, you can make them bow to your will, what is it about server administration that makes you soil yourself and cower in the corner like a little girl?" I’m not sure. I suspect it’s because the support and documentation characteristics for administrative tasks and programming tasks tend to be very different. I tend to learn by example, and most books on system administration bombard you with 100 pages of background information before they show you the first example of what you really want to do. I realize that there may be a good reason for this, but it doesn’t keep me from falling asleep by the time I get to page 4 of the manual.

Anyway. I’m trying to keep up with the latest build of Subversion as it approaches its 1.0 release. (Update: Subversion has shipped version 1.0 since this was originally written; I’ve updated this to reflect a minor change in the original upgrade procedure.)

When Subversion was in development, every so often they would need change the database schema. When that happens, you have to perform a dump of my repository, install the new version, and import the dump files. Not a huge deal to a system administrator with an iron constitution, but to me: yikes. So when I upgraded from version 0.35 of Subversion, I very carefully wrote everything I did down. I share my notes for your benefit, if you should happen to find yourself in the same situation I was in. (Nota bene, I’m running Subversion on Windows 2000 Server, so that’s what these instructions will apply to.) My upgrade went flawlessly, by the way, despite my angst, and the Subversion documentation on repository migration is quite excellent, actually.

Upgrading A Subversion Repository
1) Per http://svn.collab.net/repos/svn/trunk/CHANGES, first  use  ‘svnadmin dump’  with  your existing version of Subversion.

    svnadmin dump D:svntest > D:Program FilesSubversiondumpfilestest.dump

(Do this for any other repositories you have as well.)

2) Upgrade your Subversion binaries to the latest version:

  a) Stop Apache service (net stop apache2)
  b) Launch the installer (svn-1.0.0-setup.exe) or, if you use the non-installer zip distribution, copy the files manually to wherever your Subversion binaries live (on my machine, it’s "Program FilesSubversion")
  c) Move contents of Subversionapache2modules to Apache2modules (Update: In the 1.0 Subversion distribution, these files are now stored in httpd)
  d) Rename repository root (d:svn) to something else (like d:_svn)
  e) Start Apache service (net stop apache2)
 
Question: Installer says "Replace any libdb40.dll with this package’s libdb42.dll". Not sure what to do here; I’ve got a libdb40.dll in d:program filessubversion, but there’s a libdb42.dll in d:program filesSubversionbin. Am I supposed to blow away the libdb40.dll in the Subversion directory? It seems to be working OK now, so I’m going to assume the answer is actually "no".

3) Re-create your repositories using svnadmin create.

	mkdir d:svn
svnadmin create D:svntest

(Do this for other repositories you have as well.)

4) Use  ‘svnadmin load’  to  create  a  new  repository  from your dumpfile.                                                      

	svnadmin load D:svntest < "D:Program FilesSubversiondumpfilestest.dump"

(Do this for any other repositories you may have as well.)

5) The Subversion installer says "Don’t forget to copy any custom configuration/hooks from the old to the new repository." I don’t have any of these filthy beasts so I’m done.

All About Subversion

Here’s a really brief layman’s description of the Subversion version control system along with some links to resources about it. Since this most excellent tool is approaching its 1.0 release, you might want to check it out, if you’re into that kind of thing. I’m not as well-versed with Subversion as I’d like to be, so feel free to post a comment if I got anything wrong.

Continue reading