Dynamic CSS/JS/HTML in Template Toolkit Wrappers

Since I've got a memory like a fish, after I asked Ted to paste it for the 3rd time, he posted it on his blog. Since we've already established that I have no memory, I'm linking to it here for the sake of Ted's sanity: Dynamic CSS/JS/HTML in Template Toolkit wrappers.

Cheers Ted.

no comments


A 42" LCD TV for £150?

A 42" LCD TV for £150? From a well known high-street shop like Woolworths? I call "data-entry error"!

But still, I thought I'd order one and see what happens. Unsurprisingly, they canceled the oder, as shown in the screenshot below:

Oh well. Can't blame a guy for trying...

1 comment


How Big Is My Potato?

This and other important questi... actualy no, just this one is answered by this month's, possible even this year's most novel, and perhaps useless application of JavaScript, which goes to How Big Is My Potato?.

no comments


Zombiied Mirrors

For those of you reading this looking for a solution when you svk mv a mirrored path, jump to The Solution

The Problem

So today I managed to fsck my SVK depot. In attempting to use mst's Reaction I mistakenly mirrored the repository under //mirrror/reaction. As noticed when i tried the following commands

[ash@bowser perl]$ svk co //mirror/reaction
path /mirror does not exist.

[ash@bowser perl]$ svk co -d /home/ash/perl/reaction
Checkout path '/home/ash/perl/reaction' detached.

[ash@bowser perl]svk mirror -l
Path                    Source
============================================================
//mirror/your_prefs     https://mydomain.com/svn/...
//mirrror/reaction      http://code2.0beta.co.uk/reaction/svn

[ash@bowser perl]$ svk mv //mirrror/reaction //mirror/reaction
Waiting for editor...
Committed revision 251.
Committed revision 252.
[ash@bowser perl]$ svk mirror -l
Path                    Source
============================================================
//mirror/your_prefs     https://mydomain.com/svn/...

Oh look at that. Its not there anymore. Hrmmmmm. What happens if we try to mirror it again...

[ash@bowser perl]$ svk mirror //mirror/reaction http://code2.0beta.co.uk/reaction/svn
/mirror/reaction already exists.

Ah, so lets remove it then try again:

[ash@bowser perl]$ svk rm //mirror/reaction
Waiting for editor...
Committed revision 253.
[ash@bowser perl]$ svk co http://code2.0beta.co.uk/reaction/svn 
<snip svk output>
Depot path: [//mirror/svn] //mirror/reaction
Filesystem has no item: File not found: revision 253, path '/mirrror/reaction'
[ash@bowser perl]$ svk mirror -l
Path                    Source
============================================================
//mirror/your_prefs     https://mydomain.com/svn/...

Bah. That didn't work either.

[ash@bowser perl]$ svk ls //
mirror/
mirrror/
[ash@bowser perl]$ svk rm //mirrror
//mirrror contains mirror, remove explicitly: //mirrror/reaction
[ash@bowser perl]$ svk rm //mirrror/reaction
no source specificed at /usr/local/share/perl/5.8.7/SVN/Mirror.pm line 52.

The Solution

To fix this problem, you have to remove the moved mirror from the svm:mirror property on the root of your depot (// in most cases.)

[ash@bowser perl]$ svk pg svm:mirror //
/mirror/your_prefs
/mirrror/reaction
[ash@bowser perl]$ svk ps  svm:mirror "/mirror/your_prefs
> " //
Waiting for editor...
Committed revision 254.
[ash@bowser perl]$ svk mirror //mirror/reaction http://code2.0beta.co.uk/reaction/svn
Committed revision 255.
[ash@bowser perl]$ svk sync //mirror/reaction
Syncing http://code2.0beta.co.uk/reaction/svn
Retrieving log information from 1 to 216
Committed revision 256 from revision 1.
...
Committed revision 471 from revision 216.

Huzzah! It's working!. Now to just remove //mirrror:

[ash@bowser perl]$ svk rm //mirrror
Waiting for editor...
Committed revision 472.

Done and dusted.

Tho strangely this bug report seems to imply this problem as fixed in 2005. However the above and [svk-devel] Unable to recover from zombie mirror say otherwise.

Anyone know differently?

1 comment


On Firefox 2 and SVG

Firefox has had some form of SVG support since 1.x, so I was mildly surprised when I attempted to view an SVG image in my fresh install of Firefox 2 when it didn't work - Firefox told me that I needed to install missing plugins. (Which unsurprisingly couldn't be found since no plugin is in fact needed.)

So what was the cause of all this woe and despair? Well it all stemmed from the fact that I upgrades from 1.5 to 2, and in 1.5 I was using the Adobe SVG plugin which disables the built-in SVG rendering. Firefox 2 helpfully copied this setting, but not the plugin.

For future reference svg.enabled in about:config needs to be true for the built-in SVG viewer to be used.

no comments