Re: Hook script questions
From: Nico Kadel-Garcia <nkadel_at_comcast.net>
Date: 2006-07-07 00:10:33 CEST
----- Original Message -----
Please don't beat me with the RTFM stick. I've searched for a few days now and I'm not able to find an answer to my question.
I'm setting up a new subversion instance. It will contain a single repository with several projects. One of those projects is going to be the source for a tomcat based website. I want the website to get updated automatically only when the "website" project is updated. Since I'm not a coder I'm not entirely sure how to go about doing that.
Is it possible to write a post-commit script that will execute only if that portion of the tree has been changed?
If someone could point me to an example of how this could be done I would be eternally grateful.
-Linda
Now, now, no sticks on newbies (unless they're into it: I have some SCA friends). Post-commit is really a server side command: if the clients are known, you could use an SSH or other remote access tool to push an update to it.
But instead, if I may suggest, why not have the client simply run a query on a cron-job basis to see if there have been any changes in that project? Use "svn info -r HEAD /workingcopy" and parse out it's URI and revision number. If there is a difference between them, pull the update instead of pushing. That's how I've done it for a website under subversion.
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.