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

Re: svn commit: r8576 - trunk/subversion/svnadmin

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2004-02-08 05:47:46 CET

Juanma Barranquero <lektu@mi.madritel.es> writes:

> On 07 Feb 2004 19:37:31 -0600, "C. Michael Pilato" <cmpilato@collab.net> wrote:
>
> > The "problem" is simply that post-revprop-change
> > hooks might not always get a username. This could happen for
> > different reasons, such as an open-auth repos, or an 'svnadmin
> > setlog'.
>
> Leaving aside the (subjective) ugliness of having an optional in-between
> parameter (1st, 2nd and 4th are always present) instead of last, I feel
> uncomfortable on the current status, for the reasons stated below.

Optional? Not optional, just sometimes empty "". :-)

> In the following cases, it's always assumed that the p-r-c
> (pre-revprop-change) hook must exist because it does something useful
> and non-trivial (sending a mail, logging changes, reformatting the
> non-revision property, whatever). Obviously, if no p-r-c hook is deemed
> necessary, --bypass-hooks is the answer and the issue is settled.
>
> 1) Protected repo, only the admin sets nvp (non-versioned props):
> - A p-r-c hook that only returns success on empty user. OK.
>
> 2) Protected repo, users and admin set nvp:
> - If everyone can change to their hearts' content, just a p-r-c hook
> that always returns success. OK.
> - If not, a p-r-c hook that checks for valid users or empty (the
> admin). OK.
>
> 3) Open repo, (all) users and admin set nvp:
> - p-r-c hook that always returns success. OK.
>
> 4) Open repo, only the admin sets nvp:
> - ?
>
> AFAICS (and I could very well be wrong), in the fourth case there's no
> way to distinguish between the admin and the (anonymous) users, so
> there's no way to set it up.
>
> The best you can do is reduce it to the third case (open nvp changes
> for all) and record *every* nvp change, in case some user goes
> mental and decides to wipe out all logs; or not have a p-r-c hook,
> and force the admin to set nvp through a script (remember, we're
> assuming there's additional work to be done on nvp changes) that
> executes "svnadmin setlog --bypass-hooks". Ugly.

Dude, that's what happens when you use an open-auth system. But even
if your users don't go mental -- heck, even if auth *is* enabled --
you should still be sensible about a backup plan for your NVPs.
Accidents happen, and happen to administrators as well as users.

> Summing up: the only real (if not earth-shaking, I agree) problem is
> lacking a way to differentiate anonymous users from the admin. A simple
> answer, like passing '*' instead of '' for anonymous users, would be
> more than enough.

I don't see the utility of such a distinction. All this would get you
is the ability to have someone to yell at when one flavor -- probably
the less likely of the two kinds -- of accidental NVP lossage occurs
(that when the fault is the admin's). And if the admin guys wants to,
he can always bypass the hooks anyway, so then you'd have *noone* to
fuss at.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Feb 8 05:48:35 2004

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.