I've encountered a problem recently where I had to figure out if some checked out code is up-to-date with the svn repository, without actually running svn update. Unfortunately, svn update doesn't have a dry-run option, so I had to find another solution.

I came up with 2, depending on how detailed the information needs to be, which I'm about to share in this post.

1. If you want exact file and directory names, you can run:

svn status -u

If any files need updating, you will see a * before the file name.

svn status wc
M     wc/bar.c
A  +   wc/qax.c

svn status -u wc
M            965    wc/bar.c
       *     965    wc/foo.c
A  +         965    wc/qax.c
Status against revision:   981

Or more verbose

svn status --show-updates --verbose wc
M            965       938 kfogel       wc/bar.c
       *     965       922 sussman      wc/foo.c
A  +         965       687 joe          wc/qax.c
             965       687 joe          wc/zig.c
Status against revision:   981

Parsing the output in Perl, for instance, should be trivial. A connection to the repository is established for this check, so be sure to catch in your code the times when such connection is not available.

2. If you only care about whether a specific directory needs to be updated or not, here's a quicker method:

svn info vs svn info -rHEAD

cd somedir;
svn info -r HEAD | grep -i "Last Changed Rev"
Last Changed Rev: 8544
svn info | grep -i "Last Changed Rev"
Last Changed Rev: 8531

If these numbers are not the same, an update is needed.

What can I be missing? Are there any other creative ways, or is svn update going to support dry-run? Feel free to leave a comment if you know something I don't.

I just saw this on TV and had to look it up and post. The guy that looks like a tank made out of meat is Brock Lesnar. In his first UFC match, he's fighting the former UFC champion of the world, Frank Mir. At first it seems the outcome is clear but the fight surprisingly ends in mere one and a half minutes. Here's the replay:

If you are experiencing a weird feeling in your pants, it's normal.

Here's to hoping they won't fuck it up. http://www.imdb.com/title/tt0409459/

Updated: July 26th, 2008

image One of my most favorite movie series is not over yet. This is excellent news!

Producer Frank Marshall revealed plans to begin shooting a fourth Jason Bourne movie next Summer, for release in 2010. Universal announced the project back in February, with director Paul Greengrass and star Matt Damon set to return. Marshall also confirmed that they will probably be creating an original story for the fourth film.

read more

Updated: June 26th, 2008

I am usually very skeptical towards new startups, as most tend to do one thing and not so well or many things even less successfully. Zoomii, however, is what I found very useful. It creates the kind of feeling that you get when you're in control, when you can see at a glance what's going on. Zoomii is a virtual bookstore, with an Amazon backend. They took a different approach and made everything very visual, just like in the brick and mortar store – and I love it.

You can browse the latest releases or the top sellers, or perform a search and get hundreds of book covers, uncluttered by any text (until you click on any of them). The interface is amazingly friendly and simple, everything is draggable and zoomable – hence the name Zoomii, and here's the best part: it doesn't use Flash, everything is in Javascript. You can buy books without leaving the site or reloading any pages (of course, how else would they make money?). I think it's better explained through a couple of screenshots I took or by going to Zoomii itself:

image

My Search for 'Perl':

image

The Fiction bookshelf (It has Everything is Illuminated, weee!):

image

What a breath of fresh air, don't you think? Credit to MakeUseOf for the tip.