XDG Base Directory Support
From: Earnestly <zibeon_at_googlemail.com>
Date: Thu, 17 Sep 2015 23:29:54 +0100
Hello,
This is a proposal for supporting the XDG Base Directory Specification[1] in
Subversion by default creates its configuration and cache data under
This can be controlled via the --config-dir option in a wrapper script or
In order to adopt this specification (which has superseded its initial
* HOME/.subversion/config -> XDG_CONFIG_HOME/subversion/config
* HOME/.subversion/auth -> XDG_DATA_HOME/subversion/auth
[You may not need to include the auth directory itself if moved to
Subversion would first look for HOME/.subversion and if it doesn't exist
Here the XDG_CONFIG_HOME and XDG_DATA_HOME variables are environmental and are
For XDG_CONFIG_HOME this is defined as HOME/.config and for XDG_DATA_HOME this
I have summarised the use of XDG environment variables here:
It is important to note that the XDG_*_HOME environments should contain an
The key here is that installations which already have a HOME/.subversion will
[In the above reference I have included links to various commits from
An example for handling the latter half might look like this:
[In bad C, sorry about that :-(]
/* if HOME/.subversion does not exist then do the following: */
const char path[4096] = {0};
if (home && home[0] == '/')
else {
/* Here we would use "%s/.local/share/%s" for XDG_DATA_HOME */
return path;
1 http://standards.freedesktop.org/basedir-spec/latest/
|
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.