Supporting configuration files in ~/.config/bazaar?

2 views
Skip to first unread message

Neil Martinsen-Burrell

unread,
Nov 2, 2010, 1:13:57 AM11/2/10
to Bazaar mailing list
I'm working on finishing off lp:~dobey/bzr/xdgconfigdir and bug #195397
(a fix has also been attempted in
lp:~j-johan-edwards/bzr/xdg_basedir_compliance) which deals with storing
configuration files in $XDG_CONFIG_DIR/bazaar on Unix (which is
~/.config/bazaar by default).

I've outlined my thoughts in
http://bazaar.launchpad.net/~nmb/bzr/xdgconfigdir/annotate/head:/doc/developers/xdg_config_spec.txt
which are that we should essentially accept both ~/.bazaar and
~/.config/bazaar for now, but tell users that we suggest they use
.config/bazaar (on Unix). lp:~nmb/bzr/xdgconfigdir has my attempts at
fixing the bug. I plan to use that branch to continue with fixing up
the docs, dealing with plugins and tests.

I post to the list because although there is some discussion on bug
#195397 about how and when we want to do this, I wanted to bring it up
to the list before I wade in and change all of the docs.

* Is this a change that Bazaar wants: ~/.bazaar -> ~/.config/bazaar?

* Should plugins live in ~/.config/bazaar? I believe that the answer is
yes. This gives an easy transition from the current structure since "mv
~/.bazaar ~/.config/bazaar" is all that is needed. In terms of the XDG
basedir specification, I think that user-installed plugins are a form of
user customization and thus belong in $XDG_CONFIG_DIR. (My in-progress
branch does not change the plugin location away from ~/.bazaar.)

* As a related but orthogonal change, should Mac OS X move to storing
its configuration in ~/Library/Application Support/Bazaar which would in
some sense be the platform-appropriate place? Or pretend to be a Unix
and use ~/.config/bazaar? In my branch, I've preserved the existing
location (~/.bazaar) on Mac OS X.

* As a coding/layering issue, outputting a user-visible warning on every
call to bzrlib.config.config_dir() leads to very ugly output: 5 or more
messages for each command. Is there an easy way to output a message
only once? I could see how to do this at the command level, but
config_dir() has no sense of context and I'm not sure what the right way
to add that context is. Warn once per day? Write a semaphore file
somewhere in the configuration directory? I suspect that if I were
truly a software developer then I would know the right way to do this,
but alas I am not.

-Neil

Robert Collins

unread,
Nov 2, 2010, 1:26:09 AM11/2/10
to Neil Martinsen-Burrell, Bazaar mailing list
On Tue, Nov 2, 2010 at 6:13 PM, Neil Martinsen-Burrell <n...@wartburg.edu> wrote:
> * Is this a change that Bazaar wants: ~/.bazaar -> ~/.config/bazaar?

I'm not terribly involved in bzr day to day these days, so please just
consider this my personal opinion.

Which is, I think that changing the config directory is much more
trouble than its worth. We've tonnes of docs built up that talk about
the old location, and a half life of years for each version, with a
tail of 4-5 years.

If we do do it, I think it would be highly sensible to plan for a
transition taking up to 5 years before the docs, help, and other tools
can really depend on the new location being the one to use.

-Rob

Robert Collins-7 [via Archive Software & Mailing List Agustinus Rustantio]

unread,
Nov 2, 2010, 1:26:58 AM11/2/10
to lekgoleksecurity
On Tue, Nov 2, 2010 at 6:13 PM, Neil Martinsen-Burrell <[hidden email]> wrote:
> * Is this a change that Bazaar wants: ~/.bazaar -> ~/.config/bazaar?

I'm not terribly involved in bzr day to day these days, so please just
consider this my personal opinion.

Which is, I think that changing the config directory is much more
trouble than its worth. We've tonnes of docs built up that talk about
the old location, and a half life of years for each version, with a
tail of 4-5 years.

