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

config dir and svn_config_walk_auth_data

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Fri, 26 Jul 2013 19:19:54 +0200


In TSVN I'm using the API svn_config_walk_auth_data(). Unfortunately,
I'm passing NULL as the first parameter (the config dir path).
Back when I implemented this, passing NULL worked just fine. Now it
doesn't anymore - I forgot to test this with the 1.8.0 release, my fault.

The reason that passing NULL doesn't work are these few lines right at
the beginning of svn_config_walk_auth_data:
   if (! config_dir)
       /* Can't locate the cache to clear */
       return SVN_NO_ERROR;

my question is: why?
Because if that check is removed, passing NULL works just fine because
all the other APIs where the config dir is passed as a parameter then
just find the default config dir path themselves. Why doesn't

Sure, I could use the Windows API to determine the default config path
myself, but that means I would have to make an assumption about where
that path is - meaning if the svn lib ever changes that I would have to
change it as well. In my opinion, svn knows best where it stores the
config data by default and should act accordingly.

May I suggest to remove the check mentioned above? Simply removing it is
enough to make this work: passing NULL as the config dir path would then
mean to use the default, just in the other svn APIs that take the config
dir path as a parameter.


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest interface to (Sub)version control
    /_/   \_\     http://tortoisesvn.net
Received on 2013-07-26 19:20:34 CEST

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