On Mar 26, 2006, at 11:52, Andrew Gabriel wrote:
> Adrian Hoe 贺文耀 wrote:
>
>> Look. I am not talking about having to log checkout/update. I just
>> want a simple email sent out to designated persons when someone do a
>> svn checkout/update. I am just interested to know who and when
>> checkout what. Simple.
>
> In a previous job, using a proprietary source control system, we
> used the equivalent of a checkout hook to add people to a mailing
> list regarding the repository they checked out from. With
> Subversion, I can't do this until the first time they commit, so it
> would be useful to me too so I could do it on the checkout. (We
> only use the svn:// access method at the moment).
So it sounds like several people (3 so far in this thread alone) want
a pre- or post-checkout hook. (And I see for the first time now,
Adrian, that you also want a pre- or post-update hook.) Someone even
already implemented a pre-checkout / pre-update hook, the patch for
which is here:
On Mar 24, 2006, at 16:00, Mathias Weinert wrote:
> You may want to look at
> http://svn.haxx.se/dev/archive-2006-02/0304.shtml
> and a little follow-up discussion in a separate thread for which
> I don't have the number available at the moment (the subject
> is "Re: [PATCH] pre-update and pre-getfile hook").
There's some controversy about the way in which this feature was
implemented, which you can read about in the continued discussion
Matthias mentioned:
http://svn.haxx.se/dev/archive-2006-03/0033.shtml
One of the perceived problems was that a pre-checkout hook can be
seen as another authorization mechanism, which was thought to be a
bad idea (the better idea presumably being to extend the existing
authorization mechanism to offer whatever features people would be
implementing in a pre-checkout hook).
For the purposes of this thread, all that's desired is notification,
which would probably fit best into a post-checkout or post-update
hook. I can't find an issue tracker record for this request. Is there
a reason, or would anybody object to such an enhancement request
being filed?
So friends, until such new hooks are implemented, I think the only
way to get what you want is to serve your repository using Apache and
monitor the Subversion access log. Fortunately, since I'm trying to
avoid real work at the moment, I wrote you a nifty script which can
be used in conjunction with the new Apache access log features in
Subversion 1.3.0 to basically create the post-checkout-or-export and
post-update hooks out of thin air. The script is written in PHP,
because I like it. The server must therefore be running Apache 2.0.x
or greater, Subversion 1.3.x or greater, and PHP. (I'm running 5.1.2
but 4.3.x or greater should probably be fine; if not, let me know.) I
would like for the script to work on Windows too, but I can't test
that; it's tested to work on Mac OS X. Instructions and hook
templates are included in the archive.
http://www.ryandesign.com/svnhookdispatcher/
I should note that the new post-checkout-or-export and post-update
hooks get called even if the checkout, export or update is
interrupted for some reason, so just keep that in mind.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Mar 26 20:12:55 2006