[CalendarServer-changes] [6147] CalendarServer/trunk/txdav/common/datastore/file.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Aug 19 23:50:47 PDT 2010


Revision: 6147
          http://trac.macosforge.org/projects/calendarserver/changeset/6147
Author:   glyph at apple.com
Date:     2010-08-19 23:50:47 -0700 (Thu, 19 Aug 2010)
Log Message:
-----------
remove public peruser_uid() method since it's an implementation detail, and remove home._private_uid since it's always the same as the regular uid

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

Modified: CalendarServer/trunk/txdav/common/datastore/file.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/file.py	2010-08-20 06:41:02 UTC (rev 6146)
+++ CalendarServer/trunk/txdav/common/datastore/file.py	2010-08-20 06:50:47 UTC (rev 6147)
@@ -277,7 +277,7 @@
 
     def __init__(self, uid, path, dataStore, transaction, notifier):
         self._dataStore = dataStore
-        self._uid = self._peruser_uid = uid
+        self._uid = uid
         self._path = path
         self._transaction = transaction
         self._notifier = notifier
@@ -295,10 +295,6 @@
         return self._uid
 
 
-    def peruser_uid(self):
-        return self._peruser_uid
-
-
     def _updateSyncToken(self, reset=False):
         "Stub for updating sync token."
         # FIXME: actually update something
@@ -464,8 +460,7 @@
         # FIXME: needs tests for actual functionality
         # FIXME: needs to be cached
         # FIXME: transaction tests
-        props = PropertyStore(self.peruser_uid(), self.uid(),
-                              lambda : self._path)
+        props = PropertyStore(self.uid(), self.uid(), lambda : self._path)
         self._transaction.addOperation(props.flush, "flush home properties")
         return props
 
@@ -504,7 +499,7 @@
         self._name = name
         self._home = home
         self._notifier = notifier
-        self._peruser_uid = home._peruser_uid
+        self._peruser_uid = home.uid()
         self._transaction = home._transaction
         self._newObjectResources = {}
         self._cachedObjectResources = {}
@@ -691,9 +686,7 @@
         # FIXME: needs direct tests - only covered by store tests
         # FIXME: transactions
         props = PropertyStore(
-            self._peruser_uid,
-            self._home.uid(),
-            lambda: self._path
+            self._peruser_uid, self._home.uid(), lambda: self._path
         )
         self.initPropertyStore(props)
 
@@ -757,11 +750,8 @@
 
     @cached
     def properties(self):
-        props = PropertyStore(
-            self._parentCollection._home.peruser_uid(),
-            self._parentCollection._home.uid(),
-            lambda : self._path
-        )
+        uid = self._parentCollection._home.uid()
+        props = PropertyStore(uid, uid, lambda : self._path)
         self._transaction.addOperation(props.flush, "object properties flush")
         return props
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100819/b44fb859/attachment-0001.html>


More information about the calendarserver-changes mailing list