If we do do it, I think it would be highly sensible to plan for a
transition taking up to 5 years before the docs, help, and other tools
can really depend on the new location being the one to use.

-Rob

--
VISIT UBUNTU MAILING LIST: https://lists.ubuntu.com/
This is only ARCHIVE,  all sender are NOT  member this group.
http://groups.google.com/group/archive-software--mailing-list-1?hl=en?hl=en
search:
http://www.ask.com/
http://www.bing.com/
http://www.google.co.id/
http://www.google.com/
http://www.google.co.in/
http://archive-software-mailing-list-agustinus-rustantio.960436.n3.nabble.com/
by:
rakhesa punjab
agustinus rustantio




Vincent Ladeuil

unread,
Nov 2, 2010, 4:51:46 AM11/2/10
to Neil Martinsen-Burrell, Bazaar mailing list
>>>>> Neil Martinsen-Burrell <n...@wartburg.edu> writes:

> I'm working on finishing off lp:~dobey/bzr/xdgconfigdir and bug
> #195397 (a fix has also been attempted in
> lp:~j-johan-edwards/bzr/xdg_basedir_compliance) which deals with
> storing configuration files in $XDG_CONFIG_DIR/bazaar on Unix
> (which is ~/.config/bazaar by default).

> I've outlined my thoughts in
> http://bazaar.launchpad.net/~nmb/bzr/xdgconfigdir/annotate/head:/doc/developers/xdg_config_spec.txt
> which are that we should essentially accept both ~/.bazaar and
> ~/.config/bazaar for now, but tell users that we suggest they use
> .config/bazaar (on Unix). lp:~nmb/bzr/xdgconfigdir has my
> attempts at fixing the bug. I plan to use that branch to
> continue with fixing up the docs, dealing with plugins and tests.

I think I'll go with an even more cautious transition plan:

* If $XDG_CONFIG_HOME exists, use it, additionally in this case if
~/.bazaar exists warn once (conditionally).

I haven't read the XDG spec but using $XDG_CONFIG_DIR for plugins sounds
fine to me.

Note that BZR_HOME defaults to ~/.bazaar/ so this should really be the
focus and all docs and help should only refer to it or to the 'bazaar
configuration directory'.

> I post to the list because although there is some discussion on
> bug #195397 about how and when we want to do this, I wanted to
> bring it up to the list before I wade in and change all of the
> docs.

> * Is this a change that Bazaar wants: ~/.bazaar -> ~/.config/bazaar?

Using the XDG spec sounds like the way to go in the long run.

One important point in this regard is that some users *will* use several
bzr versions at the same time which means we need to support *both*
directories existing.

So what if we plan the transition as:

* step 1:
ln -s ~/.bazaar ~/.config/bazaar

* step 2:
rm ~/.config/bazaar
mv ~/.bazaar ~/.config/bazaar
ln -s ~/.config/bazaar ~/.bazaar

* step 3:
rm ~/.bazaar

Which let the user control when doing which step is the most appropriate
and let us focus on updating the docs and all the plugins (also since
evrybody is supposed to use ``bzrlib.config.config_dir`` to obey
BZR_HOME, we should be fine there).

<snip/>

> * As a coding/layering issue, outputting a user-visible warning
> on every call to bzrlib.config.config_dir() leads to very ugly
> output: 5 or more messages for each command. Is there an easy
> way to output a message only once?

Look for Config.suppress_warnings... err, sorry :)

Given that accessing a local config file requires taking a lock which
itself requires getting the user name to put in the lock info file and
this user name is defined in a config file... we have already an
annoying issue there (with an existing XXX comment in _prepare_info).

But still, even with these caveats, this looks like a warning that the
user should be able to mute via the suppress_warnings configuration
option.

> I could see how to do this at the command level, but config_dir()
> has no sense of context and I'm not sure what the right way to add
> that context is. Warn once per day? Write a semaphore file
> somewhere in the configuration directory? I suspect that if I
> were truly a software developer then I would know the right way to
> do this, but alas I am not.

