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

Re: Access right question

From: Branden Robinson <branden_at_deadbeast.net>
Date: 2003-06-25 10:49:39 CEST

On Fri, Jun 20, 2003 at 04:45:44PM +0200, Sander Striker wrote:
> Use a simple wrapper:
>
> #!/bin/sh
> umask 002
> /path/to/real/svn "$@"

Picking some shell nits here:

1) I'd prefix that last line with "exec" and save a slot in the process
   table.
2) I personally don't use "$@" when I am not parsing the argument list.
   That is because "$@" actually changes the internal quoting of the arg
   list and $* does not.

Consider the following:

% cat ./foosh
#!/bin/sh

for F in "$*"; do
        echo "$F"
done

for F in "$@"; do
        echo "$F"
done
% ./foosh one two "three four"
one two three four
one
two
three four

Because our wrapper is not itself attempting to make sense of the
argument list, it should pass on the user's instructions about what the
arguments are to svn completely unmolested.

This might be important if people are keeping filenames with embedded
spaces or shell metacharacters under version control with Subversion.

-- 
G. Branden Robinson            |       It just seems to me that you are
Free Software Developer        |       willfully entering an arse-kicking
branden@deadbeast.net          |       contest with a monstrous entity
http://deadbeast.net/~branden/ |       that has sixteen legs and no arse.

  • application/pgp-signature attachment: stored
Received on Wed Jun 25 10:50:27 2003

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.