Comparing Wordpress Versions


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=

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

Subversion Update Tips


Subversion has been an excellent tool for version control, but certainly with its own frustrations.

One of these has been knowing where you are (or, rather, your working copy is) in relation to what is what's on the server's repository.

Version 1.5, approximately, introduced a few changes which make this much simpler. At least with v1.6 you can do this, assuming you are in a subdirectory under one in svn control:

$ <strong>svn ls ^/tags</strong>

Huzzah! Subversion replaces the caret with "the root URL of the repository for this checkout" -- I sure wish I had known this a lot earlier. Now I can see what other tagged versions are available.

Some of you may have guessed my working copy was of Wordpress. Here's how we can see exactly what's going on in a particular tagged version, without actually checking it out:

$ <strong>svn ls ^/tags/3.0.3/wp-includes/ -v</strong>
 16803 westi                 Dec 08 10:50 ./
 13211 nacin                 Feb 18  2010 Text/
 8149 westi           10928 Jun 20  2008 atomlib.php
 15148 nacin           11549 Jun 05  2010 author-template.php
 12525 ryan             9624 Dec 23  2009 bookmark-template.php

Ah, you say, but I have the tagged version I want... I just want to know what will happen if I type svn update ...? Well try this:

$ <strong>svn diff -r HEAD</strong>

That will show you the differences between your current working copy and the latest edition (head) of the currently checked out version... which is the differences that will be applied if you did an update.

OK, now I'm ready to switch my version... this used to be a bit of a pain, having to copy the URL... but now we can just do:

$ <strong>svn sw ^/tags/3/0.3</strong>
<em>or maybe</em>
$ <strong>svn sw ^/trunk</strong>

Firebug 1.6 favorite features


Firebug 1.6, the plugin for Firefox, is newly released; for debugging or developing web apps, like Wordpress, it is simply indispensable.

A few of my favorite features:

  1. Scrollable breadcrumbs, solves the one biggest thing that always drove me nuts, in dealing with Real World css.

  2. Copy CSS from the inspection window by right-clicking on the declaration:

Wordpress 3.0 Menus, A Disaster Waiting to Happen


After reading Justin Tadlock's excellent writeup of Wordpress 3.0 navigation menus (nav-menus), I am seriously disappointed and annoyed at this new feature.

A nightmare to maintain, spaghetti bowl of desynchronization, is what these new menus are. They statically replicate what we already had dynamic widgets for. In database lingo, they violate third normal form.

Post and page descriptions are computed from the page content AT ADD TIME; if you update a post or page, its description is not updated, so you have to remember to manually edit each menu entry each time you edit something. Adding pages, or changing a page’s Order, or changing a page’s Parent, does not change the menu, you have to manually go replicate all your changes in two places.

Nor can I find any way to write a widget that creates menu items, like my , which would solve the above problems by creating menus on the fly, based on your current page location, the N latest posts, or other inputs.

In short, the new menus should have been a widget, that could be inserted anywhere, instead of a whole new structure. What a mess.

wp-e-commerce bugs and improvements


This applies to version