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

Client side Hooks?

From: Josef Wolf <jw_at_raven.inka.de>
Date: 2002-05-25 14:27:36 CEST

Hello!

In the past 10 years I have built some wired script around cvs to
control my tests/ci/export/build/etc/pp. Now that svn came up and gave
me much hope that the world could be much better than in cvs, I sat
down and looked at those wired scripts and tried to find a better way
to do such things.

Here are some (probably wired) ideas which I would like to discuss on
this list.

What if we would introduce client-side-hooks based on properties? Look
at this example:

 cd $WC

 # refuse commit unless regression tests pass and changelog exists
 #
 echo make check >pre-commit
 echo emacs changelog >>pre-commit
 svn add pre-commit
 svn propset svn:commit:pre /bin/sh pre-commit

 # announce the commit
 #
 echo mail -s '"rev $LastChagedRevision:$ committed"' $recipients >post-commit
 svn propset svn:keywords LastChangedRevision post-commit
 svn propset svn:commit:post /bin/sh post-commit

 # export automatically builds and uploads to server
 #
 echo make dist >post-export
 echo scp 'foo-$LastChangedRevision:$.tar.gz ftp.foo.org:/pub/foo >>post-export
 svn propset svn:keywords LastChangedRevision post-export
 svn propset svn:export:post /bin/sh post-export

This could be extended to include the OS-name or hostname, so you
could make:

 svn propset svn:export:post:Win c:\\command.com post-export.bat
 svn propset svn:export:post:Linux /bin/sh post-export-linux.sh
 
Every subcommand could have its own set of hooks. OK, this is just a
little example. You could think up a lot of funny stuff with such an
extension.

What do you think about that?

PS: Oups? I just noticed that svn lacks an "export" subcommand?

-- 
-- Josef Wolf -- jw@raven.inka.de --
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat May 25 14:29:22 2002

This is an archived mail posted to the Subversion Dev mailing list.

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