[Checkins] SVN: zope.fssync/branches/achapman-error-collection/ - all errors in commit mentioned on failure

Alex Chapman achapman at zope.com
Tue Jan 4 13:26:22 EST 2011


Log message for revision 119368:
   - all errors in commit mentioned on failure
  

Changed:
  U   zope.fssync/branches/achapman-error-collection/CHANGES.txt
  U   zope.fssync/branches/achapman-error-collection/setup.py
  U   zope.fssync/branches/achapman-error-collection/src/zope/fssync/task.py

-=-
Modified: zope.fssync/branches/achapman-error-collection/CHANGES.txt
===================================================================
--- zope.fssync/branches/achapman-error-collection/CHANGES.txt	2011-01-04 18:23:25 UTC (rev 119367)
+++ zope.fssync/branches/achapman-error-collection/CHANGES.txt	2011-01-04 18:26:21 UTC (rev 119368)
@@ -1,12 +1,19 @@
 Changes
 =======
 
-3.5.3 (unreleased)
+3.5.4 (UNRELEASED)
 ------------------
 
-- ...
+--
 
 
+3.5.3 (2011-01-04)
+------------------
+
+- Commit task will collect errors and send them all back rather
+  than stopping on the first error encountered.
+
+
 3.5.2 (2010-10-18)
 ------------------
 

Modified: zope.fssync/branches/achapman-error-collection/setup.py
===================================================================
--- zope.fssync/branches/achapman-error-collection/setup.py	2011-01-04 18:23:25 UTC (rev 119367)
+++ zope.fssync/branches/achapman-error-collection/setup.py	2011-01-04 18:26:21 UTC (rev 119368)
@@ -24,7 +24,7 @@
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
 setup(name='zope.fssync',
-      version = '3.5.3dev',
+      version = '3.5.4dev',
       url='http://pypi.python.org/pypi/zope.fssync',
       license='ZPL 2.1',
       description="Filesystem synchronization utility for Zope 3.",

Modified: zope.fssync/branches/achapman-error-collection/src/zope/fssync/task.py
===================================================================
--- zope.fssync/branches/achapman-error-collection/src/zope/fssync/task.py	2011-01-04 18:23:25 UTC (rev 119367)
+++ zope.fssync/branches/achapman-error-collection/src/zope/fssync/task.py	2011-01-04 18:26:21 UTC (rev 119368)
@@ -177,12 +177,17 @@
     def __init__(self, getSynchronizer, repository):
         super(Commit, self).__init__(getSynchronizer, repository)
         self.metadata = self.repository.getMetadata()
+        self.errors = []
 
     def perform(self, container, name, fspath):
         callbacks = []
         add_callback = callbacks.append
         self.synchronize(container, name, fspath, add_callback)
 
+        # check for errors
+        if self.errors:
+            raise Exception('\n'.join(self.errors))
+
         # process callbacks
         passes = 0
         callbacks = [cb for cb in callbacks if cb is not None]
@@ -219,9 +224,18 @@
             try:
                 traverseKey(container, key)
             except:
-                self.synchNew(container, key, fspath, add_callback)
+                try:
+                    self.synchNew(container, key, fspath, add_callback)
+                except Exception, e:
+                    self.errors.append(','.join(e.args))
+                    return
             else:
-                modified = self.synchOld(container, key, fspath, add_callback)
+                try:
+                    modified = self.synchOld(container, key, fspath,
+                        add_callback)
+                except Exception, e:
+                    self.errors.append(','.join(e.args))
+                    return
                 if modified:
                     modifications.append(modified)
             # Now update extra and annotations



More information about the checkins mailing list