Commit 07f45175 authored by Martijn Pieters's avatar Martijn Pieters

Clean up indentation and trailing whitespace.

parent 813e756a
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
"""Python implementation of persistent list. """Python implementation of persistent list.
$Id: PersistentList.py,v 1.2 2002/02/11 23:49:07 gvanrossum Exp $""" $Id: PersistentList.py,v 1.3 2002/08/14 22:07:09 mj Exp $"""
__version__='$Revision: 1.2 $'[11:-2] __version__='$Revision: 1.3 $'[11:-2]
import Persistence import Persistence
from UserList import UserList from UserList import UserList
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
"""Python implementation of persistent base types """Python implementation of persistent base types
$Id: PersistentMapping.py,v 1.19 2002/02/12 22:33:08 gvanrossum Exp $""" $Id: PersistentMapping.py,v 1.20 2002/08/14 22:07:09 mj Exp $"""
__version__='$Revision: 1.19 $'[11:-2] __version__='$Revision: 1.20 $'[11:-2]
import Persistence import Persistence
from UserDict import UserDict from UserDict import UserDict
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
############################################################################## ##############################################################################
"""ZODB transfer activity monitoring """ZODB transfer activity monitoring
$Id: ActivityMonitor.py,v 1.2 2002/06/10 20:20:44 shane Exp $""" $Id: ActivityMonitor.py,v 1.3 2002/08/14 22:07:09 mj Exp $"""
__version__='$Revision: 1.2 $'[11:-2] __version__='$Revision: 1.3 $'[11:-2]
import time import time
...@@ -104,4 +104,3 @@ class ActivityMonitor: ...@@ -104,4 +104,3 @@ class ActivityMonitor:
div['loads'] = div['loads'] + total_loads div['loads'] = div['loads'] + total_loads
return res return res
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
""" """
# Do this portably in the face of checking out with -kv # Do this portably in the face of checking out with -kv
import string import string
__version__ = string.split('$Revision: 1.19 $')[-2:][0] __version__ = string.split('$Revision: 1.20 $')[-2:][0]
import ThreadLock, bpthread import ThreadLock, bpthread
import time, UndoLogCompatible import time, UndoLogCompatible
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
############################################################################## ##############################################################################
"""Database connection support """Database connection support
$Id: Connection.py,v 1.71 2002/06/14 20:25:06 jeremy Exp $""" $Id: Connection.py,v 1.72 2002/08/14 22:07:09 mj Exp $"""
from cPickleCache import PickleCache, MUCH_RING_CHECKING from cPickleCache import PickleCache, MUCH_RING_CHECKING
from POSException import ConflictError, ReadConflictError from POSException import ConflictError, ReadConflictError
...@@ -742,4 +742,3 @@ class tConnection(Connection): ...@@ -742,4 +742,3 @@ class tConnection(Connection):
def close(self): def close(self):
self._breakcr() self._breakcr()
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
############################################################################## ##############################################################################
"""Database objects """Database objects
$Id: DB.py,v 1.42 2002/06/10 20:20:44 shane Exp $""" $Id: DB.py,v 1.43 2002/08/14 22:07:09 mj Exp $"""
__version__='$Revision: 1.42 $'[11:-2] __version__='$Revision: 1.43 $'[11:-2]
import cPickle, cStringIO, sys, POSException, UndoLogCompatible import cPickle, cStringIO, sys, POSException, UndoLogCompatible
from Connection import Connection from Connection import Connection
......
...@@ -79,7 +79,7 @@ method:: ...@@ -79,7 +79,7 @@ method::
and call it to monitor the storage. and call it to monitor the storage.
""" """
__version__='$Revision: 1.11 $'[11:-2] __version__='$Revision: 1.12 $'[11:-2]
import base64, time, string import base64, time, string
from ZODB import POSException, BaseStorage, utils from ZODB import POSException, BaseStorage, utils
......
...@@ -168,4 +168,3 @@ class Ghost: pass ...@@ -168,4 +168,3 @@ class Ghost: pass
def persistent_id(object, Ghost=Ghost): def persistent_id(object, Ghost=Ghost):
if getattr(object, '__class__', None) is Ghost: if getattr(object, '__class__', None) is Ghost:
return object.oid return object.oid
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
# may have a back pointer to a version record or to a non-version # may have a back pointer to a version record or to a non-version
# record. # record.
# #
__version__='$Revision: 1.94 $'[11:-2] __version__='$Revision: 1.95 $'[11:-2]
import base64 import base64
from cPickle import Pickler, Unpickler, loads from cPickle import Pickler, Unpickler, loads
......
...@@ -87,7 +87,7 @@ method:: ...@@ -87,7 +87,7 @@ method::
and call it to minotor the storage. and call it to minotor the storage.
""" """
__version__='$Revision: 1.6 $'[11:-2] __version__='$Revision: 1.7 $'[11:-2]
import POSException, BaseStorage, string, utils import POSException, BaseStorage, string, utils
from TimeStamp import TimeStamp from TimeStamp import TimeStamp
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
############################################################################## ##############################################################################
"""Mounted database support """Mounted database support
$Id: Mount.py,v 1.15 2002/05/23 20:53:22 shane Exp $""" $Id: Mount.py,v 1.16 2002/08/14 22:07:09 mj Exp $"""
__version__='$Revision: 1.15 $'[11:-2] __version__='$Revision: 1.16 $'[11:-2]
import thread, Persistence, Acquisition import thread, Persistence, Acquisition
import ExtensionClass, string, time, sys import ExtensionClass, string, time, sys
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
############################################################################## ##############################################################################
"""BoboPOS-defined exceptions """BoboPOS-defined exceptions
$Id: POSException.py,v 1.11 2002/02/11 23:40:42 gvanrossum Exp $""" $Id: POSException.py,v 1.12 2002/08/14 22:07:09 mj Exp $"""
__version__ = '$Revision: 1.11 $'.split()[-2:][0] __version__ = '$Revision: 1.12 $'.split()[-2:][0]
from string import join from string import join
from types import StringType, DictType from types import StringType, DictType
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
"""Python implementation of persistent list. """Python implementation of persistent list.
$Id: PersistentList.py,v 1.2 2002/02/11 23:49:07 gvanrossum Exp $""" $Id: PersistentList.py,v 1.3 2002/08/14 22:07:09 mj Exp $"""
__version__='$Revision: 1.2 $'[11:-2] __version__='$Revision: 1.3 $'[11:-2]
import Persistence import Persistence
from UserList import UserList from UserList import UserList
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
"""Python implementation of persistent base types """Python implementation of persistent base types
$Id: PersistentMapping.py,v 1.19 2002/02/12 22:33:08 gvanrossum Exp $""" $Id: PersistentMapping.py,v 1.20 2002/08/14 22:07:09 mj Exp $"""
__version__='$Revision: 1.19 $'[11:-2] __version__='$Revision: 1.20 $'[11:-2]
import Persistence import Persistence
from UserDict import UserDict from UserDict import UserDict
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
############################################################################## ##############################################################################
"""Transaction management """Transaction management
$Id: Transaction.py,v 1.36 2002/04/12 19:59:55 jeremy Exp $""" $Id: Transaction.py,v 1.37 2002/08/14 22:07:09 mj Exp $"""
__version__='$Revision: 1.36 $'[11:-2] __version__='$Revision: 1.37 $'[11:-2]
import time, sys, struct, POSException import time, sys, struct, POSException
from struct import pack from struct import pack
...@@ -407,4 +407,3 @@ del _t ...@@ -407,4 +407,3 @@ del _t
import __main__ import __main__
__main__.__builtins__.get_transaction=get_transaction __main__.__builtins__.get_transaction=get_transaction
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
This module provides a wrapper that causes a database connection to be created This module provides a wrapper that causes a database connection to be created
and used when bobo publishes a bobo_application object. and used when bobo publishes a bobo_application object.
""" """
__version__='$Revision: 1.10 $'[11:-2] __version__='$Revision: 1.11 $'[11:-2]
StringType=type('') StringType=type('')
connection_open_hooks = [] connection_open_hooks = []
...@@ -82,4 +82,3 @@ class ZApplicationWrapper: ...@@ -82,4 +82,3 @@ class ZApplicationWrapper:
class Cleanup: pass class Cleanup: pass
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
With this, we can run with or wothout threads. With this, we can run with or wothout threads.
$Id: bpthread.py,v 1.4 2002/02/11 23:40:42 gvanrossum Exp $""" $Id: bpthread.py,v 1.5 2002/08/14 22:07:09 mj Exp $"""
try: try:
from thread import * from thread import *
......
...@@ -18,7 +18,7 @@ don't support versions or Undo. This may be useful when implementing ...@@ -18,7 +18,7 @@ don't support versions or Undo. This may be useful when implementing
objects like hit counters that don't need or want to participate objects like hit counters that don't need or want to participate
in undo or versions. in undo or versions.
""" """
__version__='$Revision: 1.3 $'[11:-2] __version__='$Revision: 1.4 $'[11:-2]
import base64, POSException, time, string, utils import base64, POSException, time, string, utils
......
...@@ -327,4 +327,3 @@ def recover(argv=sys.argv): ...@@ -327,4 +327,3 @@ def recover(argv=sys.argv):
if __name__=='__main__': recover() if __name__=='__main__': recover()
...@@ -55,4 +55,3 @@ except: ...@@ -55,4 +55,3 @@ except:
except: except:
def lock_file(file, error=None): def lock_file(file, error=None):
pass pass
...@@ -16,7 +16,7 @@ from ZODB.tests.StorageTestBase \ ...@@ -16,7 +16,7 @@ from ZODB.tests.StorageTestBase \
ZERO = '\0'*8 ZERO = '\0'*8
class BasicStorage: class BasicStorage:
def checkBasics(self): def checkBasics(self):
t = Transaction() t = Transaction()
......
...@@ -170,4 +170,3 @@ class ConflictResolvingTransUndoStorage: ...@@ -170,4 +170,3 @@ class ConflictResolvingTransUndoStorage:
self.assertRaises(UndoError, self._storage.transactionalUndo, self.assertRaises(UndoError, self._storage.transactionalUndo,
tid, t) tid, t)
self._storage.tpc_abort(t) self._storage.tpc_abort(t)
...@@ -9,7 +9,7 @@ from ZODB.tests.MinPO import MinPO ...@@ -9,7 +9,7 @@ from ZODB.tests.MinPO import MinPO
from ZODB.tests.StorageTestBase import zodb_unpickle from ZODB.tests.StorageTestBase import zodb_unpickle
class HistoryStorage: class HistoryStorage:
def checkSimpleHistory(self): def checkSimpleHistory(self):
eq = self.assertEqual eq = self.assertEqual
......
...@@ -9,7 +9,7 @@ from ZODB.tests.StorageTestBase import zodb_unpickle ...@@ -9,7 +9,7 @@ from ZODB.tests.StorageTestBase import zodb_unpickle
from ZODB.utils import U64, p64 from ZODB.utils import U64, p64
from ZODB.Transaction import Transaction from ZODB.Transaction import Transaction
class IteratorCompare: class IteratorCompare:
def iter_verify(self, txniter, revids, val0): def iter_verify(self, txniter, revids, val0):
......
...@@ -190,4 +190,3 @@ class MTStorage: ...@@ -190,4 +190,3 @@ class MTStorage:
def check4ExtStorageThread(self): def check4ExtStorageThread(self):
self._checkNThreads(4, ExtStorageClientThread, self._storage, self) self._checkNThreads(4, ExtStorageClientThread, self._storage, self)
...@@ -18,7 +18,7 @@ from ZODB.referencesf import referencesf ...@@ -18,7 +18,7 @@ from ZODB.referencesf import referencesf
ZERO = '\0'*8 ZERO = '\0'*8
# This class is for the root object. It must not contain a getoid() method # This class is for the root object. It must not contain a getoid() method
# (really, attribute). The persistent pickling machinery -- in the dumps() # (really, attribute). The persistent pickling machinery -- in the dumps()
# function below -- will pickle Root objects as normal, but any attributes # function below -- will pickle Root objects as normal, but any attributes
...@@ -64,7 +64,7 @@ def dumps(obj): ...@@ -64,7 +64,7 @@ def dumps(obj):
return s.getvalue() return s.getvalue()
class PackableStorageBase: class PackableStorageBase:
# We keep a cache of object ids to instances so that the unpickler can # We keep a cache of object ids to instances so that the unpickler can
# easily return any persistent object. # easily return any persistent object.
...@@ -100,7 +100,7 @@ class PackableStorageBase: ...@@ -100,7 +100,7 @@ class PackableStorageBase:
return loads return loads
class PackableStorage(PackableStorageBase): class PackableStorage(PackableStorageBase):
def _initroot(self): def _initroot(self):
try: try:
......
...@@ -57,5 +57,3 @@ class ReadOnlyStorage: ...@@ -57,5 +57,3 @@ class ReadOnlyStorage:
self.assertRaises(ReadOnlyError, self._storage.transactionalUndo, self.assertRaises(ReadOnlyError, self._storage.transactionalUndo,
'\000' * 8, t) '\000' * 8, t)
self._storage.tpc_abort(t) self._storage.tpc_abort(t)
...@@ -18,4 +18,3 @@ class RevisionStorage: ...@@ -18,4 +18,3 @@ class RevisionStorage:
for revid, value in revisions.items(): for revid, value in revisions.items():
data = self._storage.loadSerial(oid, revid) data = self._storage.loadSerial(oid, revid)
self.assertEqual(zodb_unpickle(data), value) self.assertEqual(zodb_unpickle(data), value)
...@@ -117,7 +117,7 @@ def removefs(base): ...@@ -117,7 +117,7 @@ def removefs(base):
if err[0] != errno.ENOENT: if err[0] != errno.ENOENT:
raise raise
class StorageTestBase(unittest.TestCase): class StorageTestBase(unittest.TestCase):
# XXX It would be simpler if concrete tests didn't need to extend # XXX It would be simpler if concrete tests didn't need to extend
......
...@@ -11,7 +11,7 @@ from ZODB.Transaction import Transaction ...@@ -11,7 +11,7 @@ from ZODB.Transaction import Transaction
from ZODB.tests.MinPO import MinPO from ZODB.tests.MinPO import MinPO
from ZODB.tests.StorageTestBase import zodb_unpickle from ZODB.tests.StorageTestBase import zodb_unpickle
class TransactionalUndoVersionStorage: class TransactionalUndoVersionStorage:
def _x_dostore(self, *args, **kwargs): def _x_dostore(self, *args, **kwargs):
...@@ -227,4 +227,3 @@ class TransactionalUndoVersionStorage: ...@@ -227,4 +227,3 @@ class TransactionalUndoVersionStorage:
self.assertEqual(load_value(oid1), 0) self.assertEqual(load_value(oid1), 0)
# after abort, we should see non-version data # after abort, we should see non-version data
self.assertEqual(load_value(oid1, version), 0) self.assertEqual(load_value(oid1, version), 0)
...@@ -12,7 +12,7 @@ from ZODB.Transaction import Transaction ...@@ -12,7 +12,7 @@ from ZODB.Transaction import Transaction
from ZODB.tests.MinPO import MinPO from ZODB.tests.MinPO import MinPO
from ZODB.tests.StorageTestBase import zodb_unpickle from ZODB.tests.StorageTestBase import zodb_unpickle
class VersionStorage: class VersionStorage:
def checkVersionedStoreAndLoad(self): def checkVersionedStoreAndLoad(self):
eq = self.assertEqual eq = self.assertEqual
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
See ZODB/ActivityMonitor.py See ZODB/ActivityMonitor.py
$Id: testActivityMonitor.py,v 1.2 2002/06/10 20:20:44 shane Exp $ $Id: testActivityMonitor.py,v 1.3 2002/08/14 22:07:09 mj Exp $
""" """
import unittest import unittest
......
...@@ -38,4 +38,3 @@ class DBTests(unittest.TestCase): ...@@ -38,4 +38,3 @@ class DBTests(unittest.TestCase):
def test_suite(): def test_suite():
return unittest.makeSuite(DBTests) return unittest.makeSuite(DBTests)
...@@ -24,4 +24,3 @@ if __name__ == "__main__": ...@@ -24,4 +24,3 @@ if __name__ == "__main__":
loader = unittest.TestLoader() loader = unittest.TestLoader()
loader.testMethodPrefix = "check" loader.testMethodPrefix = "check"
unittest.main(testLoader=loader) unittest.main(testLoader=loader)
...@@ -22,4 +22,3 @@ if __name__ == "__main__": ...@@ -22,4 +22,3 @@ if __name__ == "__main__":
loader = unittest.TestLoader() loader = unittest.TestLoader()
loader.testMethodPrefix = "check" loader.testMethodPrefix = "check"
unittest.main(testLoader=loader) unittest.main(testLoader=loader)
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
""" """
Revision information: Revision information:
$Id: testTransaction.py,v 1.9 2002/08/14 15:37:08 jeremy Exp $ $Id: testTransaction.py,v 1.10 2002/08/14 22:07:09 mj Exp $
""" """
""" """
......
...@@ -38,4 +38,3 @@ if __name__ == "__main__": ...@@ -38,4 +38,3 @@ if __name__ == "__main__":
loader = unittest.TestLoader() loader = unittest.TestLoader()
loader.testMethodPrefix = "check" loader.testMethodPrefix = "check"
unittest.main(testLoader=loader) unittest.main(testLoader=loader)
import unittest, sys import unittest, sys
from ZODB.fsIndex import fsIndex from ZODB.fsIndex import fsIndex
from ZODB.utils import p64 from ZODB.utils import p64
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
"""Python implementation of persistent list. """Python implementation of persistent list.
$Id: list.py,v 1.2 2002/02/11 23:49:07 gvanrossum Exp $""" $Id: list.py,v 1.3 2002/08/14 22:07:09 mj Exp $"""
__version__='$Revision: 1.2 $'[11:-2] __version__='$Revision: 1.3 $'[11:-2]
import Persistence import Persistence
from UserList import UserList from UserList import UserList
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
"""Python implementation of persistent base types """Python implementation of persistent base types
$Id: mapping.py,v 1.19 2002/02/12 22:33:08 gvanrossum Exp $""" $Id: mapping.py,v 1.20 2002/08/14 22:07:09 mj Exp $"""
__version__='$Revision: 1.19 $'[11:-2] __version__='$Revision: 1.20 $'[11:-2]
import Persistence import Persistence
from UserDict import UserDict from UserDict import UserDict
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment