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

Re: Typo in documentation for svnsync

From: Steve Axthelm <steveax_at_gmail.com>
Date: 2007-02-26 07:09:11 CET

On 2/25/07, Ryan Schmidt <subversion-2007a@ryandesign.com> wrote:

> On Feb 25, 2007, at 01:53, Steve Axthelm wrote:
>
> > Linked off the current release notes are notes for svnsync:
> >
> > http://svn.collab.net/repos/svn/trunk/notes/svnsync.txt
> >
> > On line 23 is this:
> >
> > if [ "$USER" = "svnsync" ]; then exit 0; fi
> >
> > which I believe should be:
> >
> > if [ "$USER" != "svnsync" ]; then exit 0; fi
>
> I dunno, it seems to me that the script is exactly correct as provided:
>
>
> $ cat <<'EOF' > dest/hooks/pre-revprop-change
> #!/bin/sh
> USER="$3"
>
> if [ "$USER" = "svnsync" ]; then exit 0; fi
>
> echo "Only the svnsync user can change revprops" >&2
> exit 1
> EOF
>
>
> The intention is that if the user is svnsync, then the script should
> exit with no error and allow the revprop change to proceed. Any other
> user, however, should receive the message that they are not allowed
> to make revision property changes. And I believe the script does that
> correctly.

You know, explained that way, I agree with you, but using it as:

if [ "$USER" = "svnsync" ]; then exit 0; fi

Results in:

--------------------------------------------------------------------------------
svnsync: 'pre-revprop-change' hook failed with error output:
Only the svnsync user can change revprops
--------------------------------------------------------------------------------

Changing it to:

if [ "$USER" != "svnsync" ]; then exit 0; fi

Results in:

--------------------------------------------------------------------------------
Committed revision 6.
Copied properties for revision 6.
--------------------------------------------------------------------------------

Here's my generified sync command:

svnsync sync --username svnsync svn+ssh://me@foo.host.com/svn/project

I agree it doesn't make sense but am at a loss to explain it.

-- 
-Steve
Received on Mon Feb 26 07:09:36 2007

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.