You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Juanma Barranquero <jm...@wke.es> on 2004/02/03 14:33:36 UTC
Arguments to pre-revprop-change-hook when running svnadmin setlog
I already mentioned the problem in a message on users@ about two months
ago, with no answer. That message contained two issues and the first one
was discussed, so I'm not claiming I was ignored, just that the second
issue went unnoticed :)
http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=3267
Summary: I want to do "svnadmin setlog" and change the log message for a
given revision, *running* the pre-revprop-change hook. I can't. The
problem is that I cannot get pre-revprop-change hooks to receive four
arguments (as the docs state) when invoked through "svnadmin setlog".
The hook runs fine via "svn propset svn:log --propset", but "svnadmin
setlog" does not send the username.
AFAICS svnadmin has no --no-auth-cache, --username or other
security-related arguments, so I don't see a way to force svnadmin to
send the third argument.
Yes, I know I can run "svnadmin --bypass-hooks setlog", but, what if I
*don't* want to bypass the hook but, in fact, execute it (so it records
the change in a log, for example)?
I'm running SVN 0.37.0 (client and server) on W2K/XP systems; no idea
whether that's a Windows-specific issue, though.
BTW, in the same thread Karl mildly agreed on the goodness of changing
the doc in hooks/pre-commit-hook.tmpl to acknowledge that there's no
harm in modifying non-versioned properties on the pre-commit hook:
http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=3276
Thanks,
Juanma
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Arguments to pre-revprop-change-hook when running svnadmin setlog
Posted by "C. Michael Pilato" <cm...@collab.net>.
kfogel@collab.net writes:
> "C. Michael Pilato" <cm...@collab.net> writes:
> > It's a weird situation because the author names should be in the
> > Subversion username namespace. I mean, I could have a Subversion
> > username of 'cmpilato' and a login name (UID) of something totally
> > different.
>
> They're often similar or the same. A good compromise might be
>
> "(UID) cmpilato"
Actually, that would be a terrible compromise, because I don't want to
get email from "(UID) cmpilato@tigris.org". :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Arguments to pre-revprop-change-hook when running svnadmin setlog
Posted by kf...@collab.net.
"C. Michael Pilato" <cm...@collab.net> writes:
> It's a weird situation because the author names should be in the
> Subversion username namespace. I mean, I could have a Subversion
> username of 'cmpilato' and a login name (UID) of something totally
> different.
They're often similar or the same. A good compromise might be
"(UID) cmpilato"
to indicate the identity while warning that it may be different from
the svn username.
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Arguments to pre-revprop-change-hook when running svnadmin setlog
Posted by "C. Michael Pilato" <cm...@collab.net>.
Juanma Barranquero <jm...@wke.es> writes:
> On 05 Feb 2004 09:13:38 -0600
> "C. Michael Pilato" <cm...@collab.net> wrote:
>
> > So... what's the solution? Do we pass a static name like "svnadmin"
> > through as the username? Do we get the UID of the current user?
>
> The UID of the current user is what I would prefer, but it's not
> very relevant (to me, anyway).
It's a weird situation because the author names should be in the
Subversion username namespace. I mean, I could have a Subversion
username of 'cmpilato' and a login name (UID) of something totally
different.
> What's important is being able to do svnadmin setlog and get the
> hooks run (because I do some log formatting, etc.).
On this point, we agree.
So, I think I'll just hard-code "svnadmin" for right now.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Arguments to pre-revprop-change-hook when running svnadmin setlog
Posted by Juanma Barranquero <jm...@wke.es>.
On 05 Feb 2004 09:13:38 -0600
"C. Michael Pilato" <cm...@collab.net> wrote:
> So... what's the solution? Do we pass a static name like "svnadmin"
> through as the username? Do we get the UID of the current user?
The UID of the current user is what I would prefer, but it's not
very relevant (to me, anyway). What's important is being able to do
svnadmin setlog and get the hooks run (because I do some log formatting,
etc.).
Juanma
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Arguments to pre-revprop-change-hook when running svnadmin
setlog
Posted by Ben Collins-Sussman <su...@collab.net>.
On Thu, 2004-02-05 at 09:13, C. Michael Pilato wrote:
> So... what's the solution? Do we pass a static name like "svnadmin"
> through as the username? Do we get the UID of the current user?
>
> I'm thinking that the best thing to do is to add a --username option.
> And should it be a required parameter when not bypassing hooks? I
> dunno...
Honestly, the 'username' in this scenario isn't very important, it's not
going to be stored in any sort of history. It's just a fleeting bit of
information that you see in a rev-prop-change email. I'm fine with just
hardcoding 'svnadmin'.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Arguments to pre-revprop-change-hook when running svnadmin setlog
Posted by "C. Michael Pilato" <cm...@collab.net>.
Juanma Barranquero <jm...@wke.es> writes:
> I already mentioned the problem in a message on users@ about two months
> ago, with no answer. That message contained two issues and the first one
> was discussed, so I'm not claiming I was ignored, just that the second
> issue went unnoticed :)
That happens from time to time.
> Summary: I want to do "svnadmin setlog" and change the log message for a
> given revision, *running* the pre-revprop-change hook. I can't. The
> problem is that I cannot get pre-revprop-change hooks to receive four
> arguments (as the docs state) when invoked through "svnadmin setlog".
> The hook runs fine via "svn propset svn:log --propset", but "svnadmin
> setlog" does not send the username.
You are absolutely right. And now you've explained a mystery to me --
why I get propchange emails from "@tigris.org". When I added the
--bypass-hooks and made svnadmin use the hooks system by default, I
must have just punted on the author issue (as you can see, I pass NULL
for that argument in svnadmin/main.c:737).
So... what's the solution? Do we pass a static name like "svnadmin"
through as the username? Do we get the UID of the current user?
I'm thinking that the best thing to do is to add a --username option.
And should it be a required parameter when not bypassing hooks? I
dunno...
Thoughts, anyone?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org