[Checkins] SVN: zc.buildout/trunk/ Bug fixed:

Jim Fulton jim at zope.com
Sat Aug 29 12:28:50 EDT 2009


Log message for revision 103389:
  Bug fixed:
  - Incrementing didn't work properly when extending multiple files.
    https://bugs.launchpad.net/zc.buildout/+bug/421022
  

Changed:
  U   zc.buildout/trunk/CHANGES.txt
  U   zc.buildout/trunk/src/zc/buildout/buildout.py
  U   zc.buildout/trunk/src/zc/buildout/tests.py

-=-
Modified: zc.buildout/trunk/CHANGES.txt
===================================================================
--- zc.buildout/trunk/CHANGES.txt	2009-08-29 15:41:23 UTC (rev 103388)
+++ zc.buildout/trunk/CHANGES.txt	2009-08-29 16:28:49 UTC (rev 103389)
@@ -1,6 +1,14 @@
 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)
 ==================
 

Modified: zc.buildout/trunk/src/zc/buildout/buildout.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/buildout.py	2009-08-29 15:41:23 UTC (rev 103388)
+++ zc.buildout/trunk/src/zc/buildout/buildout.py	2009-08-29 16:28:49 UTC (rev 103389)
@@ -1329,10 +1329,10 @@
 
     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(

Modified: zc.buildout/trunk/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/tests.py	2009-08-29 15:41:23 UTC (rev 103388)
+++ zc.buildout/trunk/src/zc/buildout/tests.py	2009-08-29 16:28:49 UTC (rev 103389)
@@ -2586,6 +2586,47 @@
       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', '''



More information about the checkins mailing list