Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xavier Thompson
slapos.buildout
Commits
0df253e2
Commit
0df253e2
authored
Mar 07, 2017
by
Godefroid Chapelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow more sections
avoid --section flag
parent
385955ac
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+7
-7
src/zc/buildout/buildout.txt
src/zc/buildout/buildout.txt
+2
-2
No files found.
src/zc/buildout/buildout.py
View file @
0df253e2
...
...
@@ -218,14 +218,14 @@ def _annotate(data, note):
return
data
def
_print_annotate
(
data
,
verbose
,
chosen_section
,
basedir
):
def
_print_annotate
(
data
,
verbose
,
chosen_section
s
,
basedir
):
sections
=
list
(
data
.
keys
())
sections
.
sort
()
print_
()
print_
(
"Annotated sections"
)
print_
(
"="
*
len
(
"Annotated sections"
))
for
section
in
sections
:
if
(
not
chosen_section
)
or
(
section
==
chosen_section
):
if
(
not
chosen_section
s
)
or
(
section
in
chosen_sections
):
print_
()
print_
(
'[%s]'
%
section
)
keys
=
list
(
data
[
section
].
keys
())
...
...
@@ -1236,11 +1236,11 @@ class Buildout(DictMixin):
def
annotate
(
self
,
args
=
None
):
verbose
=
self
[
'buildout'
].
get
(
'verbosity'
,
0
)
<>
0
section
=
None
if
args
:
for
arg
in
args
:
if
arg
.
startswith
(
'--section'
)
:
_
,
section
=
arg
.
split
(
"="
)
_print_annotate
(
self
.
_annotated
,
verbose
,
section
,
self
.
_buildout_dir
)
if
args
is
None
:
sections
=
[]
else
:
sections
=
args
_print_annotate
(
self
.
_annotated
,
verbose
,
section
s
,
self
.
_buildout_dir
)
def
print_options
(
self
,
base_path
=
None
):
for
section
in
sorted
(
self
.
_data
):
...
...
src/zc/buildout/buildout.txt
View file @
0df253e2
...
...
@@ -1018,9 +1018,9 @@ You get more information about the way values are computed::
...
The output of the ``annotate`` command can be very long.
You can restrict
output to a single section with the ``--section`` flag
::
You can restrict
the output to some sections by passing section names as arguments
::
>>> print_(system(buildout+ ' annotate
--section=
versions'), end='')
>>> print_(system(buildout+ ' annotate versions'), end='')
... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
<BLANKLINE>
Annotated sections
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment