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

Re: some hook questions

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2004-06-18 15:35:26 CEST

Helmut Heidegger <h.heidegger@phion.com> writes:

> 1. Do I have to restart the httpd server to take affect of changings in
> the hook scripts? (also creating start-commit...)

No.

> 2. I have added some echo commands to see what happens, but there is
> nothing displayed. Is there a possibility to debug / test the hook
> scripts?

Echo into temporary files:

   echo "Got to this point (A)" > /tmp/hook-test

> 3. I want to check if someone copies a branch to the tags directory if
> some svn:external references are correct and uptodate. Can I use
> commands like svn propget, svn info, svn status in the hook scripts?
> Or is there a better way to get to this info?

Depends on which hook you want to do this in. The client 'svn' can
only operate on revisions, not transactions, which means you can's use
it to very pre-commit trees. But you could make your post-commit
do this work by checking out the new tag, running 'svn status', etc.
The problem here is that this would be such a potentially long-lived
operation, you'd want to background it. And if you background it, you
can't use it to return error states.

In the pre-commit, if you had language bindings, you could use them to
directly scan the pre-commit transaction and verify that those
properties were properly set. Or actually, you might could do this
with 'svnlook dirs-changed' (to see if you need to run your validation
at all), 'svnlook tree' (to list the new tag), and 'svnlook propget'
(to check the props).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jun 18 16:01:05 2004

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.