A static variable so that the warning is emmitted only once per bzrlib
loading seems the easiest way to go.

Vincent

Vincent Ladeuil [via Archive Software & Mailing List Agustinus Rustantio]

unread,
Nov 2, 2010, 4:52:58 AM11/2/10
to lekgoleksecurity
>>>>> Neil Martinsen-Burrell <[hidden email]> writes:

    > I'm working on finishing off lp:~dobey/bzr/xdgconfigdir and bug
    > #195397 (a fix has also been attempted in
    > lp:~j-johan-edwards/bzr/xdg_basedir_compliance) which deals with
    > storing configuration files in $XDG_CONFIG_DIR/bazaar on Unix
    > (which is ~/.config/bazaar by default).

    > I've outlined my thoughts in
    > http://bazaar.launchpad.net/~nmb/bzr/xdgconfigdir/annotate/head:/doc/developers/xdg_config_spec.txt
    > which are that we should essentially accept both ~/.bazaar and
    > ~/.config/bazaar for now, but tell users that we suggest they use
    > .config/bazaar (on Unix).  lp:~nmb/bzr/xdgconfigdir has my
    > attempts at fixing the bug.  I plan to use that branch to
    > continue with fixing up the docs, dealing with plugins and tests.

I think I'll go with an even more cautious transition plan:

* If $XDG_CONFIG_HOME exists, use it, additionally in this case if
  ~/.bazaar exists warn once (conditionally).

I haven't read the XDG spec but using $XDG_CONFIG_DIR for plugins sounds
fine to me.

Note that BZR_HOME defaults to ~/.bazaar/ so this should really be the
focus and all docs and help should only refer to it or to the 'bazaar
configuration directory'.

    > I post to the list because although there is some discussion on
    > bug #195397 about how and when we want to do this, I wanted to
    > bring it up to the list before I wade in and change all of the
    > docs.

    > * Is this a change that Bazaar wants: ~/.bazaar -> ~/.config/bazaar?

Using the XDG spec sounds like the way to go in the long run.

One important point in this regard is that some users *will* use several
bzr versions at the same time which means we need to support *both*
directories existing.

So what if we plan the transition as:

* step 1:
  ln -s ~/.bazaar ~/.config/bazaar

* step 2:
  rm ~/.config/bazaar
  mv ~/.bazaar ~/.config/bazaar
  ln -s ~/.config/bazaar  ~/.bazaar

* step 3:
  rm ~/.bazaar

Which let the user control when doing which step is the most appropriate
and let us focus on updating the docs and all the plugins (also since
evrybody is supposed to use ``bzrlib.config.config_dir`` to obey
BZR_HOME, we should be fine there).

<snip/>

    > * As a coding/layering issue, outputting a user-visible warning
    > on every call to bzrlib.config.config_dir() leads to very ugly
    > output: 5 or more messages for each command.  Is there an easy
    > way to output a message only once?

Look for Config.suppress_warnings... err, sorry :)

Given that accessing a local config file requires taking a lock which
itself requires getting the user name to put in the lock info file and
this user name is defined in a config file... we have already an
annoying issue there (with an existing XXX comment in _prepare_info).

But still, even with these caveats, this looks like a warning that the
user should be able to mute via the suppress_warnings configuration
option.

    > I could see how to do this at the command level, but config_dir()
    > has no sense of context and I'm not sure what the right way to add
    > that context is.  Warn once per day?  Write a semaphore file
    > somewhere in the configuration directory?  I suspect that if I
    > were truly a software developer then I would know the right way to
    > do this, but alas I am not.

A static variable so that the warning is emmitted only once per bzrlib
loading seems the easiest way to go.

        Vincent

Eli Zaretskii

unread,
Nov 2, 2010, 7:00:32 AM11/2/10
to Neil Martinsen-Burrell, baz...@lists.canonical.com
> Date: Tue, 02 Nov 2010 00:13:57 -0500
> From: Neil Martinsen-Burrell <n...@wartburg.edu>

