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

RE: Re: config files on Windows

From: Bill Tutt <rassilon_at_lyra.org>
Date: 2002-03-27 00:21:37 CET

> From: Branko Cibej [mailto:brane@xbc.nu]
>
> Branko Èibej wrote:
>
> > I think I'm finally seeing a light at the end if this tunnel. On
> > Windows, the Registry is obviously the preferred location for
> > configuration data. Typically, only developers will want to use a
file
> > (because editing the registry by hand is a royal pain). So I'd
suggest
> > we load the configuration in this order:
> >
> > * System-wide
> >
> >
(HKEY_LOCAL_MACHINE\Software\Tigris.org\Subversion\{config,proxy,...}
> > * User-specific
> >
(HKEY_CURRENT_USER\Software\Tigris.org\Subversion\{config,proxy,...}
> >
> > Then we look at the options in the config "file" to see if there are
> > more files to load. I'd even suggest a windows-specific section in
the
> > config file, like this:
> >
> > [windows-cruft]
> > use-config-dir = C:/my-home-dir/.subversion
>
> BTW, the nice thing about this is that, if I hack the Registry parser
to
> accept REG_EXPAND_SZ options, one can actually write
>
> use-config-dir = %APPDATA%/Subversion
>
> and automagically get the right directory. Yes, I know this brings env
> var dependencies ...
>
> > (or rather, that would be
> > HKEY_CURRENT_USER\Software\Tigris.org\Subversion\config\windows-
> cruft:use-config-dir)
> >
> >
> > Then, if that option exists, try to load the file from that
directory.
> >
> > I'll code this up if people agree.
> >
> >

I'm actually starting to buy into the "put user-config data" into the
file system argument. Migrating configuration options between machines,
etc becomes an absolute pain if it's in the registry. Life is slightly
better if you put it in the path retrieved via:
        SHGetSpecialFolderPathW(NULL, wszPath, CSIDL_APPDATA, TRUE)
with "\Subversion" appended to the value you retrieve in wszPath.

However, that still sucks, but just slightly less than the registry.
My suggestion is to use .subversion/... and the above paths to store the
data, and then add appropriate sub-commands to the svn binary to kick
off $EDITOR to alter the data. That way you never have to care about
where the data is stored, and it's always stored in the same format.

Proxy detection on Win32 is a completely different issue that needs to
be eventually taken care of, but now isn't the time for that. :)

Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 27 00:22:26 2002

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.