"Marino Kevin" <Kevin.Marino@neighborcare.com> wrote on 03/22/2005
> Thanks for the quick response. You lost me at "post-commit-hook...",
> Our current environment is somewhat bastardized. Our main webserver is
> IIS/Coldfusion/J2EE (this predates our implementation of subversion) so
> currently I have installed an Apache server on a different port that
> handles the SVN interaction. Coding a hook may be beyond my
> capabilities, but the other option is intriguing.
> So are you saying have the webserver run a process every x time and
> perform a checkout dropping a copy in the website directory? Oh, and
> what does "WC" mean? Pardon my lack of knowledge still learning SVN.
Hook scripts are a feature of the Subversion server. They execute on the
server. The hook you would need to write would be relatively easy, but by
no means trivial.
"WC" means Working Copy. That is the Subversion term for your workarea.
You need a WC to do a commit or update. Using a WC is the easiest way to
do this because you can just run "svn update" to get anything that has
been checked in. It is "smarter" than "svn export" since it would only
bring down changes. The downside is that a WC has those .svn folders.
Personally, I see no problem having those in your web area.
To use this idea, you would need to delete/rename your current web site
location, and then use "svn co" to recreate it as a WC from the
repository. You would then just need to setup some kind of scheduled
process to run the "svn update" command from the location of your WC. If
there were any new changes in the repository it would pull them in.
Actually, you could even run the svn update from the post-commit hook so
that it was done immediately. That would be a very easy hook to write.
Since your server is on Windows, the hook script is just a .bat file. The
entire script could look like this:
Put something like this in a .bat file named post-commit.bat and place it
in the hooks folder of your repository. After every commit, the server
will run that batch file.
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs.
Received on Wed Mar 23 02:33:02 2005