Commit 128252a5 authored by Jim Fulton's avatar Jim Fulton

Bug fixed:

- Incrementing didn't work properly when extending multiple files.
  https://bugs.launchpad.net/zc.buildout/+bug/421022
parent 4d2db646
Change History
**************
1.?.? (2008-0?-??)
==================
Bugs fixed:
- Incrementing didn't work properly when extending multiple files.
https://bugs.launchpad.net/zc.buildout/+bug/421022
1.4.1 (2009-08-27)
==================
......
......@@ -1329,10 +1329,10 @@ def _open(base, filename, seen, dl_options, override):
if extends:
extends = extends.split()
extends.reverse()
eresult = _open(base, extends.pop(0), seen, dl_options, override)
for fname in extends:
result = _update(_open(base, fname, seen, dl_options, override),
result)
_update(eresult, _open(base, fname, seen, dl_options, override))
result = _update(eresult, result)
if extended_by:
self._logger.warn(
......
......@@ -2586,6 +2586,47 @@ def increment_buildout_options():
recipe='zc.buildout:debug'
"""
def increment_buildout_with_multiple_extended_files_421022():
r"""
>>> write('foo.cfg', '''
... [buildout]
... foo-option = foo
... [other]
... foo-option = foo
... ''')
>>> write('bar.cfg', '''
... [buildout]
... bar-option = bar
... [other]
... bar-option = bar
... ''')
>>> write('buildout.cfg', '''
... [buildout]
... parts = p other
... extends = bar.cfg foo.cfg
... bar-option += baz
... foo-option += ham
...
... [other]
... recipe = zc.buildout:debug
... bar-option += baz
... foo-option += ham
...
... [p]
... recipe = zc.buildout:debug
... x = ${buildout:bar-option} ${buildout:foo-option}
... ''')
>>> print system(buildout),
Installing p.
recipe='zc.buildout:debug'
x='bar\nbaz foo\nham'
Installing other.
bar-option='bar\nbaz'
foo-option='foo\nham'
recipe='zc.buildout:debug'
"""
def increment_on_command_line():
r"""
>>> write('buildout.cfg', '''
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment