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
Thomas Leymonerie
slapos.buildout
Commits
8ce62d5e
Commit
8ce62d5e
authored
Mar 14, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bug_605017'
Conflicts: src/zc/buildout/tests.py
parents
22dfd469
f0bb1e70
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
1 deletion
+98
-1
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+2
-1
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+96
-0
No files found.
src/zc/buildout/buildout.py
View file @
8ce62d5e
...
...
@@ -1312,6 +1312,7 @@ class Options(UserDict.DictMixin):
if
'<'
in
self
.
_raw
:
self
.
_raw
=
self
.
_do_extend_raw
(
name
,
self
.
_raw
,
[])
self
.
_raw
.
pop
(
'<'
)
# force substitutions
for
k
,
v
in
self
.
_raw
.
items
():
...
...
@@ -1340,7 +1341,7 @@ class Options(UserDict.DictMixin):
raise
zc
.
buildout
.
UserError
(
"Infinite extending loop %r"
%
name
)
doing
.
append
(
name
)
try
:
to_do
=
data
.
pop
(
'<'
,
None
)
to_do
=
data
.
get
(
'<'
,
None
)
if
to_do
is
None
:
return
data
__doing__
=
'Loading input sections for %r'
,
name
...
...
src/zc/buildout/tests.py
View file @
8ce62d5e
...
...
@@ -3702,6 +3702,102 @@ def bug_664539_recipe_updating_options_dict():
data='${value}'
recipe='zc.buildout:debug'
"""
def
test_other_section_extend_precedence
():
r"""
>>> write('buildout.cfg', '''
... [buildout]
... parts = myfiles
...
... [debug]
... recipe = zc.buildout:debug
... file1 = ${:path}/file1
... color = red
...
... [myfiles]
... <= debug
... path = mydata
... color = green
... ''')
>>> print system(buildout),
Installing myfiles.
color='green'
file1='mydata/file1'
path='mydata'
recipe='zc.buildout:debug'
"""
def
test_same_section_extend_precedence
():
r"""
>>> write('bar.cfg', '''
... [myfiles]
... recipe = zc.buildout:debug
... file1 = ${:path}/file1
... color = red
... ''')
>>> write('buildout.cfg', '''
... [buildout]
... extends = bar.cfg
... parts = myfiles
...
... [myfiles]
... path = mydata
... color = green
... ''')
>>> print system(buildout),
Installing myfiles.
color='green'
file1='mydata/file1'
path='mydata'
recipe='zc.buildout:debug'
"""
def
bug_605017_reuse_extending_section
():
r"""
>>> write('buildout.cfg', '''
... [buildout]
... parts = myfiles
... myfiles2
...
... [debug]
... recipe = zc.buildout:debug
...
... [with_file1]
... <= debug
... file1 = ${:path}/file1
... color = red
...
... [with_file2]
... <= debug
... file2 = ${:path}/file2
... color = blue
...
... [myfiles]
... <= with_file1
... with_file2
... path = mydata
...
... [myfiles2]
... <= with_file1
... with_file2
... path = mydata2
... ''')
>>> print system(buildout),
Installing myfiles.
color='blue'
file1='mydata/file1'
file2='mydata/file2'
path='mydata'
recipe='zc.buildout:debug'
Installing myfiles2.
color='blue'
file1='mydata2/file1'
file2='mydata2/file2'
path='mydata2'
recipe='zc.buildout:debug'
"""
######################################################################
...
...
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