[Checkins]
SVN: Products.GenericSetup/branches/1.4/Products/GenericSetup/
Merge r85168 from trunk
Wichert Akkerman
wichert at wiggy.net
Tue Apr 8 17:13:11 EDT 2008
Log message for revision 85170:
Merge r85168 from trunk
Changed:
U Products.GenericSetup/branches/1.4/Products/GenericSetup/CHANGES.txt
U Products.GenericSetup/branches/1.4/Products/GenericSetup/tests/test_tool.py
U Products.GenericSetup/branches/1.4/Products/GenericSetup/tool.py
-=-
Modified: Products.GenericSetup/branches/1.4/Products/GenericSetup/CHANGES.txt
===================================================================
--- Products.GenericSetup/branches/1.4/Products/GenericSetup/CHANGES.txt 2008-04-08 21:11:57 UTC (rev 85169)
+++ Products.GenericSetup/branches/1.4/Products/GenericSetup/CHANGES.txt 2008-04-08 21:13:10 UTC (rev 85170)
@@ -2,7 +2,10 @@
GenericSetup 1.4.1-beta (unreleased)
+ - When loading multiple profiles reload the list of steps to use after
+ each import. https://bugs.launchpad.net/zope-cmf/+bug/213905
+
GenericSetup 1.4.0 (2008/03/23)
- Make getProfileImportDate handle situations where one object's id
Modified: Products.GenericSetup/branches/1.4/Products/GenericSetup/tests/test_tool.py
===================================================================
--- Products.GenericSetup/branches/1.4/Products/GenericSetup/tests/test_tool.py 2008-04-08 21:11:57 UTC (rev 85169)
+++ Products.GenericSetup/branches/1.4/Products/GenericSetup/tests/test_tool.py 2008-04-08 21:13:10 UTC (rev 85170)
@@ -539,6 +539,37 @@
self.assertEqual(_imported, [self._PROFILE_PATH2, self._PROFILE_PATH])
+ def test_runAllImportStepsFromProfileStepRegistrationWithDepends( self ):
+ from Products.GenericSetup.metadata import METADATA_XML
+
+ self._makeFile(METADATA_XML, _METADATA_XML)
+
+ _IMPORT_STEPS_XML = """<?xml version="1.0"?>
+<import-steps>
+ <import-step id="one"
+ version="1"
+ handler="Products.GenericSetup.tests.common.dummy_handler"
+ title="One Step">
+ One small step
+ </import-step>
+</import-steps>
+"""
+ self._makeFile('import_steps.xml', _IMPORT_STEPS_XML)
+
+ site = self._makeSite()
+ tool = self._makeOne('setup_tool').__of__( site )
+
+ profile_registry.registerProfile('foo', 'Foo', '', self._PROFILE_PATH)
+ profile_registry.registerProfile('bar', 'Bar', '', self._PROFILE_PATH2)
+
+ result = tool.runAllImportStepsFromProfile('profile-other:foo',
+ ignore_dependencies=False)
+
+ # ensure the additional step on foo was imported
+ self.failUnless('one' in result['steps'])
+
+
+
def test_runExportStep_nonesuch( self ):
site = self._makeSite()
Modified: Products.GenericSetup/branches/1.4/Products/GenericSetup/tool.py
===================================================================
--- Products.GenericSetup/branches/1.4/Products/GenericSetup/tool.py 2008-04-08 21:11:57 UTC (rev 85169)
+++ Products.GenericSetup/branches/1.4/Products/GenericSetup/tool.py 2008-04-08 21:13:10 UTC (rev 85170)
@@ -1166,12 +1166,15 @@
results = []
+ detect_steps = steps is None
+
for profile_id in chain:
context = self._getImportContext(profile_id, purge_old, archive)
self.applyContext(context)
- if steps is None:
+ if detect_steps:
steps = self.getSortedImportSteps()
+
messages = {}
event.notify(BeforeProfileImportEvent(self, profile_id, steps, True))
More information about the Checkins
mailing list