making the switch to subversion

I’ve been meaning to move to Subversion for quite a while, now. Maybe it’s been a year, I don’t know. I’ve been using it for Module::Starter, but that’s because Andy owns the repo for that. I used it for minicpan2, but that hasn’t been very active. Every time I start some new chunk of code, I think, “I should put this into svn!” Then I think, “but I’m not sure how I’m supposed to do that trunk/tags/branches thing, and I think I screwed up my repository to begin with, and isn’t all this thinking about svn just a way to shave yaks while I put off writing the code?” Maybe it was, but “needing to get the code committed right now” was a reciprocal yak-shaving to keep me from moving to svn.

Well, now my yak is bald! Before OSCON, I put “move code to svn” on my todo list, thinking I’d be incredibly inspired by the svn tutorial there. I wasn’t, frankly, but it was odd. I found myself saying, “This tutorial is not inspiring me to change… but I already decided to change! I will not let this be yet another reason to postpone.” My resolve was strengthened, and this week I acted on it.

I updated cheshire’s svn to 1.2.1, which also gave me a reason to update SWIG and Ruby. I installed cvs2svn, which gave me a reason to install Python. I removed my nearly-empty and probably-badly-done svn repository and built a new one. cvs2svn was a pain, because I actually have used tagging and branching. I decided to skip it and do what I’d planned on doing from the beginning: import fresh copies. I updated my CVS checkouts, cleaned them up, removed their CVS directories, reorganized them, and reimported them. It took an hour or two, mostly because I didn’t bother automating a lot of it and did it while watching the second disc of Homicide (which is quite good, by the way).

Now I have moved all my Perl code from CVS to Subversion, and I have a few things left to move: configuration files, my writing, and non-Perl code. That should take much less time, for a number of reasons. I know I’ve got a good number of little tasks and discoveries awaiting me (I have to turn on keywords for some files, I have to install the svn Module::Release plugin, I need to play with svk), but I’m feeling pretty good about the move. During my overlong contemplation, last night, about how to structure my repository, I realized, “Hey! If it sucks, I can move things around later.” Ah, freedom!

I only have one worry, at the moment. I know that I can tag things by copying to a tag directory, but I don’t really want to have to type the entire repository URL twice just to do so. This concern applies to a number of similar operations. “svn+ssh://svn.manxome.org/home/rjbs/svn/stuff/thing” is just too much. I want something like $CVSROOT, but I don’t think it exists. (Sure, I can use my own environment variable for this, but I feel put out even by that.) Anyway, time will tell whether I care. My prediction is that I’ll be elated to realize that the awesomeness of svn makes it easy to write an svntag script that does the right thing by looking in ./.svn for paths. Wouldn’t it be nice if that already exists? (I’m on the bus, I can’t google for it right now.)

Written on August 9, 2005
🏷 subversion