Merge lp:~vila/bzr/996401-doc-config into lp:bzr

Proposed by Vincent Ladeuil
Status: Merged
Approved by: John A Meinel
Approved revision: no longer in the source branch.
Merged at revision: 6562
Proposed branch: lp:~vila/bzr/996401-doc-config
Merge into: lp:bzr
Diff against target: 94 lines (+44/-7)
3 files modified
bzrlib/config.py (+11/-7)
doc/en/release-notes/bzr-2.6.txt (+3/-0)
doc/en/user-guide/configuring_bazaar.txt (+30/-0)
To merge this branch: bzr merge lp:~vila/bzr/996401-doc-config
Reviewer Review Type Date Requested Status
John A Meinel Approve
Review via email: mp+124984@code.launchpad.net

Commit message

Clarify option references expansion for `bzr config`.

Description of the change

This addresses bug #996401 by clarifying the command online help especially
around when option references are expanded.

Option references are described in bzrlib/help_topics/en/configuration.txt
which still seems to be the best place for that.

To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 9/18/2012 8:42 PM, Vincent Ladeuil wrote:
> Vincent Ladeuil has proposed merging lp:~vila/bzr/996401-doc-config
> into lp:bzr.
>
> Requested reviews: bzr-core (bzr-core) Related bugs: Bug #996401 in
> Bazaar: "'bzr config' fails to display config templates referring
> to "unknown" options" https://bugs.launchpad.net/bzr/+bug/996401
>
> For more details, see:
> https://code.launchpad.net/~vila/bzr/996401-doc-config/+merge/124984
>
> This addresses bug #996401 by clarifying the command online help
> especially around when option references are expanded.
>
> Option references are described in
> bzrlib/help_topics/en/configuration.txt which still seems to be the
> best place for that.
>

 merge: approve

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlBZTLgACgkQJdeBCYSNAAN6VgCfaopIU9M+UmUrNToA77LE02jS
s38An2lcvtTnYDUApvJrf5qJh1cd/wIz
=1j3N
-----END PGP SIGNATURE-----

review: Approve
Revision history for this message
Vincent Ladeuil (vila) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bzrlib/config.py'
--- bzrlib/config.py 2012-09-17 08:45:19 +0000
+++ bzrlib/config.py 2012-09-18 16:46:28 +0000
@@ -4085,17 +4085,21 @@
4085class cmd_config(commands.Command):4085class cmd_config(commands.Command):
4086 __doc__ = """Display, set or remove a configuration option.4086 __doc__ = """Display, set or remove a configuration option.
40874087
4088 Display the active value for a given option.4088 Display the active value for option NAME.
40894089
4090 If --all is specified, NAME is interpreted as a regular expression and all4090 If --all is specified, NAME is interpreted as a regular expression and all
4091 matching options are displayed mentioning their scope. The active value4091 matching options are displayed mentioning their scope and without resolving
4092 that bzr will take into account is the first one displayed for each option.4092 option references in the value). The active value that bzr will take into
40934093 account is the first one displayed for each option.
4094 If no NAME is given, --all .* is implied.4094
40954095 If NAME is not given, --all .* is implied (all options are displayed for the
4096 Setting a value is achieved by using name=value without spaces. The value4096 current scope).
4097
4098 Setting a value is achieved by using NAME=value without spaces. The value
4097 is set in the most relevant scope and can be checked by displaying the4099 is set in the most relevant scope and can be checked by displaying the
4098 option again.4100 option again.
4101
4102 Removing a value is achieved by using --remove NAME.
4099 """4103 """
41004104
4101 takes_args = ['name?']4105 takes_args = ['name?']
41024106
=== modified file 'doc/en/release-notes/bzr-2.6.txt'
--- doc/en/release-notes/bzr-2.6.txt 2012-09-14 17:22:35 +0000
+++ doc/en/release-notes/bzr-2.6.txt 2012-09-18 16:46:28 +0000
@@ -63,6 +63,9 @@
6363
64.. Improved or updated documentation.64.. Improved or updated documentation.
6565
66* Clarify ``bzr config`` usages especially around other option references
67 expansion. (Vincent Ladeuil, #996401)
68
66API Changes69API Changes
67***********70***********
6871
6972
=== modified file 'doc/en/user-guide/configuring_bazaar.txt'
--- doc/en/user-guide/configuring_bazaar.txt 2011-05-02 08:15:59 +0000
+++ doc/en/user-guide/configuring_bazaar.txt 2012-09-18 16:46:28 +0000
@@ -129,6 +129,13 @@
129Each configuration file is associated with a given scope whose name is129Each configuration file is associated with a given scope whose name is
130displayed before each set of defined options.130displayed before each set of defined options.
131131
132If you need to look at a specific option, you can use::
133
134 bzr config <option>
135
136This will display only the option value and is intended to be used in
137scripts.
138
132Modifying the active configuration139Modifying the active configuration
133----------------------------------140----------------------------------
134141
@@ -136,6 +143,29 @@
136143
137 bzr config opt=value144 bzr config opt=value
138145
146An option value can reference another option by enclosing it in curly
147braces::
148
149 bzr config opt={other_opt}/subdir
150
151If ``other_opt`` is set to ``'root``, ``bzr config opt`` will display::
152
153 root/subdir
154
155Note that when ``--all`` is used, the references are left as-is to better
156reflect the content of the config files and make it easier to organize them::
157
158 bzr config --all .*opt
159
160 bazaar:
161 [DEFAULT]
162 opt = {other_opt}/subdir
163 other_opt = root
164
165
166
167
168
139To remove an option use::169To remove an option use::
140170
141 bzr config --remove opt171 bzr config --remove opt