>
> I'm working on finishing off lp:~dobey/bzr/xdgconfigdir and bug #195397
> (a fix has also been attempted in
> lp:~j-johan-edwards/bzr/xdg_basedir_compliance) which deals with storing
> configuration files in $XDG_CONFIG_DIR/bazaar on Unix (which is
> ~/.config/bazaar by default).
>
> I've outlined my thoughts in
> http://bazaar.launchpad.net/~nmb/bzr/xdgconfigdir/annotate/head:/doc/developers/xdg_config_spec.txt
> which are that we should essentially accept both ~/.bazaar and
> ~/.config/bazaar for now, but tell users that we suggest they use
> .config/bazaar (on Unix). lp:~nmb/bzr/xdgconfigdir has my attempts at
> fixing the bug. I plan to use that branch to continue with fixing up
> the docs, dealing with plugins and tests.
>
> I post to the list because although there is some discussion on bug
> #195397 about how and when we want to do this, I wanted to bring it up
> to the list before I wade in and change all of the docs.

Thanks for bringing this up. Please note that what's below is merely
a POV of a naive (albeit heavy) user of Bazaar on several machines and
OSes.

What bothers me in your suggestions is that bzr will annoy me. I'm
quite sure it will also annoy others. Why should a tool (and a nice
tool such as bzr) bitch at me for not being conformant to the hot new
whiz-bang standards someone invented? A tool should _support_ new
standards, but it shouldn't _enforce_ them, IMO.

So I'd say adopt this part:

* If both ~/.bazaar and $XDG_CONFIG_HOME/bazaar exist:

- Use the config files in $XDG_CONFIG_HOME/bazaar with a warning that
those in ~/.bazaar are being ignored.

and _only_ this part, and keep it forever, i.e. not just during the
"Transitional Phase". A user who knows what she is doing (e.g.,
because she has multiple bzr versions installed, or for some other
good reason) will simply ignore the warning. (Even better, it would
be nice to have a branch.conf option to silence the warning
completely.) A user who forgot to move to the new brave world by
accident will notice the warning and clean up her act. A user who
doesn't _want_ to go "back to the future" should be left to her own
devices, because what possible harm could be done by that?

> * Is this a change that Bazaar wants: ~/.bazaar -> ~/.config/bazaar?

I think Bazaar should want to support it. But it doesn't need to
enforce such a migration.

> * Should plugins live in ~/.config/bazaar? I believe that the answer is
> yes. This gives an easy transition from the current structure since "mv
> ~/.bazaar ~/.config/bazaar" is all that is needed. In terms of the XDG
> basedir specification, I think that user-installed plugins are a form of
> user customization and thus belong in $XDG_CONFIG_DIR.

I believe you meant either $XDG_CONFIG_HOME or $XDG_CONFIG_DIRS.

FWIW, I'm not sure that a plugin fits the "config" category. It's not
a configuration file. Don't they have $XDG_PLUGIN_HOME? ;-)

> * As a coding/layering issue, outputting a user-visible warning on every
> call to bzrlib.config.config_dir() leads to very ugly output: 5 or more
> messages for each command. Is there an easy way to output a message
> only once?

Just don't warn at all. It's an annoyance that users don't deserve.

Max Bowsher

unread,
Nov 2, 2010, 7:22:17 AM11/2/10
to baz...@lists.canonical.com
On 02/11/10 05:13, Neil Martinsen-Burrell wrote:
> * Is this a change that Bazaar wants: ~/.bazaar -> ~/.config/bazaar?

What is the rationale for considering this change?

I'm all for compliance with specifications when it makes sense to do so,
*BUT* I find it difficult to see what benefit this particular
specification is trying to bring.

Key points to me that make ~/.bazaar/ different from many other
applications' dotfiles which I would more readily see the point in
moving are:

