--username and --password everywhere?

C. Michael Pilato cmpilato at red-bean.com
Sun Dec 16 21:51:32 CST 2007

Brian W. Fitzpatrick wrote:
> Clearly I missed an email conversation somewhere, but I can't make
> sense of why so many commands now take all these auth options, eg:
> add
> +  --parents                : add intermediate parents
> +  --username ARG           : specify a username ARG
> +  --password ARG           : specify a password ARG
> +  --no-auth-cache          : do not cache authentication tokens
> +  --non-interactive        : do no interactive prompting
> Can someone please take mercy on me and fill me in as to when svn add
> needs auth?

IIRC, folks got tired of the fact that wrapper scripts (such as our own test
suite) had to constantly deal with the fact that some commands took those
options and some didn't, and the ones that didn't would error when the
options were provided.  In other words, you couldn't write a wrapper script
like this which automatically tacks auth creds onto any 'svn' invocation:

   svn --username cmpilato --password mypassword --non-interactive $@

You'd have to add some kind of logic to parse the requested subcommand and
figure out if that subcommand accepted the auth-related options, etc.

C. Michael Pilato <cmpilato at red-bean.com>

"The Christian ideal has not been tried and found wanting.  It has
 been found difficult; and left untried."  -- G. K. Chesterton

More information about the svnbook-dev mailing list