Fri, 01 Aug 08

Changing the repository of code being managed by Piston (an alternative to piston switch)

I’ve been working on a little script that gives us visibility of the state of the pistonised components of our applications. One of the things I noticed was that we’d used multiple domains to pistonise content from our own repository. I wanted to standardise them all and thought I’d be able to use the piston switch command to do just that. Unfortunately, the piston switch command appears to work only when switching between URLs where the domain remains constant (switching between and, for example). I needed to change the domain part of the URL ( to and in some cases the port ( to I figured I could just change the “piston:root” subversion property and used svn propedit to do just that. Unfortunately, on committing the change I could no longer piston update, I was getting a ‘command not found’ error from the shell. This was a bit odd so I dug into the code. It turns out that there was an extra newline in the piston:root property that was screwing up the svn checkout (the bit after the newline was being treated as a new command by the shell, hence the error). The solution was to use svn propset rather than svn propedit to set the piston:root property: for some reason svn propedit introduces this unwanted newline, where svn propset doesn’t.