Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Friday, August 1, 2008

Subversion, Vendor Branches, and svn-load

A while back, Ross Burton wrote an excellent tutorial for using vendor branches in subversion. I used this tutorial, or one like it, about a year ago when adding a vendor branch to one of my own projects, jpilot-icalendar.

A few days ago, I needed to update jpilot-icalendar with a new vendor version. I couldn't remember exactly how to do that, so I googled "subversion vendor branches" and found Ross's tutorial. As I was going through the steps, I discovered that svn_load_dirs was no longer installed on my system. I assumed this was a casualty of my recent hard drive failure and started looking for the package it belonged to so I could reinstall it. After a bit of digging, I found to my horror that svn_load_dirs had been removed from the Debian subversion-tools package. There was mention of an svn-load command, which "should function as a drop in replacement."

I couldn't find any documentation on svn-load, so I setup a test subversion repository to test it. I am happy to report that it does seem to be a drop in replacement for svn_load_dirs, at least to the extent that I used it.

Here is how I originally imported the vendor source:


$ svn import libical-0.23 \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/current \
-m "Importing libical-0.23"

$ svn copy \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/current \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/0.23 \
-m "tagging libical-0.23"

$ svn copy \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/current \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/trunk/libical \
-m "bringing libical-0.23 into main branch"


Then I updated to libical-0.24-RC4:


$ svn_load_dirs \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical \
-t 0.24-RC4 current libical-0.24

$ svn merge \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/0.23 \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/current \
libical


That brings me up to a few days ago, when I wanted to upgrade to libical 0.31. Here is how I did that:


$ svn-load \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical \
-t 0.31 current libical-0.31

$ svn merge \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/0.24-RC4 \
https://jp-icalendar.svn.sourceforge.net/svnroot/jp-icalendar/vendor/libical/current \
libical


As promised, the svn-load command was a drop-in replacement for svn_load_dirs.

Edited 08/02/2008 11:11AM EST:Fixed layout again, after reading this handy guide.

Monday, June 2, 2008

Should you know C?

I've been enjoying the podcasts that Jeff Atwood and Joel Spolsky have been putting out for StackOverflow. In the last two, Jeff and Joel have been discussing whether it is useful for a programmer to know C, even if they do not program in C. Joel believes that knowing C, or more specifically, low-level programming details, is not just useful but essential. Jeff, on the other hand, doesn't seem to think it's very useful, and that programmers can better use their time learning the business domain of their applications. Of course, the fact that Joel knows C, and Jeff doesn't, might have an impact on their opinions.

I agree with Joel on this, but then I also know C so I suppose that's to be expected. Other people have made good supporting arguments, but I'm curious if the naysayers think that web application developers, or even web designers, should know HTML. There are plenty of tools that let you design a web site or manage content without using HTML, so why bother learning the low-level details of how they work?