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

Re: svn commit - (no author)

From: v4r4n <console.cowboy_at_gmail.com>
Date: 2004-10-13 22:39:30 CEST

So the body of my script is back to:

REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"

if [ "$PROPNAME" = "svn:log" ]; then exit 0; fi
echo "Failing due to wrong property"
exit 1

-but I still only get:

$ svn propset -r 9 --revprop svn:author "author"
svn: 'pre-revprop-change' hook failed with error output:

$

"Failing due to wrong property" is not displayed since the script
probably isn't being executed at all for some reason.

On Wed, 13 Oct 2004 21:01:28 +0100 (BST), Patrick Smears
<patrick.smears@ensoft.co.uk> wrote:
> On Wed, 13 Oct 2004, v4r4n wrote:
>
> > My pre-revprop-change script is just the original pre-revprop-change.tmpl with:
> >
> > REPOS="file:///example/svn/repo/project/trunk"
> > REV="9"
> > USER="author"
> > PROPNAME="svn:author"
>
> This sets the variable 'PROPNAME' to 'svn:author'.
>
> > if [ "$PROPNAME" = "svn:log" ]; then exit 0; fi
> > exit 1
>
> This checks that the variable 'PROPNAME' is equal to 'svn:log' (which it
> isn't, because it's just been set to 'svn:author' :-), and returns
> success(0) if it is, and failure(1) otherwise - so it will always return
> failure. You may be able to verify this by adding the line
>
> echo "Failing due to wrong property"
>
> before the "exit 1".
>
> You want to keep the original:
>
> > REPOS="$1"
> > REV="$2"
> > USER="$3"
> > PROPNAME="$4"
>
> ... as this basically just gives friendly names to the parameters that
> subversion passes to the script.
>
> (Of course as Karl pointed out you'll need to have the script be
> executable, too...)
>
> Patrick
> --
> The easy way to type accents in Windows: http://www.frkeys.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

-- 
Druin Estrus - www.druinestrus.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Oct 13 22:40:22 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.