Commit Graph

12 Commits

Author SHA1 Message Date
Andrew Halberstadt
a90c230261 Bug 1255450 - mach settings documentation fix, DONTBUILD, r=me
MozReview-Commit-ID: AQ3w2oCPQeN
2016-04-12 21:03:36 -04:00
Andrew Halberstadt
f7dae1b34e Bug 1255450 - [mach] Create setting for defining command aliases, r=gps
These config options can be defined in ~/.mozbuild/machrc or topsrcdir/machrc.
Aliases work similar to the identically named option in an hgrc.

For example:

[alias]
browser-test = mochitest -f browser
mochitest = mochitest -f plain


MozReview-Commit-ID: CnOocEslRUI
2016-03-23 17:34:35 -04:00
Andrew Halberstadt
a2a7da69c0 Bug 1255450 - [mach] Enable runtime configuration files, r=gps
Runtime configs have been implemented for awhile, but disabled. This patch
enables configuration. Config files will be loaded in the following order
(later files override earlier ones):

1a. $MACHRC
1b. $MOZBUILD_STATE_PATH/machrc (if $MACHRC is unset)
2. topsrcdir/machrc
3. CLI via --settings

Note: .machrc may be used instead of machrc if desired.

MozReview-Commit-ID: IntONAZLGML
2016-03-28 11:18:24 -04:00
Andrew Halberstadt
3597e612f4 Bug 1255450 - [mach] Simplify managing of locale documentation for settings, r=gps
This adds a |mach settings locale-gen| subcommand to automatically generate locale
specific documentation for settings. It also refactors |mach settings-create| to
|mach settings| and moves |mach settings| to |mach settings -l|. Finally it performs
some misc cleanup mostly related to locales.

MozReview-Commit-ID: 1VWLcb9ehAH
2016-03-23 17:49:15 -04:00
Andrew Halberstadt
550a486738 Bug 1255450 - [mach] Implement 'wildcard' settings for enabling sections with user-defined options, r=gps
Some sections should support user-defined options. For example, in an [alias] section, the option names
are not well-defined, rather specified by the user. This patch allows user-defined option names for any
section that has a 'section.*' option defined. Even with 'section.*', option types are still well-defined.

MozReview-Commit-ID: L34W9v9Fy28
2016-03-28 10:52:16 -04:00
Andrew Halberstadt
c0ba13e745 Bug 1255450 - [mach] Replace ConfigProvider class with config_settings attribute, r=gps
Defining settings was a little complicated. First it required overriding a '_register_settings'
method, and then it required making N calls to a second 'register_setting' method within that.

This patch simplifies the process of defining settings by only requiring a
'config_settings' attribute. This attribute should be a list of tuples:

[
  ('<section>.<option>', '<type>', <default>, set(<choices)),
]

`default` and `choices` are optional. Alternatively, 'config_settings' can be a callable
that returns a list of tuples in the same format. This still allows for greater flexibility
for more advanced cases.

MozReview-Commit-ID: F4DTTNJdJsa
2016-03-21 17:55:41 -04:00
Gregory Szorc
5724222212 Bug 1115278 - Fix mach documentation issues; r=glandium
terminal.py had an ambiguous |import logging| that was importing
mach.logging from Sphinx. We fix it.

There was also a poorly formed link in the mach commands documentation.
We fix it.
2014-12-24 10:26:34 -08:00
Gregory Szorc
5c9c715038 Bug 1108399 - Introduce decorator for mach sub-commands; r=ahal
With this patch, we now have the ability to declare mach sub-commands.
Subsequent patches will implement dispatching for sub-commands.
2014-12-07 11:40:39 -08:00
Gregory Szorc
5af0c6abf1 Bug 1108399 - Properly link to Python docs; r=ahal
There were a few parts of the docs that were linking to Python types
incorrectly. Let's fix that.
2014-12-07 11:37:54 -08:00
Gregory Szorc
bfe6799d76 Bug 1108399 - Split mach documentation into multiple articles; r=ahal
The main mach docs page is a bit long. Let's split it into multiple
articles to increase readability going forward.
2014-12-07 11:34:06 -08:00
Gregory Szorc
39a76e34a5 Bug 1108399 - Improve code linking in mach docs; r=ahal
Now that mach's docs are part of a proper Sphinx install, link to
Python type docs. While we're here, we also clean up formatting of code
samples.
2014-12-07 11:23:46 -08:00
Gregory Szorc
907c3c2ef9 Bug 1108399 - Move mach docs into sphinx; r=ahal
mach has restructured text documentation. Let's expose it to the in-tree
Sphinx config so we can increase visibility of the documentation.
2014-12-07 10:40:19 -08:00