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

Re: [PATCH] Minor shell script syntax error in notes/svnsync.txt

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-12-19 20:50:27 CET

On Dec 19, 2007 1:20 AM, era eriksson <era+gmane@iki.fi> wrote:
> I hope I am following the letter and spirit of the bug-reporting instructions
> http://subversion.tigris.org/project_issues.html correctly here.
>
> There is a minor quoting issue in the shell script in
> http://svn.collab.net/repos/svn/trunk/notes/svnsync.txt which this patch
> attempts to fix. Basically, the backslash-escaping of shell variables in a
> single-quoted here document is hypercorrect (fancy word for "wrong"). I suspect
> the single quotes were added later without adjusting the rest of the script.
>
> Do I still need to report this as a bug once somebody confirms, or is this
> sufficient?

Heh. So something like this (which is either "commit immediately or
never") isn't a big enough deal for an issue in the issue tracker.
Ironically this one already has an issue, though, #3033, which was the
patch you are recommending to revert.

Daniel, are you sure your patch was correct?

--dave

> [[[
> Fix shell script quoting error in svnsync pre-revprop-change example
>
> * notes/svnsync.txt: no escaping of $ in single-quoted here document
> ]]]
>
> Index: notes/svnsync.txt
> ===================================================================
> --- notes/svnsync.txt (revision 28552)
> +++ notes/svnsync.txt (working copy)
> @@ -18,9 +18,9 @@
>
> $ cat <<'EOF' > dest/hooks/pre-revprop-change
> #!/bin/sh
> -USER="\$3"
> +USER="$3"
>
> -if [ "\$USER" = "svnsync" ]; then exit 0; fi
> +if [ "$USER" = "svnsync" ]; then exit 0; fi
>
> echo "Only the svnsync user can change revprops" >&2
> exit 1
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 19 20:50:42 2007

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

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