Updated: July 26th, 2010
This is a quick recipe that I found pretty interesting and relatively unknown.
Everyone who uses SVN knows that most repositories are set up to allow viewing of their contents via a web browser. For example, here's the trunk of WP Plugins SVN: http://plugins.svn.wordpress.org/ and here is the current trunk version of a specific file, let's say http://plugins.svn.wordpress.org/stats/trunk/readme.txt.
However, what if you wanted to view a specific revision of a file or directory in your browser?
Let's say I wanted revision 100,000 of http://plugins.svn.wordpress.org/stats/trunk/readme.txt
Normally, on a command line, you'd do something like
svn co http://plugins.svn.wordpress.org/stats/trunk/readme.txt stats cd stats; svn up -r100000 readme.txt
svn export -r100000 http://plugins.svn.wordpress.org/stats/trunk/readme.txt
However, how would you do this in …
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