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

Re: [PATCH] optionally use $SVN_USERNAME as login

From: Branko Čibej <brane_at_xbc.nu>
Date: 2005-07-23 17:33:05 CEST

kfogel@collab.net wrote:

>Branko Čibej <brane@xbc.nu> writes:
>
>
>>bd@bc-bd.org wrote:
>>
>>
>>>[please CC me as I am not on the list]
>>>
>>>Abstract
>>>
>>> Sometimes users share a working copy. It would be nice to not have to
>>> type --username all the time, or re-enter the username at the prompt.
>>>
>>>Proposal
>>>
>>> I wrote a small patch (attached) to set a default login using an
>>> environment variable called SVN_USERNAME. It will be overridden by a
>>> passed --username option:
>>>
>>>
>>Bah. This isn't worth the bother of making a patch (and maintaining
>>the code indefinitely). Instead, put this into your ~/.profile:
>>
>> alias svn="/usr/bin/svn --username=`id -un`"
>>
>>
>
>I'm not sure I agree. People know about setting environment
>variables, plus CVS has $CVS_USER. Aliasing 'svn' to a complex
>command involving backticks is much less intuitive. And, as Ben
>pointed out, it won't work for commands that don't accept
>'--username'.
>
>
Well, this particular alias is nonsense, since `id -un` is exactly what
SVN assumes is the username anyway. It was merely an illustration.

>I haven't reviewed the patch, but I was planning to (if no one beat me
>to it), and assuming it's good apply it. Would you, or anyone else,
>have objections to this?
>
>
Yes, I do. I don't want to add more dependencies on environment
variables. And anyway, Subversion will cache the username and password
associated with a particular repository, so in reality you'll only have
to pass --username the first time you need authn info.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 23 17:32:14 2005

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