You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "C. Michael Pilato" <cm...@collab.net> on 2004/02/06 21:30:13 UTC

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

cmpilato@tigris.org writes:

> Author: cmpilato
> Date: Fri Feb  6 15:15:39 2004
> New Revision: 8576
> 
> Modified:
>    trunk/subversion/svnadmin/main.c
> Log:
> Revert revision 8562, whose log messages looks thusly:
> 
>    * subversion/svnadmin/main.c
>      (subcommand_setlog): Pass "svnadmin" as the username when folks use
>        'svnadmin setlog'.

This change just wasn't thoroughly thought out.  It had to go.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Juanma Barranquero <jm...@wke.es>.
On 07 Feb 2004 22:47:46 -0600
"C. Michael Pilato" <cm...@collab.net> wrote:

> you should still be sensible about a backup plan for your NVPs.

Sure.

> 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

No. It would get me the ability to allow one kind of changes and forbid
the other. I take responsibility for svnadmin changes... I'm not worried
about the prospect of yelling to myself :)

                                                                Juanma



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by "C. Michael Pilato" <cm...@collab.net>.
Juanma Barranquero <le...@mi.madritel.es> writes:

> On 07 Feb 2004 19:37:31 -0600, "C. Michael Pilato" <cm...@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

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

Posted by Juanma Barranquero <le...@mi.madritel.es>.
On 07 Feb 2004 19:37:31 -0600, "C. Michael Pilato" <cm...@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.

> So hook writers need to be made aware of the fact that this
> could happen.  If anything, this is just a little fix that needs to
> happen to the repos code that writes out the hook templates at repos
> creation time, just to note that sometimes there is an empty author.

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.

Funny thing is, I don't think the fourth case is that unusual, because
in an open repository, most users' changes are not harmful (they can
always be reverted), *except* changes to non-versioned props, so it
seems very sensible to limit those to the admin, even when other changes
(commits) are full open to the general public.

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.

                                                           /L/e/k/t/u


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by "C. Michael Pilato" <cm...@collab.net>.
Juanma Barranquero <le...@terra.es> writes:

> On 06 Feb 2004 15:30:13 -0600, "C. Michael Pilato" <cm...@collab.net> wrote:
> 
> > > Revert revision 8562, whose log messages looks thusly:
> 
> > This change just wasn't thoroughly thought out.  It had to go.
> 
> Should I file an issue about the problem, so it is not forgotten?

I'm not so sure.  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'.  So hook writers need to be made aware of the fact that this
could happen.  If anything, this is just a little fix that needs to
happen to the repos code that writes out the hook templates at repos
creation time, just to note that sometimes there is an empty author.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Juanma Barranquero <le...@terra.es>.
On 06 Feb 2004 15:30:13 -0600, "C. Michael Pilato" <cm...@collab.net> wrote:

> > Revert revision 8562, whose log messages looks thusly:

> This change just wasn't thoroughly thought out.  It had to go.

Should I file an issue about the problem, so it is not forgotten?

                                                           /L/e/k/t/u


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org