Page 1 of 1

Custom subversion commands?

Posted: Mon Oct 30, 2006 8:02 am
by Chris Corbyn
Is it possible to create a new command in subversion which anybody who checked out a given repository defining the command can run?

The basic reason is that we have a cluster of servers which all need the same "live" code base on them and updating them can be a tedious task of going to the server via SSH and running "svn update" on each one to pull in the latest version.

I could set up a cron job to do this but that gives us less control over how we trigger an update to the code base on the servers.

I was wanting to create a command we can run locally such as "svn golive" and then the server can trigger some shell script or such like when the command is run.

I know there are other options such as having a "live" branch and just merging changes into that and letting cron pull those changes in periodically across our cluster but I'm more curious if what I was thinking is possible?

Posted: Mon Nov 06, 2006 5:41 am
by Chris Corbyn
I guess this is either a "no" or a "huh?" then? :)

Posted: Mon Nov 06, 2006 4:26 pm
by Ambush Commander
Well, the thing is that Subversion shouldn't have right to update the public files: it's job is managing the repository. I'd just create a shell script that makes things go live, maybe giving it a public (password-protected) interface for convenience.

Posted: Mon Nov 06, 2006 5:33 pm
by Chris Corbyn
Ambush Commander wrote:Well, the thing is that Subversion shouldn't have right to update the public files: it's job is managing the repository. I'd just create a shell script that makes things go live, maybe giving it a public (password-protected) interface for convenience.
Thanks for clearing that up :)

My next step was going to be to create signed keys and make a set of scripts to handle this as you suggested. Perhaps this can be tomorrow's day at work for me :)