[CMF-checkins] SVN: CMF/trunk/CMF - renamed typestool.xml to types.xml (it was the only one with 'tool' in the name and didn't match the name of the related folder)

Yvo Schubbe y.2005- at wcm-solutions.de
Fri Dec 16 13:46:35 EST 2005


Log message for revision 40822:
  - renamed typestool.xml to types.xml (it was the only one with 'tool' in the name and didn't match the name of the related folder)

Changed:
  A   CMF/trunk/CMFCalendar/profiles/default/types.xml
  D   CMF/trunk/CMFCalendar/profiles/default/typestool.xml
  U   CMF/trunk/CMFCore/exportimport/tests/test_typeinfo.py
  U   CMF/trunk/CMFCore/exportimport/typeinfo.py
  A   CMF/trunk/CMFDefault/profiles/default/types.xml
  D   CMF/trunk/CMFDefault/profiles/default/typestool.xml
  A   CMF/trunk/CMFTopic/profiles/default/types.xml
  D   CMF/trunk/CMFTopic/profiles/default/typestool.xml

-=-
Copied: CMF/trunk/CMFCalendar/profiles/default/types.xml (from rev 40818, CMF/trunk/CMFCalendar/profiles/default/typestool.xml)

Deleted: CMF/trunk/CMFCalendar/profiles/default/typestool.xml
===================================================================
--- CMF/trunk/CMFCalendar/profiles/default/typestool.xml	2005-12-16 18:46:32 UTC (rev 40821)
+++ CMF/trunk/CMFCalendar/profiles/default/typestool.xml	2005-12-16 18:46:35 UTC (rev 40822)
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<object name="portal_types" meta_type="CMF Types Tool">
- <object name="Event" meta_type="Factory-based Type Information"/>
-</object>

Modified: CMF/trunk/CMFCore/exportimport/tests/test_typeinfo.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/tests/test_typeinfo.py	2005-12-16 18:46:32 UTC (rev 40821)
+++ CMF/trunk/CMFCore/exportimport/tests/test_typeinfo.py	2005-12-16 18:46:35 UTC (rev 40822)
@@ -495,7 +495,7 @@
 
         self.assertEqual(len(context._wrote), 1)
         filename, text, content_type = context._wrote[0]
-        self.assertEqual(filename, 'typestool.xml')
+        self.assertEqual(filename, 'types.xml')
         self._compareDOM(text, _EMPTY_TOOL_EXPORT)
         self.assertEqual(content_type, 'text/xml')
 
@@ -508,7 +508,7 @@
 
         self.assertEqual(len(context._wrote), 3)
         filename, text, content_type = context._wrote[0]
-        self.assertEqual(filename, 'typestool.xml')
+        self.assertEqual(filename, 'types.xml')
         self._compareDOM(text, _NORMAL_TOOL_EXPORT)
         self.assertEqual(content_type, 'text/xml')
 
@@ -531,7 +531,7 @@
 
         self.assertEqual(len(context._wrote), 3)
         filename, text, content_type = context._wrote[0]
-        self.assertEqual(filename, 'typestool.xml')
+        self.assertEqual(filename, 'types.xml')
         self._compareDOM(text, _FILENAME_EXPORT)
         self.assertEqual(content_type, 'text/xml')
         filename, text, content_type = context._wrote[2]
@@ -559,7 +559,7 @@
         self.assertEqual(len(tool.objectIds()), 2)
 
         context = DummyImportContext(site)
-        context._files['typestool.xml'] = self._EMPTY_TOOL_EXPORT
+        context._files['types.xml'] = self._EMPTY_TOOL_EXPORT
         importTypesTool(context)
 
         self.assertEqual(len(tool.objectIds()), 0)
@@ -573,7 +573,7 @@
         self.assertEqual(len(tool.objectIds()), 2)
 
         context = DummyImportContext(site, True)
-        context._files['typestool.xml'] = self._EMPTY_TOOL_EXPORT
+        context._files['types.xml'] = self._EMPTY_TOOL_EXPORT
         importTypesTool(context)
 
         self.assertEqual(len(tool.objectIds()), 0)
@@ -587,7 +587,7 @@
         self.assertEqual(len(tool.objectIds()), 2)
 
         context = DummyImportContext(site, False)
-        context._files['typestool.xml'] = self._EMPTY_TOOL_EXPORT
+        context._files['types.xml'] = self._EMPTY_TOOL_EXPORT
         importTypesTool(context)
 
         self.assertEqual(len(tool.objectIds()), 2)
@@ -601,7 +601,7 @@
         self.assertEqual(len(tool.objectIds()), 0)
 
         context = DummyImportContext(site)
-        context._files['typestool.xml'] = self._NORMAL_TOOL_EXPORT
+        context._files['types.xml'] = self._NORMAL_TOOL_EXPORT
         context._files['types/foo.xml'] = _FOO_EXPORT % 'foo'
         context._files['types/bar.xml'] = _BAR_EXPORT % 'bar'
         importTypesTool(context)
@@ -620,7 +620,7 @@
         self.assertEqual(len(tool.objectIds()), 0)
 
         context = DummyImportContext(site)
-        context._files['typestool.xml'] = self._NORMAL_TOOL_EXPORT
+        context._files['types.xml'] = self._NORMAL_TOOL_EXPORT
         context._files['types/foo.xml'] = _FOO_OLD_EXPORT % 'foo'
         context._files['types/bar.xml'] = _BAR_OLD_EXPORT % 'bar'
         importTypesTool(context)
@@ -646,7 +646,7 @@
         self.assertEqual(len(tool.objectIds()), 0)
 
         context = DummyImportContext(site)
-        context._files['typestool.xml'] = self._FILENAME_EXPORT
+        context._files['types.xml'] = self._FILENAME_EXPORT
         context._files['types/foo_object.xml'] = _FOO_EXPORT % 'foo object'
         context._files['types/bar_object.xml'] = _BAR_EXPORT % 'bar object'
         importTypesTool(context)
@@ -662,7 +662,7 @@
         tool = site.portal_types
 
         context = DummyImportContext(site)
-        context._files['typestool.xml'] = self._NORMAL_TOOL_EXPORT
+        context._files['types.xml'] = self._NORMAL_TOOL_EXPORT
         context._files['types/foo.xml'] = _FOO_EXPORT % 'foo'
         context._files['types/bar.xml'] = _BAR_EXPORT % 'bar'
         importTypesTool(context)
@@ -675,7 +675,7 @@
                          {'(Default)': 'foo_view', 'view': 'foo_view'})
 
         context = DummyImportContext(site, False)
-        context._files['typestool.xml'] = _UPDATE_TOOL_IMPORT
+        context._files['types.xml'] = _UPDATE_TOOL_IMPORT
         context._files['types/foo.xml'] = _UPDATE_FOO_IMPORT
         importTypesTool(context)
 

Modified: CMF/trunk/CMFCore/exportimport/typeinfo.py
===================================================================
--- CMF/trunk/CMFCore/exportimport/typeinfo.py	2005-12-16 18:46:32 UTC (rev 40821)
+++ CMF/trunk/CMFCore/exportimport/typeinfo.py	2005-12-16 18:46:35 UTC (rev 40822)
@@ -32,7 +32,7 @@
 from Products.CMFCore.interfaces import ITypesTool
 from Products.CMFCore.utils import getToolByName
 
-_FILENAME = 'typestool.xml'
+_FILENAME = 'types.xml'
 
 
 class TypeInformationXMLAdapter(XMLAdapterBase, PropertyManagerHelpers):
@@ -269,8 +269,10 @@
 
     body = context.readDataFile(_FILENAME)
     if body is None:
-        logger.info('Nothing to import.')
-        return
+        body = context.readDataFile('typestool.xml')
+        if body is None:
+            logger.info('Nothing to import.')
+            return
 
     importer = zapi.queryMultiAdapter((tool, context), IBody)
     if importer is None:

Copied: CMF/trunk/CMFDefault/profiles/default/types.xml (from rev 40818, CMF/trunk/CMFDefault/profiles/default/typestool.xml)

Deleted: CMF/trunk/CMFDefault/profiles/default/typestool.xml
===================================================================
--- CMF/trunk/CMFDefault/profiles/default/typestool.xml	2005-12-16 18:46:32 UTC (rev 40821)
+++ CMF/trunk/CMFDefault/profiles/default/typestool.xml	2005-12-16 18:46:35 UTC (rev 40822)
@@ -1,13 +0,0 @@
-<?xml version="1.0"?>
-<object name="portal_types" meta_type="CMF Types Tool">
- <property name="title"></property>
- <object name="CMF BTree Folder" meta_type="Factory-based Type Information"/>
- <object name="Discussion Item" meta_type="Factory-based Type Information"/>
- <object name="Document" meta_type="Factory-based Type Information"/>
- <object name="Favorite" meta_type="Factory-based Type Information"/>
- <object name="File" meta_type="Factory-based Type Information"/>
- <object name="Folder" meta_type="Factory-based Type Information"/>
- <object name="Image" meta_type="Factory-based Type Information"/>
- <object name="Link" meta_type="Factory-based Type Information"/>
- <object name="News Item" meta_type="Factory-based Type Information"/>
-</object>

Copied: CMF/trunk/CMFTopic/profiles/default/types.xml (from rev 40818, CMF/trunk/CMFTopic/profiles/default/typestool.xml)

Deleted: CMF/trunk/CMFTopic/profiles/default/typestool.xml
===================================================================
--- CMF/trunk/CMFTopic/profiles/default/typestool.xml	2005-12-16 18:46:32 UTC (rev 40821)
+++ CMF/trunk/CMFTopic/profiles/default/typestool.xml	2005-12-16 18:46:35 UTC (rev 40822)
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<object name="portal_types" meta_type="CMF Types Tool">
- <object name="Topic" meta_type="Factory-based Type Information"/>
-</object>



More information about the CMF-checkins mailing list