I've not tested the patch *extensively*, but simple testing shows stuff
working as expected. +1 to commit.
Senthil Kumaran S wrote:
> Hi Mike,
>
> Thanks for your review, my comments inline.
>
> C. Michael Pilato wrote:
>> I have a question, though -- should the 'servers' file "win" over the
>> auth cache in terms of priority? Seems to me that the auth cache --
>> which typically is populated with known-good credentials, should be
>> given precedence over the 'servers' file. That would allow me to put
>> "cmpilato" in the [global] section of my servers file and yet not have
>> that contradict creds in the auth cache which use a different username.
>
>> In fact, I guess I kinda expected to see code something like this:
>
>> creds = check-auth-cache
>> if (! creds)
>> creds = check-servers-file
>> if (! creds)
>> creds = apr_getusername()
>
>> With such an ordering, the servers file effectively becomes just a way
>> to override the username assumption.
>
> This sounds like a good ordering to me. I ve updated the patch accordingly and
> attached along with this email.
>
>> But maybe this discussion was already played out previously and I missed
>> it?
>
> No we didnt had a discussion about this. We had discussions whether to have
> username option in config file or the servers file.
>
> [[[
> Fix issue #2324: Disable username assumption.
>
> Rather than disabling the username assumption, this takes the
> different approach of consulting the runtime configuration for a
> default username before falling back to other methods (which include
> using the current user id's name).
>
> The order in which default username is determined is as follows:
> 1. username supplied in command line
> 2. username in the auth cache
> 3. username given in servers file
> 4. current user id's name
>
> * subversion/include/svn_config.h
> (SVN_CONFIG_OPTION_USERNAME): New config option.
>
> * subversion/libsvn_subr/config_file.c
> (svn_config_ensure): Add text about the new config file parameter 'username'.
>
> * subversion/libsvn_subr/simple_providers.c
> (simple_first_creds_helper, prompt_for_simple_creds): Try to find a
> username in the 'servers' file.
>
> Patch by: stylesen
> Suggested by: glasser
> cmpilato
> Review by: cmpilato
> ]]]
>
--
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Received on 2008-08-07 17:31:08 CEST