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

Re: Hooks written in Java using JavaHL

From: Mark Phippard <markp_at_softlanding.com>
Date: 2006-11-08 01:46:15 CET

"Dave_Thomas mailing lists" <davelist@peoplemerge.com> wrote on 11/06/2006
07:20:29 PM:

> Given a repository and the name/number of a transaction I need to get
the
> following info to write hooks in java:
> * a list of changed paths
> * the log entry of a transaction
> * ability to get a property of a specific path in a transaction
>
> Note, this is not revision info that I need. This is for a 'pre-commit'
hook.
>
> (No-whining disclaimer: I thought this was a user mailing list issue but

> "Please direct discussions of the API to the
mailto:dev@subversion.tigris.org
> " -- README-HIGH-LEVEL-API.txt )

In my opinion, writing a pre-anything hook in Java is not viable because
of the overhead of starting the JVM. If that is not an issue for you,
then your next problem is that there are no Java API's that can
interrogate transactions, so you'd probably have to contribute that
support to JavaHL yourself. To do it today, you'd have to execute svnlook
from Java which would be pointless.

Note that I am one of the biggest consumers of JavaHL, so it is not like I
am against Java. I actually do some post-xxx hooks using Java. What I
did was I have a Java daemon process that is always running and monitoring
a folder. The hook script is just a shell script and it dumps info about
the commit/prop-change into a file in the folder. This way, the hook runs
fast as the Java processing is done in the background. It would be hard
to do the same from a pre-xxx hook.

I'd say you are better off trying to use Python or a shell script.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 8 01:46:32 2006

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.