You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2004/02/05 23:23:03 UTC

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

cmpilato@tigris.org wrote:
> Author: cmpilato
> Date: Thu Feb  5 10:14:46 2004
> New Revision: 8562
> 
> Modified:
>    trunk/subversion/svnadmin/main.c
> Log:
> * subversion/svnadmin/main.c
>   (subcommand_setlog): Pass "svnadmin" as the username when folks use
>     'svnadmin setlog'.

Why?  I'm not saying it's wrong, just asking because no reason is apparent to me, and I regard the "###" as meaning "we really should fix this soon".  (Is that how other people interpret "###"?)

The sort of thoughts that spring to mind are:  Is there a precedent of using a hard-coded user name of "svnadmin" elsewhere?  Does it matter if it is indistinguishable from a genuine user name "svnadmin"?

My guess is that this is just a simple way of making an error message or something more friendly.  Probably no harm in it.

- Julian


> Modified: trunk/subversion/svnadmin/main.c
> ==============================================================================
> --- trunk/subversion/svnadmin/main.c	(original)
> +++ trunk/subversion/svnadmin/main.c	Thu Feb  5 10:14:46 2004
> @@ -732,9 +732,10 @@
>      }
>    else
>      {
> +      /* ### hard-coding "svnadmin" as the user-name.  */
>        SVN_ERR (svn_repos_fs_change_rev_prop 
>                 (repos, opt_state->start_revision.value.number,
> -                NULL, SVN_PROP_REVISION_LOG, log_contents, pool));
> +                "svnadmin", SVN_PROP_REVISION_LOG, log_contents, pool));
>      }
>  
>    return SVN_NO_ERROR;


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

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

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

> So it seems that "svn propset --revprop" passes a null username when
> there's no auth challenge. But having an open repository and allowing
> everybody to change revision properties aren't exactly the same
> thing.

Yeah, I realized that after sending my last mail.  So, again, I find
myself with a strong leaning.

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

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

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

> This whole problem is just an odd one to solve.

Yeah.

> Maybe passing NULL for the author
> wasn't so bad, and the revprop hooks should just look for an empty
> author name and substitute in said previously agreed upon "username of
> the administrator."

I thought about that, but...

    <Location /test>
        DAV svn
        SVNPath "C:/data/store/test"
        Order Deny,Allow
        Allow from all
    </Location>

  D:\> svn propset svn:log --revprop -r 1 "new prop" http://localhost/test
  svn: DAV request failed; it's possible that the repository's pre-revprop-change
  hook either failed or is non-existent
  svn: At least one property change failed; repository is unchanged

while:

    <Location /test>
        DAV svn
        SVNPath "C:/data/store/test"
        Order Deny,Allow
        Allow from all
        AuthType Basic
	AuthName "Subversion test"
        AuthUserFile conf/passwd
        Require valid-user
        Satisfy All
    </Location>

  D:\> svn propset svn:log --revprop -r 1 "new prop" http://localhost/test
  Authentication realm: <http://localhost:80> Subversion test
  Password for 'Juanma': *********
  property 'svn:log' set on repository revision '1'

So it seems that "svn propset --revprop" passes a null username when
there's no auth challenge. But having an open repository and allowing
everybody to change revision properties aren't exactly the same thing.

                                                                Juanma



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

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

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

> On Thu, 05 Feb 2004 23:23:03 +0000
> Julian Foad <ju...@btopenworld.com> wrote:
> 
> > Does it matter if it is indistinguishable from a genuine user name "svnadmin"?
> 
> Could matter, if the pre-revprop-change hook is set up by the admin to
> do something different for "svnadmin setlog" that "svn propset --revprop",
> discriminating by user name.
> 
> Till now, SVN didn't need a special user. But now that it does, perhaps
> it'd be wise to document it, and recommend that SVN admins set up a
> svnadmin user and use it for administrative tasks.
> 
> I know I'll do something like that, as in the repositories I'm going to
> administer, I'll be the only one with the ability to create tags, for
> example (I don't want any developer committing changes to a tag by
> accident); these tags will show up in the logs as made by user "svnadmin",
> which sort of fits in nicely (in my view :)
> 
> If having a special svnadmin user is not palatable, then there's a bit
> on an ugly asymmetry in having it just for "svnadmin setlog", so perhaps
> a --username arg to svnadmin, as suggested initially by cmpilato, would
> be better.

This whole problem is just an odd one to solve.  There are certainly
going to be instances where a Subversion repository administrator is
not himself a 'user' in that repository's project.  So neither a UID
nor a "username" as passed on the cmdline are going to be sufficient.
Though, at least with the --username option, you give the
administrator the option of using some name that's been previously
agreed upon as "the username of the administrator."

I dunno what the right thing is.  Maybe passing NULL for the author
wasn't so bad, and the revprop hooks should just look for an empty
author name and substitute in said previously agreed upon "username of
the administrator."  Yeah, I think I like that better.

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

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

Posted by Juanma Barranquero <jm...@wke.es>.
On Thu, 05 Feb 2004 23:23:03 +0000
Julian Foad <ju...@btopenworld.com> wrote:

> Does it matter if it is indistinguishable from a genuine user name "svnadmin"?

Could matter, if the pre-revprop-change hook is set up by the admin to
do something different for "svnadmin setlog" that "svn propset --revprop",
discriminating by user name.

Till now, SVN didn't need a special user. But now that it does, perhaps
it'd be wise to document it, and recommend that SVN admins set up a
svnadmin user and use it for administrative tasks.

I know I'll do something like that, as in the repositories I'm going to
administer, I'll be the only one with the ability to create tags, for
example (I don't want any developer committing changes to a tag by
accident); these tags will show up in the logs as made by user "svnadmin",
which sort of fits in nicely (in my view :)

If having a special svnadmin user is not palatable, then there's a bit
on an ugly asymmetry in having it just for "svnadmin setlog", so perhaps
a --username arg to svnadmin, as suggested initially by cmpilato, would
be better.

Just my 0.02€, as they say.

                                                                Juanma



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


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

Posted by kf...@collab.net.
"Daniel L. Rall" <dl...@finemaltcoding.com> writes:
> > Why?  I'm not saying it's wrong, just asking because no reason is
> > apparent to me, and I regard the "###" as meaning "we really should
> > fix this soon".  (Is that how other people interpret "###"?)
> 
> The ### is to visually draw attention to a comment.  It's meaning is
> contextual.

Actually, many of us have been using it to imply "todo" or "fixme", to
indicate that there's something wrong (or less-than-ideal) at this
point in the code.

I think Greg Stein first suggested that interpretation.  I know that's
how I've been using "###"; I think Mike Pilato may be using it the
same way.


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

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

Posted by "Daniel L. Rall" <dl...@finemaltcoding.com>.
Julian Foad wrote:
...
> Why?  I'm not saying it's wrong, just asking because no reason is 
> apparent to me, and I regard the "###" as meaning "we really should fix 
> this soon".  (Is that how other people interpret "###"?)

The ### is to visually draw attention to a comment.  It's meaning is contextual.


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