[Zope3-checkins] CVS: Zope3/src/zope/app/fssync - syncer.py:1.13
Guido van Rossum
guido@python.org
Tue, 13 May 2003 15:50:49 -0400
Update of /cvs-repository/Zope3/src/zope/app/fssync
In directory cvs.zope.org:/tmp/cvs-serv2705
Modified Files:
syncer.py
Log Message:
Get rid of all mention of writeOriginals. We don't need to do this
any more.
=== Zope3/src/zope/app/fssync/syncer.py 1.12 => 1.13 ===
--- Zope3/src/zope/app/fssync/syncer.py:1.12 Tue May 13 14:53:46 2003
+++ Zope3/src/zope/app/fssync/syncer.py Tue May 13 15:50:49 2003
@@ -50,7 +50,7 @@
def dumpFile(obj, path):
writeFile(dumps(obj), path)
-def toFS(ob, name, location, writeOriginals=False):
+def toFS(ob, name, location):
"""Check an object out to the file system
ob -- The object to be checked out
@@ -58,8 +58,6 @@
name -- The name of the object
location -- The directory on the file system where the object will go
-
- writeOriginals -- If True, write 'Original' directory. Default False.
"""
# Get name path and check that name is not an absolute path
@@ -108,7 +106,7 @@
os.mkdir(extra_dir)
for ename in extra:
edata = extra[ename]
- toFS(edata, ename, extra_dir, writeOriginals=writeOriginals)
+ toFS(edata, ename, extra_dir)
# Handle annotations
annotations = queryAdapter(ob, IAnnotations)
@@ -121,8 +119,7 @@
os.mkdir(annotation_dir)
for key in annotations:
annotation = annotations[key]
- toFS(annotation, key, annotation_dir,
- writeOriginals=writeOriginals)
+ toFS(annotation, key, annotation_dir)
# Handle data
if IObjectFile.isImplementedBy(adapter):
@@ -131,14 +128,6 @@
if not os.path.exists(path):
data = adapter.getBody()
writeFile(data, path)
- if writeOriginals:
- original_path = os.path.join(admin_dir, 'Original')
- if not os.path.exists(original_path):
- os.mkdir(original_path)
- original_path = os.path.join(original_path, name)
- if not data:
- data = adapter.getBody()
- writeFile(data, original_path)
else:
# Directory
if os.path.exists(path):
@@ -149,7 +138,7 @@
os.mkdir(path)
for cname, cob in adapter.contents():
- toFS(cob, cname, path, writeOriginals=writeOriginals)
+ toFS(cob, cname, path)
class SynchronizationError(Exception):