* Intermediate and advanced users are fully expected to have
considerable manual interaction with ~/.bazaar/ - a prominent and short
name helps.

* ~/.bazaar/plugins/ isn't exactly "configuration" in the true sense.

On top of that, the necessary amount of documentation and compatibility
work to manage a transition here is rather large.

What's the payoff from moving this directory to justify all the work,
and Bazaar users worldwide needing to retrain their fingers?


Sorry to be so negative, but I'm just not seeing the advantage here,
Max.

signature.asc

Andrew Cowie

unread,
Nov 2, 2010, 8:09:45 AM11/2/10
to baz...@lists.canonical.com
On Tue, 2010-11-02 at 18:26 +1300, Robert Collins wrote:
> Which is, I think that changing the config directory is much more
> trouble than its worth. We've tonnes of docs built up that talk about
> the old location, and a half life of years for each version, with a
> tail of 4-5 years.

That may be so, but the request to make Bazaar standards compliant was
filed a long ago. At the time you said it was too hard. You've already
lost several years. The sooner you transition to the proper XDG
locations, the sooner your 5 year decay clock will start. And meanwhile,
people using Linux on a 6 month cycle will only have to wait... 6
months! for Bazaar to behave like a good citizen and for the problem to
go away.

AfC
Granada

signature.asc

Eli Zaretskii [via Archive Software & Mailing List Agustinus Rustantio]

unread,
Nov 2, 2010, 8:18:21 AM11/2/10
to lekgoleksecurity
> Date: Tue, 02 Nov 2010 00:13:57 -0500
> From: Neil Martinsen-Burrell <[hidden email]>
>
> I'm working on finishing off lp:~dobey/bzr/xdgconfigdir and bug #195397
> (a fix has also been attempted in
> lp:~j-johan-edwards/bzr/xdg_basedir_compliance) which deals with storing
> configuration files in $XDG_CONFIG_DIR/bazaar on Unix (which is
> ~/.config/bazaar by default).
>
> I've outlined my thoughts in
> http://bazaar.launchpad.net/~nmb/bzr/xdgconfigdir/annotate/head:/doc/developers/xdg_config_spec.txt 
> which are that we should essentially accept both ~/.bazaar and
> ~/.config/bazaar for now, but tell users that we suggest they use
> .config/bazaar (on Unix).  lp:~nmb/bzr/xdgconfigdir has my attempts at
> fixing the bug.  I plan to use that branch to continue with fixing up
> the docs, dealing with plugins and tests.
>
> I post to the list because although there is some discussion on bug
> #195397 about how and when we want to do this, I wanted to bring it up
> to the list before I wade in and change all of the docs.
Thanks for bringing this up.  Please note that what's below is merely
a POV of a naive (albeit heavy) user of Bazaar on several machines and
OSes.

What bothers me in your suggestions is that bzr will annoy me.  I'm
quite sure it will also annoy others.  Why should a tool (and a nice
tool such as bzr) bitch at me for not being conformant to the hot new
whiz-bang standards someone invented?  A tool should _support_ new
standards, but it shouldn't _enforce_ them, IMO.

So I'd say adopt this part:

  * If both ~/.bazaar and $XDG_CONFIG_HOME/bazaar exist:

    - Use the config files in $XDG_CONFIG_HOME/bazaar with a warning that
      those in ~/.bazaar are being ignored.

and _only_ this part, and keep it forever, i.e. not just during the
"Transitional Phase".  A user who knows what she is doing (e.g.,
because she has multiple bzr versions installed, or for some other
good reason) will simply ignore the warning.  (Even better, it would
be nice to have a branch.conf option to silence the warning
completely.)  A user who forgot to move to the new brave world by
accident will notice the warning and clean up her act.  A user who
doesn't _want_ to go "back to the future" should be left to her own
devices, because what possible harm could be done by that?

> * Is this a change that Bazaar wants: ~/.bazaar -> ~/.config/bazaar?

