/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/developers/xdg_config_spec.txt

  • Committer: Vincent Ladeuil
  • Date: 2012-01-18 14:09:19 UTC
  • mto: This revision was merged to the branch mainline in revision 6468.
  • Revision ID: v.ladeuil+lp@free.fr-20120118140919-rlvdrhpc0nq1lbwi
Change set/remove to require a lock for the branch config files.

This means that tests (or any plugin for that matter) do not requires an
explicit lock on the branch anymore to change a single option. This also
means the optimisation becomes "opt-in" and as such won't be as
spectacular as it may be and/or harder to get right (nothing fails
anymore).

This reduces the diff by ~300 lines.

Code/tests that were updating more than one config option is still taking
a lock to at least avoid some IOs and demonstrate the benefits through
the decreased number of hpss calls.

The duplication between BranchStack and BranchOnlyStack will be removed
once the same sharing is in place for local config files, at which point
the Stack class itself may be able to host the changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Transitioning Unix installs to the XDG Base Directory Specification
 
2
===================================================================
 
3
 
 
4
Currently, Bazaar stores its configuration files and plugins under the
 
5
directory ~/.bazaar on unix installs.  On Windows, this is
 
6
%APPDATA%/Bazaar/2.0 and on Mac OS X, the directory is ~/.bazaar.  With the
 
7
XDG Base Directory specification
 
8
(http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html), many
 
9
Linux and Unix platforms have tried to centralize configuration files under a
 
10
specific directory referred to as $XDG_CONFIG_HOME.  This has a default value
 
11
of ~/.config.
 
12
 
 
13
Bazaar would like to be a good Unix citizen by using these standard locations
 
14
for configuration files.  As such, we should support that location, but not
 
15
require it.  Note that the following descriptions do not apply
 
16
to Windows or Mac OS X which should use their own native configuration
 
17
locations.  (On Windows, we currently do this by working under %APPDATA%.  The
 
18
Mac OS X equivalent would be ~/Library/Application Support/Bazaar but there is
 
19
also cultural support for ~/.bazaar on that platform.)
 
20
 
 
21
* If $XDG_CONFIG_HOME/bazaar exists, use the files there for configuration,
 
22
  noting in the log that we are doing so.  This allows individuals who would
 
23
  like to use the XDG specification to do so.
 
24
* Due to a lack of consensus on where plugins should live under the XDG Base
 
25
  Directory spec, continue to look for plugins in ~/.bazaar/plugins.  To
 
26
  change this directory to something not under ~/.bazaar, use the environment
 
27
  variable $BZR_PLUGIN_PATH.