Setting up Subversion

October 25th, 2009

Every six months or so I decide to set up subversion on my server. Inevitably, I get some error (usually at the svn+ssh stage) I can’t find a solution to and lose interest after several hours of trying. I don’t know if I’m smarter or if errors are better documented, but I was successful.

I primarily used these instructions. Some of the errors I did encounter include:

  • When testing the online repository, I kept getting a forbidden error, even after inputting the correct password. It turns out I was giving it the wrong repository name. This would have taken me forever to diagnose without tail /var/log/httpd/error_log.
  • On import, “Unable to open an ra_local [sic] session to URL”. I had the arguments in the wrong order. It should go:
    svn import [files] [protocol]://[repository]
    I wish subversion’s otherwise excellent documentation would use more explicit terminology in distinguishing between your working copy and the repository.
  • I deleted a directory in my working copy, and when I try to check it in I get the error “Directory [directory] is missing”. I thought I could solve that by deleting it with svn delete instead of rm, but apparently that’s not the case. After a couple hours of googling and still lacking a better idea, I ran svn delete again immediately before committing. That did the trick, but I’m not sure why it was necessary
  • I have two separate config files, one for the development version on my laptop and another for the live version on the server. Now that both are drawing from a common repository, I made two config files in the same package, one for debugging and the other for live. I check in the files from my laptop and ran svn update on the server to bring them up to synchronize them. This did not synchronize them. I tried checking out a new version on the server, and although subversion indicated that it completed the operation successfully, the live version is still not using Although they both claim to be using revision 6, the live version is still showing the old config files.
  • Spent several hours finding out the hard way that can’t just add a file to a working directory and have subversion include it automatically, you need to run svn add file then commit changes. This is my least favorite feature of subversion.

I toyed with making the repositories available online. While it worked, I’d like to make them pretty before I introduce them to the public

Tags: ,

Comments are closed.