I think Bazaar should want to support it.  But it doesn't need to
enforce such a migration.

> * Should plugins live in ~/.config/bazaar?  I believe that the answer is
> yes.  This gives an easy transition from the current structure since "mv
> ~/.bazaar ~/.config/bazaar" is all that is needed.  In terms of the XDG
> basedir specification, I think that user-installed plugins are a form of
> user customization and thus belong in $XDG_CONFIG_DIR.

I believe you meant either $XDG_CONFIG_HOME or $XDG_CONFIG_DIRS.

FWIW, I'm not sure that a plugin fits the "config" category.  It's not
a configuration file.  Don't they have $XDG_PLUGIN_HOME? ;-)

> * As a coding/layering issue, outputting a user-visible warning on every
> call to bzrlib.config.config_dir() leads to very ugly output: 5 or more
> messages for each command.  Is there an easy way to output a message
> only once?

Just don't warn at all.  It's an annoyance that users don't deserve.

Max Bowsher [via Archive Software & Mailing List Agustinus Rustantio]

unread,
Nov 2, 2010, 8:20:51 AM11/2/10
to lekgoleksecurity
On 02/11/10 05:13, Neil Martinsen-Burrell wrote:
> * Is this a change that Bazaar wants: ~/.bazaar -> ~/.config/bazaar?

What is the rationale for considering this change?

I'm all for compliance with specifications when it makes sense to do so,
*BUT* I find it difficult to see what benefit this particular
specification is trying to bring.

Key points to me that make ~/.bazaar/ different from many other
applications' dotfiles which I would more readily see the point in
moving are:

* Intermediate and advanced users are fully expected to have
considerable manual interaction with ~/.bazaar/ - a prominent and short
name helps.

* ~/.bazaar/plugins/ isn't exactly "configuration" in the true sense.

On top of that, the necessary amount of documentation and compatibility
work to manage a transition here is rather large.

What's the payoff from moving this directory to justify all the work,
and Bazaar users worldwide needing to retrain their fingers?


Sorry to be so negative, but I'm just not seeing the advantage here,
Max.



signature.asc (205 bytes) Download Attachment



Andrew Cowie [via Archive Software & Mailing List Agustinus Rustantio]

unread,
Nov 2, 2010, 8:27:45 AM11/2/10
to lekgoleksecurity
On Tue, 2010-11-02 at 18:26 +1300, Robert Collins wrote:
> Which is, I think that changing the config directory is much more
> trouble than its worth. We've tonnes of docs built up that talk about
> the old location, and a half life of years for each version, with a
> tail of 4-5 years.

That may be so, but the request to make Bazaar standards compliant was
filed a long ago. At the time you said it was too hard. You've already
lost several years. The sooner you transition to the proper XDG
locations, the sooner your 5 year decay clock will start. And meanwhile,
people using Linux on a 6 month cycle will only have to wait... 6
months! for Bazaar to behave like a good citizen and for the problem to
go away.

AfC
Granada


signature.asc (205 bytes) Download Attachment



Vincent Ladeuil

unread,
Nov 2, 2010, 11:05:10 AM11/2/10
to Vincent Ladeuil, Bazaar mailing list
>>>>> Vincent Ladeuil <v.lade...@free.fr> writes:

<snip/>

> Given that accessing a local config file requires taking a lock which
> itself requires getting the user name to put in the lock info file and
> this user name is defined in a config file... we have already an
> annoying issue there (with an existing XXX comment in _prepare_info).

Meh, reality check: getting the user name from the config file doesn't
require a lock, so things aren't that complicated.

Sorry for the noise,

Vincent

Vincent Ladeuil [via Archive Software & Mailing List Agustinus Rustantio]

unread,
Nov 2, 2010, 11:06:37 AM11/2/10
to lekgoleksecurity
>>>>> Vincent Ladeuil <[hidden email]> writes:

