SVN tricks

Tags:

To compare the current working copy with other versions, or just to see what other tagged versions are available, it is handy to know the revision number, which is what svn bases all its operations on. The best way to do this is with the long (verbose) form of svn ls as shown below. Note, I am in the 'trunk' directory of my AutoNav project.

bill@charcoal:trunk$ <strong>svn ls -v ../tags</strong>
 327606 wlindley              Dec 31 11:41 ./
 175035 wlindley              Nov 18  2009 1.1.8/
 175037 wlindley              Nov 18  2009 1.1.9/
 187455 wlindley              Dec 27  2009 1.2.2/
 192298 wlindley              Jan 10  2010 1.2.3/
 193267 wlindley              Jan 12  2010 1.2.4/
 195857 wlindley              Jan 20  2010 1.2.5/
 283374 wlindley              Aug 31 14:03 1.2.7/
 287447 wlindley              Sep 09 13:31 1.2.8/
 307532 wlindley              Nov 03 14:52 1.2.9/
 308944 wlindley              Nov 07 12:57 1.3.0/
 311196 wlindley              Nov 13 16:28 1.3.1/
 312023 wlindley              Nov 15 22:33 1.3.2/
 320048 wlindley              Dec 07 06:34 1.3.3/
 320583 wlindley              Dec 08 11:05 1.3.4/
 327606 wlindley              Dec 31 11:41 1.3.5/
bill@charcoal:trunk$

The revision numbers are at left. Now I can do:

bill@charcoal:trunk$ svn diff -r 320583
Index: autonav-wl.php
===================================================================
--- autonav-wl.php      (revision 320583)
+++ autonav-wl.php      (working copy)
@@ -4,7 +4,7 @@
 Plugin URI: http://www.wlindley.com/webpage/autonav
 Description: Displays child pages in a table of images or a simple list; also displays
attached images, or images from a subdirectory under wp-uploads, in a table, with
automatic resizing of thumbnails and full-size images.
 Author: William Lindley
-Version: 1.3.3
+Version: 1.3.6
 Author URI: http://www.wlindley.com/
 */
            <em>and so on</em>

It sure would be nice if there were a way to combine both local working copy and a remote tag in an svn diff command, but that does not seem to be suppported yet (as of svn 1.6).

see also Other svn tricks here [gnu.org]

Comparing Wordpress Versions

Tags:

This morning I saw a critical update to WordPress ... and wondered what had actually changed.

When you need to compare the installed version of Wordpress (or any program, really) with a different version in the official repository, Subversion can help, although it is not exactly obvious. Here is the incantation:

svn diff --old=. --new=http://core.svn.wordpress.org/tags/3.0.4

With subversion 1.5 or later, you can use the shortcut:

svn diff --old=. --new=^/tags/3.0.4

Or to compare the current version to the new main 'trunk' --

$ svn diff --old=. --new=^/trunk