On Apr 19, 2007, at 13:09, Will Norris wrote:
> Subversion has a number of hooks that are called when data is being
> modified, but I'm curious if there is any way to create a hook that
> is called when data is simply being read.
Subversion has the following server-side hooks available:
It's pretty clear from the names at what times these hooks are
executed. The pre-lock hook, for example, is run before a user-
requested lock operation completes. post-commit is run after a commit
completes. The pre-* and start-* hooks have the ability to prevent
the operation from taking place; the post-* hooks can simply take
actions after they have taken place.
Subversion does not provide hooks for the actions checkout, update or
export, but if you serve your repository with Apache, you can use a
script of mine to additionally implement the following hooks:
The script is here:
> My specific use case is that of student privacy here at USC; US law
> states that a student can request the university not release any of
> their personal data. So for those students, I'd need to be able to
> mask the svn "author" attribute in some way. My first inclination
> was to write hook that intercepts a read request and masks the
> <D:creator-displayname /> for those students who have requested
> this confidentiality. Is that type of hooking available, or would
> I need to dig into the subversion source? Or is there some other
> way to achieve this perhaps that I'm not thinking of?
No, I don't think there's any provision for that kind of hooking
within Subversion. But if you're serving with Apache, since
mod_dav_svn is just sending XML data to the client, maybe there is a
way to use an XML post-processor to modify the Subversion output
before it goes to the client. But this is beyond my area of expertise.
To reply to the mailing list, please use your mailer's Reply To All
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Fri Apr 20 01:49:07 2007