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

Re: Ways to keep users from checking out too much.

From: Mathias Weinert <mathias.weinert_at_gfa-net.de>
Date: 2006-02-23 11:16:47 CET

"C. Michael Pilato" <cmpilato@collab.net> wrote:

> Garrett Rooney wrote:
> > How would people feel about some mechanism for stopping update reports
> > rooted at particular directories? It might at least prevent the
> > accidental foot shooting you get when an inexperienced user first
> > tries their hand at a svn checkout, and that would be a nice step in
> > the right direction.
>
> That is a very odd feature request if expressed as something you'd want
> to put into Subversion itself. It's the kind of thing that would work
> well if we had (as many folks have asked for) read hooks in the
> repository, but ...
>

I once wrote a pre-update hook and a pre-getfile hook. They only
work for ra_svn and ra_local until now (at least they work in my
environment). The pre-update hook is used for 'svn update' and
'svn checkout' whereas the pre-getfile hook is used for things
like 'svn cat'.

Both hooks get the same five parameters:
REPOS: local path to repository
REVNUM: revision number requested
TARGET: target path within repository
IP_ADDR: ip address of calling client (if available)
USER: user

With this you could prevent users from checking out certain
paths as well as preventing certain users or IP addresses from
doing the checkout.

I mentioned this on this list some months ago but no one seemed
to be interested. But as I received a request for it some weeks
ago I posted a patch it to the list. But again there was no
reaction. So either people aren't interested any more or they
didn't read my post or they find my patch not suitable.

As already said these two hooks work for me and may not work in
other environments. Please regard this just as an example or a
point to start from but not as a complete solution. But may be
there is someone out there who wants to improve this and add it
to Subversion at the end.

The provided patches are built against Subversion 1.3.0.

Mathias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 23 11:17:33 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.