[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: RE: Re: Feature Request

From: Marino Kevin <Kevin.Marino_at_neighborcare.com>
Date: 2005-03-22 16:46:14 CET

Ok, so it would lay out like this.

Via eclipse I checkout my copy to work on, which is in my local
workspace.
On webserver I do a checkout to website directory (via Tortoise,
cmdLine,etc..).
So effectively the site is checked out in two places.
Then I just run the post-commit hook to do an update for the webserver
checkout. This would occur when I committed from subclipse.

Sound about right?

Thanks

Kevin

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:

cd c:\webroot
c:\svn\svn.exe update

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.

Mark
Received on Wed Mar 23 02:46:14 2005

This is an archived mail posted to the Subclipse Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.