<snip/>

    > Given that accessing a local config file requires taking a lock which
    > itself requires getting the user name to put in the lock info file and
    > this user name is defined in a config file... we have already an
    > annoying issue there (with an existing XXX comment in _prepare_info).

Meh, reality check: getting the user name from the config file doesn't
require a lock, so things aren't that complicated.

Sorry for the noise,

      Vincent


jbo...@amathaine.com

unread,
Nov 2, 2010, 5:02:50 PM11/2/10
to Max Bowsher, baz...@lists.canonical.com
On Wed, Nov 3, 2010 at 12:22 AM, Max Bowsher <ma...@f2s.com> wrote:
>
> What's the payoff from moving this directory to justify all the work,
> and Bazaar users worldwide needing to retrain their fingers?
>

Well, users on other platforms or running multiple versions already
have to type other paths anyway. Documentation should always refer to
BZR_HOME anyways so long as Bazaar is cross-platform. We're just
setting a new default value for BZR_HOME; hopefully the release notes
will remind to explicitly set it if you want to continue to use the
old location.

The payoff is that all the admin tools people use will now work
correctly with Bazaar since it follows XDG standards - things like
user migrations, backups, and provisioning new accounts will be a bit
more seamless.

jbowtie@amathaine.com [via Archive Software & Mailing List Agustinus Rustantio]

unread,
Nov 2, 2010, 5:04:20 PM11/2/10
to lekgoleksecurity
On Wed, Nov 3, 2010 at 12:22 AM, Max Bowsher <[hidden email]> wrote:
>
> What's the payoff from moving this directory to justify all the work,
> and Bazaar users worldwide needing to retrain their fingers?
>

Well, users on other platforms or running multiple versions already
have to type other paths anyway. Documentation should always refer to
BZR_HOME anyways so long as Bazaar is cross-platform. We're just
setting a new default value for BZR_HOME; hopefully the release notes
will remind to explicitly set it if you want to continue to use the
old location.

The payoff is that all the admin tools people use will now work
correctly with Bazaar since it follows XDG standards - things like
user migrations, backups, and provisioning new accounts will be a bit
more seamless.

Andrew Bennetts

unread,
Nov 2, 2010, 7:39:57 PM11/2/10
to jbo...@amathaine.com, baz...@lists.canonical.com

And I think that “~/.config/bazaar” is less likely to be confused with
“.bzr” directories (which is a pretty small benefit, but it was one that
I was wishing for recently).

