[CalendarServer-changes] [6552] CalendarServer/trunk/txdav/common/datastore/sql.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Nov 1 18:03:41 PDT 2010


Revision: 6552
          http://trac.macosforge.org/projects/calendarserver/changeset/6552
Author:   glyph at apple.com
Date:     2010-11-01 18:03:39 -0700 (Mon, 01 Nov 2010)
Log Message:
-----------
strip trailing whitespace (bump revision for buildbot's benefit)

Modified Paths:
--------------
    CalendarServer/trunk/txdav/common/datastore/sql.py

Modified: CalendarServer/trunk/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql.py	2010-11-01 22:38:48 UTC (rev 6551)
+++ CalendarServer/trunk/txdav/common/datastore/sql.py	2010-11-02 01:03:39 UTC (rev 6552)
@@ -333,9 +333,9 @@
         # Needed for REVISION/BIND table join
         self._revisionBindJoinTable = {}
         for key, value in self._revisionsTable.iteritems():
-            self._revisionBindJoinTable["REV:%s" % (key,)] = value 
+            self._revisionBindJoinTable["REV:%s" % (key,)] = value
         for key, value in self._bindTable.iteritems():
-            self._revisionBindJoinTable["BIND:%s" % (key,)] = value 
+            self._revisionBindJoinTable["BIND:%s" % (key,)] = value
 
     @inlineCallbacks
     def initFromStore(self):
@@ -355,7 +355,7 @@
             returnValue(self)
         else:
             returnValue(None)
-        
+
     def __repr__(self):
         return "<%s: %s>" % (self.__class__.__name__, self._resourceID)
 
@@ -487,7 +487,7 @@
         @return: an L{ICalendar} or C{None} if no such child
             exists.
         """
-        
+
         if owned:
             data = yield self._txn.execSQL("""
                 select %(column_RESOURCE_ID)s from %(name)s
@@ -601,7 +601,7 @@
             """
             select max(%(REV:column_REVISION)s) from %(REV:name)s
             where %(REV:column_RESOURCE_ID)s in (
-              select %(BIND:column_RESOURCE_ID)s from %(BIND:name)s 
+              select %(BIND:column_RESOURCE_ID)s from %(BIND:name)s
               where %(BIND:column_HOME_RESOURCE_ID)s = %%s
             ) or (
               %(REV:column_HOME_RESOURCE_ID)s = %%s and
@@ -630,14 +630,14 @@
                   %(BIND:name)s.%(BIND:column_HOME_RESOURCE_ID)s = %%s and
                   %(REV:name)s.%(REV:column_RESOURCE_ID)s = %(BIND:name)s.%(BIND:column_RESOURCE_ID)s
                 )
-                where 
-                  %(REV:column_REVISION)s > %%s and 
+                where
+                  %(REV:column_REVISION)s > %%s and
                   %(REV:name)s.%(REV:column_HOME_RESOURCE_ID)s = %%s
                 """ % self._revisionBindJoinTable,
                 [self._resourceID, token, self._resourceID],
             ))
         ]
-        
+
         deleted = []
         deleted_collections = set()
         changed_collections = set()
@@ -647,14 +647,14 @@
                     deleted.append("%s/%s" % (path, name,))
                 if not name:
                     deleted_collections.add(path)
-        
+
         changed = []
         for path, name, wasdeleted in results:
             if path not in deleted_collections:
                 changed.append("%s/%s" % (path, name,))
                 if not name:
                     changed_collections.add(path)
-        
+
         # Now deal with shared collections
         shares = yield self.listSharedChildren()
         for sharename in shares:
@@ -692,11 +692,11 @@
                 if wasdeleted:
                     if sharetoken:
                         deleted.append("%s/%s" % (path, name,))
-            
+
             for path, name, wasdeleted in results:
                 changed.append("%s/%s" % (path, name,))
-        
-        
+
+
         changed.sort()
         deleted.sort()
         returnValue((changed, deleted))
@@ -715,7 +715,7 @@
     def properties(self):
         return self._propertyStore
 
-    
+
     # IDataStoreResource
     def contentType(self):
         """
@@ -796,8 +796,8 @@
         """
         if self._notifier:
             self._txn.postCommit(self._notifier.notify)
-        
 
+
 class CommonHomeChild(LoggingMixIn, FancyEqMixin):
     """
     Common ancestor class of AddressBooks and Calendars.
@@ -838,7 +838,7 @@
         ))[0]
 
         yield self._loadPropertyStore()
-        
+
     @property
     def _txn(self):
         return self._home._txn
@@ -1078,7 +1078,7 @@
             ))
         ]
         results.sort(key=lambda x:x[1])
-        
+
         changed = []
         deleted = []
         for name, wasdeleted in results:
@@ -1088,7 +1088,7 @@
                         deleted.append(name)
                 else:
                     changed.append(name)
-        
+
         returnValue((changed, deleted))
 
 
@@ -1319,13 +1319,13 @@
         Initialise this object from the store. We read in and cache all the extra metadata
         from the DB to avoid having to do DB queries for those individually later. Either the
         name or uid is present, so we have to tweak the query accordingly.
-        
+
         @return: L{self} if object exists in the DB, else C{None}
         """
-        
+
         if self._name:
             rows = yield self._txn.execSQL("""
-                select 
+                select
                   %(column_RESOURCE_ID)s,
                   %(column_RESOURCE_NAME)s,
                   %(column_UID)s,
@@ -1340,7 +1340,7 @@
             )
         else:
             rows = yield self._txn.execSQL("""
-                select 
+                select
                   %(column_RESOURCE_ID)s,
                   %(column_RESOURCE_NAME)s,
                   %(column_UID)s,
@@ -1536,7 +1536,7 @@
         """
         We create the empty object first then have it initialize itself from the store
         """
-        
+
         no = NotificationObject(self, uid)
         no = (yield no.initFromStore())
         returnValue(no)
@@ -1737,7 +1737,7 @@
         """
         Initialise this object from the store. We read in and cache all the extra metadata
         from the DB to avoid having to do DB queries for those individually later.
-        
+
         @return: L{self} if object exists in the DB, else C{None}
         """
         rows = (yield self._txn.execSQL("""
@@ -1793,7 +1793,7 @@
                 insert into NOTIFICATION
                   (NOTIFICATION_HOME_RESOURCE_ID, NOTIFICATION_UID, XML_TYPE, XML_DATA, MD5)
                 values
-                  (%s, %s, %s, %s, %s) 
+                  (%s, %s, %s, %s, %s)
                 returning
                   RESOURCE_ID,
                   CREATED,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20101101/232668bc/attachment.html>


More information about the calendarserver-changes mailing list