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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
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
Hide 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):
...
@@ -218,14 +218,14 @@ def _annotate(data, note):
return
data
return
data
def
_print_annotate
(
data
,
verbose
,
chosen_section
,
basedir
):
def
_print_annotate
(
data
,
verbose
,
chosen_section
s
,
basedir
):
sections
=
list
(
data
.
keys
())
sections
=
list
(
data
.
keys
())
sections
.
sort
()
sections
.
sort
()
print_
()
print_
()
print_
(
"Annotated sections"
)
print_
(
"Annotated sections"
)
print_
(
"="
*
len
(
"Annotated sections"
))
print_
(
"="
*
len
(
"Annotated sections"
))
for
section
in
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_
()
print_
(
'[%s]'
%
section
)
print_
(
'[%s]'
%
section
)
keys
=
list
(
data
[
section
].
keys
())
keys
=
list
(
data
[
section
].
keys
())
...
@@ -1236,11 +1236,11 @@ class Buildout(DictMixin):
...
@@ -1236,11 +1236,11 @@ class Buildout(DictMixin):
def
annotate
(
self
,
args
=
None
):
def
annotate
(
self
,
args
=
None
):
verbose
=
self
[
'buildout'
].
get
(
'verbosity'
,
0
)
<>
0
verbose
=
self
[
'buildout'
].
get
(
'verbosity'
,
0
)
<>
0
section
=
None
section
=
None
if
args
:
if
args
is
None
:
for
arg
in
args
:
sections
=
[]
if
arg
.
startswith
(
'--section'
)
:
else
:
_
,
section
=
arg
.
split
(
"="
)
sections
=
args
_print_annotate
(
self
.
_annotated
,
verbose
,
section
,
self
.
_buildout_dir
)
_print_annotate
(
self
.
_annotated
,
verbose
,
section
s
,
self
.
_buildout_dir
)
def
print_options
(
self
,
base_path
=
None
):
def
print_options
(
self
,
base_path
=
None
):
for
section
in
sorted
(
self
.
_data
):
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::
...
@@ -1018,9 +1018,9 @@ You get more information about the way values are computed::
...
...
The output of the ``annotate`` command can be very long.
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
... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
<BLANKLINE>
<BLANKLINE>
Annotated sections
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