[Zope3-checkins] CVS: Zope3/utilities/fssync - commit.py:1.3 common.py:1.5 diff.py:1.3 update.py:1.3

Guido van Rossum guido@python.org
Mon, 5 May 2003 17:20:53 -0400


Update of /cvs-repository/Zope3/utilities/fssync
In directory cvs.zope.org:/tmp/cvs-serv30960

Modified Files:
	commit.py common.py diff.py update.py 
Log Message:
Remove all traces of setPrint().

=== Zope3/utilities/fssync/commit.py 1.2 => 1.3 ===
--- Zope3/utilities/fssync/commit.py:1.2	Mon May  5 14:01:03 2003
+++ Zope3/utilities/fssync/commit.py	Mon May  5 17:20:53 2003
@@ -17,7 +17,7 @@
 from zope.app.fssync.syncer import fromFS
 from common import getZODBPath, createTempfile, getObject
 from common import getApplicationRoot, traverseFS, checkConflictData
-from common import isNewObject, setPrint
+from common import isNewObject
 from transaction import get_transaction
 
 env = os.environ
@@ -102,7 +102,7 @@
                     if isConflict:
                         msg = "%s Conflict, Uptodate checkin failed" \
                               %(zopedb_path)
-                        setPrint(msg)
+                        print msg
                     else:
                         if not (isCommitRequired == isConflict == 0):
                             msg = "%s  <--  %s" \
@@ -110,7 +110,7 @@
                             err = doCommit(sandbox_path, root)
                             if err is not None:
                                 return err
-                            setPrint(msg)
+                            print msg
 
                     if os.path.exists(zopedb_temp_file):
                         os.remove(zopedb_temp_file)


=== Zope3/utilities/fssync/common.py 1.4 => 1.5 ===
--- Zope3/utilities/fssync/common.py:1.4	Mon May  5 17:08:27 2003
+++ Zope3/utilities/fssync/common.py	Mon May  5 17:20:53 2003
@@ -229,6 +229,3 @@
         return os.path.join(fspath,next)
     else:
         return getFSRoot(os.path.dirname(fspath), os.path.basename(fspath))
-
-def setPrint(output_string):
-    print output_string


=== Zope3/utilities/fssync/diff.py 1.2 => 1.3 ===
--- Zope3/utilities/fssync/diff.py:1.2	Mon May  5 14:01:03 2003
+++ Zope3/utilities/fssync/diff.py	Mon May  5 17:20:53 2003
@@ -12,9 +12,10 @@
 #
 ##############################################################################
 
-from common import getObjectDataTempfile, setPrint
 import os, commands, calendar, string
 
+from common import getObjectDataTempfile
+
 def getdiff(targetfile
             , objpath
             , dbpath
@@ -78,7 +79,7 @@
                          , temp_file
                          , objectpath
                          , modification_date)
-    setPrint(diff_res)
+    print diff_res
 
     if temp_file:
         os.remove(temp_file)


=== Zope3/utilities/fssync/update.py 1.2 => 1.3 ===
--- Zope3/utilities/fssync/update.py:1.2	Mon May  5 14:01:03 2003
+++ Zope3/utilities/fssync/update.py	Mon May  5 17:20:53 2003
@@ -16,7 +16,7 @@
 
 from common import getZODBPath, createTempfile, getObject
 from common import mapFS, traverseFS, checkConflictData, getApplicationRoot
-from common import isNewObject, getFSRoot, setPrint
+from common import isNewObject, getFSRoot
 
 from zope.app.fssync.syncer import toFS
 
@@ -68,7 +68,7 @@
         original_path = string.strip(mapping_paths[sandbox_path][0])
         zopedb_path = string.strip(mapping_paths[sandbox_path][1])
         if checkConflictData(sandbox_path, zopedb_path):
-            setPrint('C %s'%(zopedb_path[1:]))
+            print 'C', zopedb_path[1:]
         else:
             if not isNewObject(sandbox_path):
                 mappings[zopedb_path] = sandbox_path
@@ -98,10 +98,10 @@
                 if len(string.strip(diff3_res))>1:
                     diffverify=string.strip(diff3_res[0:5])
                     if diffverify=='====1':
-                        setPrint('M %s'%(zopedb_path[1:]))
+                        print 'M', zopedb_path[1:]
                     elif diffverify=='====2':
                         doUpdate('C', ob, zopedb_path, sandbox_path)
-                        setPrint('M %s'%(zopedb_path[1:]))
+                        print 'M', zopedb_path[1:]
                     elif diffverify=='====3':
                         doUpdate('U', ob, zopedb_path, sandbox_path)
                     elif diffverify=='====':
@@ -113,11 +113,9 @@
                                                    , zopedb_temp_file
                                                    , zopedb_path)
                         if diff3_res[-1]=='0':
-                            setPrint('Merging changes in %s' \
-                                     %(zopedb_path[1:]))
+                            print 'Merging changes in', zopedb_path[1:]
                         else:
-                            setPrint('C Merging changes in %s' \
-                                     %(zopedb_path[1:]))
+                            print 'C Merging changes in', zopedb_path[1:]
 
                         f = open(sandbox_path, 'w')
                         f.write(string.strip(diff3_res[:-1]))