[zopeorg-checkins] CVS: Products/ZopeOrg-NV/Extensions - NZOMigrate.py:1.26
Sidnei da Silva
sidnei at x3ng.com.br
Sat May 31 09:48:46 EDT 2003
Update of /cvs-zopeorg/Products/ZopeOrg-NV/Extensions
In directory cvs.zope.org:/tmp/cvs-serv17971/Extensions
Modified Files:
NZOMigrate.py
Log Message:
A few improvements over the previous version
=== Products/ZopeOrg-NV/Extensions/NZOMigrate.py 1.25 => 1.26 ===
ignore_path = ['/%s' % o for o in source.objectIds() if o not in migrate]
dont_migrate = ['/Members/%s' % o for o in members_ignore]
ignore_path.extend(dont_migrate)
+ if exceptions is None:
+ exceptions = {}
cs = source.Resources.CaseStudies
for ob in cs.objectValues():
if ob.meta_type == 'Folder':
@@ -64,10 +66,8 @@
"External Method": "Unsafe"
}
- if exceptions is None:
- exceptions = {}
+ if not 'Resources/ZSP/zsp.xml' in exceptions.keys():
exceptions['Resources/ZSP/zsp.xml'] = 'ZSP2ZopeOrgZSP'
- #exceptions['Resources/CaseStudies'] = 'CaseStudies2ZopeOrgCaseStudies'
tmut = Transmutator(source, dest, ignore_path, type_map, exceptions)
tmut.log('Migration script started at %s.\n' % DateTime().ISO())
@@ -848,7 +848,7 @@
f.setChangesURL(changes_url)
f.setInstallationURL(installation_url)
f.setLicense(license)
-
+ del data
return (f, r)
def Tracker2CMFCollector(self, obj, source, dest):
@@ -863,6 +863,7 @@
return None
collector = getattr(dest, obj.getId())
result.append(collector)
+ kw = {'id': 1 }
for issue in obj.values():
kw, atts, text = dumpTrackerIssue(issue)
kw['container'] = collector
@@ -966,8 +967,10 @@
data = str(obj.data)
size = len(data)
f.update_data(data, content_type, size)
+ f.manage_upload(data)
f.setTitle(title)
f.setFormat(content_type)
+ del data
return f
def Image2CMFDefaultImage(self, obj, source, dest):
@@ -983,8 +986,10 @@
data = str(obj.data)
size = len(data)
f.update_data(data, content_type, size)
+ f.manage_upload(data)
f.setTitle(title)
f.setFormat(content_type)
+ del data
return f
def NewsItem2CMFDefaultNewsItem(self, obj, source, dest):
More information about the zopeorg-checkins
mailing list