I'm personally about +0 on this change: if we can manage the transition
so that virtually no user is nagged by bzr to change something that was
already working just fine (I agree with Eli's mail), and someone cares
enough to write the patch, then I think we may as well do it.

-Andrew.


Andrew Bennetts [via Archive Software & Mailing List Agustinus Rustantio]

unread,
Nov 2, 2010, 7:41:15 PM11/2/10
to lekgoleksecurity
[hidden email] wrote:
And I think that “~/.config/bazaar” is less likely to be confused with
“.bzr” directories (which is a pretty small benefit, but it was one that
I was wishing for recently).

I'm personally about +0 on this change: if we can manage the transition
so that virtually no user is nagged by bzr to change something that was
already working just fine (I agree with Eli's mail), and someone cares
enough to write the patch, then I think we may as well do it.

-Andrew.


Martin Pool

unread,
Nov 14, 2010, 10:55:48 PM11/14/10
to Eli Zaretskii, baz...@lists.canonical.com

I agree with what Eli said above. Note that, unlike the earlier
proposal, this is checking specifically for the 'bazaar' directory
within it.

>
>> * Should plugins live in ~/.config/bazaar?  I believe that the answer is
>> yes.  This gives an easy transition from the current structure since "mv
>> ~/.bazaar ~/.config/bazaar" is all that is needed.  In terms of the XDG
>> basedir specification, I think that user-installed plugins are a form of
>> user customization and thus belong in $XDG_CONFIG_DIR.
>
> I believe you meant either $XDG_CONFIG_HOME or $XDG_CONFIG_DIRS.
>
> FWIW, I'm not sure that a plugin fits the "config" category.  It's not
> a configuration file.  Don't they have $XDG_PLUGIN_HOME? ;-)

I agree, it seems questionable to put what may be platform-specific
binaries in there.

>> * As a coding/layering issue, outputting a user-visible warning on every
>> call to bzrlib.config.config_dir() leads to very ugly output: 5 or more
>> messages for each command.  Is there an easy way to output a message
>> only once?
>
> Just don't warn at all.  It's an annoyance that users don't deserve.

Right, this is something very few users would thank us for warning
them about. Anyone who feels strongly about XDG compliance will
probably have set things up that way themselves, and will be happy if
we just read it.

--
Martin

Neil Martinsen-Burrell

unread,
Nov 15, 2010, 11:45:59 AM11/15/10
to Martin Pool, baz...@lists.canonical.com
On 2010-11-14 21:55 , Martin Pool wrote:
> On 2 November 2010 22:00, Eli Zaretskii<el...@gnu.org> wrote:

[...]

>> So I'd say adopt this part:
>>
>> * If both ~/.bazaar and $XDG_CONFIG_HOME/bazaar exist:
>>
>> - Use the config files in $XDG_CONFIG_HOME/bazaar with a warning that
>> those in ~/.bazaar are being ignored.
>>
>> and _only_ this part, and keep it forever, i.e. not just during the
>> "Transitional Phase". A user who knows what she is doing (e.g.,
>> because she has multiple bzr versions installed, or for some other
>> good reason) will simply ignore the warning. (Even better, it would
>> be nice to have a branch.conf option to silence the warning
>> completely.) A user who forgot to move to the new brave world by
>> accident will notice the warning and clean up her act. A user who
>> doesn't _want_ to go "back to the future" should be left to her own
>> devices, because what possible harm could be done by that?
>>
>>> * Is this a change that Bazaar wants: ~/.bazaar -> ~/.config/bazaar?
>>
>> I think Bazaar should want to support it. But it doesn't need to
>> enforce such a migration.
>
> I agree with what Eli said above. Note that, unlike the earlier
> proposal, this is checking specifically for the 'bazaar' directory
> within it.

This is what I have implemented in
https://code.launchpad.net/~nmb/bzr/xdgconfigdir/+merge/40888,
with no user-visible warning. The warning goes into ~/.bzr.log.

>>> * Should plugins live in ~/.config/bazaar? I believe that the answer is
>>> yes. This gives an easy transition from the current structure since "mv
>>> ~/.bazaar ~/.config/bazaar" is all that is needed. In terms of the XDG
>>> basedir specification, I think that user-installed plugins are a form of
>>> user customization and thus belong in $XDG_CONFIG_DIR.
>>
>> I believe you meant either $XDG_CONFIG_HOME or $XDG_CONFIG_DIRS.
>>
>> FWIW, I'm not sure that a plugin fits the "config" category. It's not
>> a configuration file. Don't they have $XDG_PLUGIN_HOME? ;-)
>
> I agree, it seems questionable to put what may be platform-specific
> binaries in there.

I have punted on this, suggesting in doc/developers/xdg_spec.txt that
people can use BZR_PLUGINS_PATH if they would like something different.

>>> * As a coding/layering issue, outputting a user-visible warning on every
>>> call to bzrlib.config.config_dir() leads to very ugly output: 5 or more
>>> messages for each command. Is there an easy way to output a message
>>> only once?
>>
>> Just don't warn at all. It's an annoyance that users don't deserve.
>
> Right, this is something very few users would thank us for warning
> them about. Anyone who feels strongly about XDG compliance will
> probably have set things up that way themselves, and will be happy if
> we just read it.

As mentioned above, the fact that we are not using ~/.bazaar is
mentioned in ~/.bzr.log, not in any user-visible way.

-Neil

Reply all
Reply to author
Forward
0 new messages