Custom subversion commands?

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Custom subversion commands?

Post 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?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I guess this is either a "no" or a "huh?" then? :)
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post 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.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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 :)
Post Reply