[Zope3-checkins] CVS: Zope3/src/zope/fssync - fssync.py:1.41

Fred L. Drake, Jr. fred at zope.com
Tue Aug 12 17:49:21 EDT 2003


Update of /cvs-repository/Zope3/src/zope/fssync
In directory cvs.zope.org:/tmp/cvs-serv30823

Modified Files:
	fssync.py 
Log Message:
- when adding a directory, use the metadata module to format the empty
  Entries.xml file
- make the mkdir command create a directory that can actually be
  committed


=== Zope3/src/zope/fssync/fssync.py 1.40 => 1.41 ===
--- Zope3/src/zope/fssync/fssync.py:1.40	Mon Aug 11 18:02:09 2003
+++ Zope3/src/zope/fssync/fssync.py	Tue Aug 12 16:49:15 2003
@@ -39,7 +39,7 @@
 
 from zope.xmlpickle import dumps
 
-from zope.fssync.metadata import Metadata
+from zope.fssync.metadata import Metadata, dump_entries
 from zope.fssync.fsmerger import FSMerger
 from zope.fssync.fsutil import Error
 from zope.fssync import fsutil
@@ -525,7 +525,7 @@
             if not exists(efile):
                 if not exists(zopedir):
                     os.makedirs(zopedir)
-                    self.network.writefile(dumps({}), efile)
+                    self.network.writefile(dump_entries({}), efile)
             print "A", join(path, "")
         else:
             print "A", path
@@ -545,11 +545,7 @@
         if exists(path):
             raise Error("%r already exists" % path)
         os.mkdir(path)
-        mdmanager = self.metadata.getmanager(dir)
-        entry = mdmanager.getentry(name)
-        entry["flag"] = "added"
-        mdmanager.flush()
-        print "A", path
+        self.add(path)
 
     def remove(self, path):
         if exists(path):




More information about the Zope3-Checkins mailing list