[Checkins] SVN: zc.buildout/branches/gotcha-annotate/ switch from option to command
Godefroid Chapelle
gotcha at bubblenet.be
Mon Jul 20 04:41:44 EDT 2009
Log message for revision 102030:
switch from option to command
Changed:
U zc.buildout/branches/gotcha-annotate/CHANGES.txt
U zc.buildout/branches/gotcha-annotate/src/zc/buildout/buildout.py
U zc.buildout/branches/gotcha-annotate/src/zc/buildout/buildout.txt
-=-
Modified: zc.buildout/branches/gotcha-annotate/CHANGES.txt
===================================================================
--- zc.buildout/branches/gotcha-annotate/CHANGES.txt 2009-07-20 08:10:20 UTC (rev 102029)
+++ zc.buildout/branches/gotcha-annotate/CHANGES.txt 2009-07-20 08:41:43 UTC (rev 102030)
@@ -1,7 +1,7 @@
Change History
**************
-- Added option -A for annotated sections. Displays sections key-value pairs
+- Added annotate command for annotated sections. Displays sections key-value pairs
along with the value origin.
1.3.0 (2009-06-22)
Modified: zc.buildout/branches/gotcha-annotate/src/zc/buildout/buildout.py
===================================================================
--- zc.buildout/branches/gotcha-annotate/src/zc/buildout/buildout.py 2009-07-20 08:10:20 UTC (rev 102029)
+++ zc.buildout/branches/gotcha-annotate/src/zc/buildout/buildout.py 2009-07-20 08:41:43 UTC (rev 102030)
@@ -118,7 +118,6 @@
'executable': sys.executable,
'log-level': 'INFO',
'log-format': '',
- 'annotate': 'false',
}, 'DEFAULT_VALUE')
@@ -179,8 +178,6 @@
self._annotated = copy.deepcopy(data)
self._raw = _unannotate(data)
- if data['buildout']['annotate'] == 'true':
- _print_annotate(self._annotated)
self._data = {}
self._parts = []
# provide some defaults before options are parsed
@@ -930,6 +927,9 @@
runsetup = setup # backward compat.
+ def annotate(self, args):
+ _print_annotate(self._annotated)
+
def __getitem__(self, section):
__doing__ = 'Getting section %s.', section
try:
@@ -1434,13 +1434,6 @@
will be started. This is especially useful for debuging recipe
problems.
- -A
-
- Display annotated sections. All sections are displayed, sorted
- alphabetically. For each section, all key-value pairs are displayed,
- sorted alphabetically, along with the origin of the value (file name or
- COMPUTED_VALUE, DEFAULT_VALUE, COMMAND_LINE_VALUE).
-
Assignments are of the form: section:option=value and are used to
provide configuration options that override those given in the
configuration file. For example, to run the buildout in offline mode,
@@ -1484,6 +1477,13 @@
The script can be given either as a script path or a path to a
directory containing a setup.py script.
+ annotate
+
+ Display annotated sections. All sections are displayed, sorted
+ alphabetically. For each section, all key-value pairs are displayed,
+ sorted alphabetically, along with the origin of the value (file name or
+ COMPUTED_VALUE, DEFAULT_VALUE, COMMAND_LINE_VALUE).
+
"""
def _help():
print _usage
@@ -1522,8 +1522,6 @@
options.append(('buildout', 'newest', 'false'))
elif op[0] == 'D':
debug = True
- elif op[0] == 'A':
- options.append(('buildout', 'annotate', 'true'))
else:
_help()
op = op[1:]
@@ -1574,6 +1572,7 @@
command = args.pop(0)
if command not in (
'install', 'bootstrap', 'runsetup', 'setup', 'init',
+ 'annotate',
):
_error('invalid command:', command)
else:
Modified: zc.buildout/branches/gotcha-annotate/src/zc/buildout/buildout.txt
===================================================================
--- zc.buildout/branches/gotcha-annotate/src/zc/buildout/buildout.txt 2009-07-20 08:10:20 UTC (rev 102029)
+++ zc.buildout/branches/gotcha-annotate/src/zc/buildout/buildout.txt 2009-07-20 08:41:43 UTC (rev 102030)
@@ -710,20 +710,18 @@
Annotated sections
------------------
-When used with the -A option, buildout displays annotated sections.
+When used with the `annotate` command, buildout displays annotated sections.
All sections are displayed, sorted alphabetically. For each section,
all key-value pairs are displayed, sorted alphabetically, along with
the origin of the value (file name or COMPUTED_VALUE, DEFAULT_VALUE,
COMMAND_LINE_VALUE).
- >>> print system(buildout+ ' -A'), # doctest: +ELLIPSIS
+ >>> print system(buildout+ ' annotate'), # doctest: +ELLIPSIS
<BLANKLINE>
Annotated sections
==================
<BLANKLINE>
[buildout]
- annotate=true
- COMMAND_LINE_VALUE
bin-directory=bin
DEFAULT_VALUE
develop=recipes
@@ -756,7 +754,6 @@
.../_TEST_/sample-buildout/buildout.cfg
<BLANKLINE>
<BLANKLINE>
- ...
Variable substitutions
----------------------
@@ -1079,7 +1076,7 @@
Annotated sections output shows which files are responsible for which
operations.
- >>> print system(os.path.join('bin', 'buildout') + ' -A'), # doctest: +ELLIPSIS
+ >>> print system(os.path.join('bin', 'buildout') + ' annotate'), # doctest: +ELLIPSIS
<BLANKLINE>
Annotated sections
==================
@@ -1718,12 +1715,6 @@
new distributions if installed distributions satisfy it's
requirements.
--A
- Display annotated sections. All sections are displayed, sorted
- alphabetically. For each section, all key-value pairs are displayed,
- sorted alphabetically, along with the origin of the value (file name or
- COMPUTED_VALUE, DEFAULT_VALUE, COMMAND_LINE_VALUE).
-
Assignments are of the form::
section_name:option_name=value
@@ -2126,7 +2117,6 @@
<BLANKLINE>
Configuration data:
[buildout]
- annotate = false
bin-directory = /sample-buildout/bin
develop-eggs-directory = /sample-buildout/develop-eggs
directory = /sample-buildout
More information about the Checkins
mailing list