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

Enhancement request for hook scripts

From: RD Willhoite <rd-willhoite_at_alumni.calpoly.edu>
Date: 2005-07-28 22:36:57 CEST

I'd really love it if the commit stuff could pass info down to hook
scripts, like the credentials and network location of the user who
committed the changes. It'd also be useful to know the location of
the clone on the client.

Right now I'm using the (really useful) pre-commit hook to perform
some validation on some of the version-controlled files. Our system
incorporates some user-constructed XML files, and I have a command-
line tool that parses those files, ensures they're well-formed and
valid and performs deeper validation on them. This all works
beautifully, especially with TortoiseSVN in the mix, since the users
are domain experts but non-programmers.

However, some of those XML files require basically secondary files
that act as glue into a modified form of our software environment.
We have a customer-driven requirement to provide these secondary
files, so it's not like we can engineer them out. Right now, users
write these by hand, which is of course onerous (especially at crunch
time) and error-prone. I wrote a script to automate this (by
modifying a template file in a shell script), but I want this to
happen as soon as a source file is modified, not just at release
milestones, so that our development environment isn't out of sync
during non-release testing.

If the commit hooks could know all that I outlined above, I could
write a simple client/server tool that would generate the secondary
files, distribute them back to the user and svn add them.

I could write a tool that would generate the secondary file on the
user's machine, but then I have to write a UI to do this and test it
on all of the platforms, etc. A simple client/server tool that ran
in the background would be much easier. Forcing our users to commit
again (after informing them of the need via the output from the hook
script) is no big deal.

-RD

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 29 01:17:42 2005

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