[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/ Minor tidying: Fixed comments, updated BaseStorage documentation,

Shane Hathaway shane at zope.com
Sat Feb 11 13:49:49 EST 2006


Log message for revision 41592:
  Minor tidying: Fixed comments, updated BaseStorage documentation,
  replaced `x` with repr(x), and replaced apply(x, y) with x(*y)
  

Changed:
  U   ZODB/trunk/src/ZODB/BaseStorage.py
  U   ZODB/trunk/src/ZODB/DemoStorage.py
  U   ZODB/trunk/src/ZODB/FileStorage/FileStorage.py

-=-
Modified: ZODB/trunk/src/ZODB/BaseStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/BaseStorage.py	2006-02-10 15:52:17 UTC (rev 41591)
+++ ZODB/trunk/src/ZODB/BaseStorage.py	2006-02-11 18:49:48 UTC (rev 41592)
@@ -34,6 +34,7 @@
 
     A subclass must define the following methods:
     load()
+    store()
     close()
     cleanup()
     lastSerial()
@@ -53,7 +54,6 @@
 
     If the subclass wants to implement undo, it should implement the
     multiple revision methods and:
-    loadSerial()
     undo()
     undoInfo()
     undoLog()
@@ -94,9 +94,9 @@
         self._commit_lock_acquire = l.acquire
         self._commit_lock_release = l.release
 
-        t=time.time()
-        t=self._ts=apply(TimeStamp,(time.gmtime(t)[:5]+(t%60,)))
-        self._tid = `t`
+        t = time.time()
+        t = self._ts = TimeStamp(*(time.gmtime(t)[:5] + (t%60,)))
+        self._tid = repr(t)
 
         # ._oid is the highest oid in use (0 is always in use -- it's
         # a reserved oid for the root object).  Our new_oid() method
@@ -228,7 +228,7 @@
                 now = time.time()
                 t = TimeStamp(*(time.gmtime(now)[:5] + (now % 60,)))
                 self._ts = t = t.laterThan(self._ts)
-                self._tid = `t`
+                self._tid = repr(t)
             else:
                 self._ts = TimeStamp(tid)
                 self._tid = tid

Modified: ZODB/trunk/src/ZODB/DemoStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/DemoStorage.py	2006-02-10 15:52:17 UTC (rev 41591)
+++ ZODB/trunk/src/ZODB/DemoStorage.py	2006-02-11 18:49:48 UTC (rev 41592)
@@ -21,7 +21,7 @@
   - Provide a volatile storage that is useful for giving demonstrations.
 
 The demo storage can have a "base" storage that is used in a
-read-only fashion. The base storage must not not to contain version
+read-only fashion. The base storage must not contain version
 data.
 
 There are three main data structures:

Modified: ZODB/trunk/src/ZODB/FileStorage/FileStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/FileStorage/FileStorage.py	2006-02-10 15:52:17 UTC (rev 41591)
+++ ZODB/trunk/src/ZODB/FileStorage/FileStorage.py	2006-02-11 18:49:48 UTC (rev 41592)
@@ -993,8 +993,12 @@
             return "", None
 
     def _transactionalUndoRecord(self, oid, pos, tid, pre, version):
-        """Get the indo information for a data record
+        """Get the undo information for a data record
 
+        'pos' points to the data header for 'oid' in the transaction
+        being undone.  'tid' refers to the transaction being undone.
+        'pre' is the 'prev' field of the same data header.
+
         Return a 5-tuple consisting of a pickle, data pointer,
         version, packed non-version data pointer, and current
         position.  If the pickle is true, then the data pointer must



More information about the Zodb-checkins mailing list