Using Subversion at pair Networks »
Even though I deal with Movable Type a great deal in my job as a Movable Type Consultant, and I have written plugins for the platform for something like four years now (including the award-winning MT-Notifier), these days I tend to do more integration and implementation. I'm not complaining, that's just the way it is.
In spite of that - or perhaps because of that - I have never really used Subversion much. I guess that I just never considered myself enough of a developer to do it. Well, that and the fact that I never really had access to a Subversion repository. Sure, there is Beanstalk, but I just can't get into the habit of handing my data over to someone else. One is because I don't like to pay someone else to hold onto it, and two is because I'm stuck if I am ever offline for any length of time. As a result, I've known for a while that pair Networks offers Subversion, but I've never used it. That all changed recently.
One reason is because I typically just store versions of the plugins that I do write in their own directory, and for some plugins, it was getting a bit unwieldy keeping up with them. So I was trying to figure out the best way to handle different versions. Another is because I like to play with new things, and I had Subversion on my list for a while, I just never had the time to get it to work. The third reason is that I tried a free account at Beanstalk, set up a simple repository and made things work, so that made me want to make it work better - but I still had to deal with the fact that I needed a lot more than the free account offered, and I still didn't want them to have all the data. I'm just anal like that.
In the end, what happened was that I read an article on setting up an svn+ssh connection to a Subversion repository. What struck me as amazingly simple was that I already had done most of this when I set up my PuTTy connection to pair a while back. The article actually didn't mention that you can store your user name in the PuTTY profile, which makes connecting even easier - so I tried it. I just connected to:
svn+ssh://MyConnection/usr/home/username/repos
(I set up my repository in my home directory.)
And wham! I was in. If I'm making this sound easy, it's because it was - that's because most of the legwork was done when I set up PuTTY and Pageant before (along with creating the Subversion repository previously. Had I not done this, then I wouldn't have been able to do it so easily, but since I had, it was done. If I hadn't set up the repository, I would have likely connected, but received an error. In that case, I would just need to create one, with a command like this:
svnadmin create repos
It really is that easy.
I did have to make one other change along the way. At last count, I have 36 plugins that I want to keep track of to some degree. Doing so in a single repository may end up being a little messy. There are some potential advantages to doing so, like the sharing of code bases and whatnot - but since most of my plugins are fairly small, I ended up going with a separate repository for each. This means that my create command is a little different than that one. Instead, it looks like this:
svnadmin create repos/MT-Foo
That just creates a new directory for the plugin MT-Foo. For the next plugin, I create a new repository - and to connect, I just choose the right one when I'm updating. It's actually pretty sweet, and this method has worked out well - mostly because in the process of trying to get all my data imported, I've had to start over a time or two. This means wiping out the repository and starting from scratch. If they were all in a single repository, I would have had to do it all over again, rather than just for the one plugin that I managed to screw up.
Whatever the case, it's an easy connection to make, and one that is well worth the time. I should have done it long ago. Now I just have to find the time to finish getting all my plugins into their respective repositories. Anyone have a way to get a few extra hours in the day?




















