- 05 Apr, 2001 10 commits
-
-
Jim Fulton authored
care of installing them when necessary (not for Python 2.0) Now import asyncore and asynchat as top-level modules, rather than from the medusa package. This makes it easier to use our custum version for Python 1.5 and to use the standard versions for Python 2.x. Note that the Python 2.1b1 and 2.1b2 releases had a broken asynchat that causes these changes to break Zope. The Python cvs and earler and later versions are OK.
-
Jim Fulton authored
care of installing them when necessary (not for Python 2.0)
-
Barry Warsaw authored
checkCreateNoFile(), checkCreateWithFilename(), checkCreateWithFileobj(): Make sure these tests close the file object before they attempt to unlink the underlying file.y checkCloseNoUnlink(), checkDel(): New tests in the CreateCommitLogTest class. CloseCommitLogTest: removed this class; its tests are folded into CreateCommitLogTest.
-
Barry Warsaw authored
(there's no DB object since we're poking at things at a lower level).
-
Barry Warsaw authored
tearDown(): Make sure any outstanding transactions are aborted so as not to retain modified objects connected to closed databases. Second, call self._close() to free any resources. _close(): Close the DB object, which in turn closes the underlying storage.
-
Chris McDonough authored
-
Chris McDonough authored
-
Chris McDonough authored
-
Barry Warsaw authored
_finish(): In delete-a-version clause, use next_dup() instead of next() to iterate over the currentVersions table with cursor set to the vid of the version we're deleting. abortVersion(): When cruising over the currentVersions table (and the key set to vid of the version we're aborting), use next_dup() instead of next(). Also, when curvid <> vid, raise StorageSystemError instead of VersionError. Same later on when we check curvid <> zero. commitVersion(): Add sanity checking based on model documentation: if the source version is the empty string, or src == dest, raise a VersionCommitError. Make the same changes we made previously to abortVersion() to keep track of the oids in a set/dictionary instead of a list to avoid duplicates. Other fixes include, writing revid instead of tid==self._serial to write_moved_object() and adding a write_discard_version(svid) once the source version's been committed. commitVersion() now works! load(): Add another check to avoid finding an object revision in a committed or aborted version if we can guess that version name. It now raises a VersionError if vid==zero and version is true. Also, although we still raise VersionError later on, elaborate the actual exception better in the error message.
-
Barry Warsaw authored
checkAbortVersionErrors checkModifyAfterAbortVersion checkCommitToNonVersion checkCommitToOtherVersion checkAbortOneVersionCommitTheOther All are inhibited for Minimal storage.
-
- 04 Apr, 2001 10 commits
-
-
Barry Warsaw authored
(a.k.a. pickle pointer) is usually tid but not always! In fact, it's specifically not tid when we've aborted a version -- it'll be the pointer to the pickle of the last non-version revision. We were actually setting up lrevid correctly, but writing tid to the metadata record. This fix writes lrevid instead.
-
Barry Warsaw authored
storage has a failing abortVersion(), so it's mostly a checkpoint. Not yet tested: commitVersion(), transactionalUndo(), undoLog(). Not yet implemented: history(), pack() Specific changes: - Table txnOids renamed to txnoids everywhere. - Define a module global `zero' constant and use (via global) where ever appropriate (should be named ZERO but that's ugly). - _finish(): Only boost the refcount of objects referenced by the pickle when we've actually got a new pickle. Also, add a note about the currentVersions table, which will contain multiple copies of vid/oid records. It's easier to weed them out later than to weed them out here. One of the places you need to weed them all out is at the end of this method, in the `delete-a-version' branch. - abortVersion(): Record oids found by scanning the currentVersions table in a set, to account for the possible multiple vid/oid records. Fix some typos. When calling write_nonversion_object() on the CommitLog, the prevrevid ought to be the revid of the current object revision, for undo purposes. - load(): Where we previously had a comment that asked whether we should assert that the version is empty (after we've checked everything else), now we really check that and raise a VersionError if not. - loadSerial(): Fix a typo. - store(): Inside the old-revision-id-is-true test, if the old vid is not zero and it is equal to the new vid, then the non-version revision of the object is the old non-version revision (added the else: clause). - transactionalUndo(): Implemented but not yet tested. - undo(): Removed. - versionEmpty(): Semantics are to return true if an unknown version is given. As an extra bonus, if version is empty (i.e. the non-version) check the serials table.
-
Barry Warsaw authored
common operation. ;) Also, _dostore() automatically pickles the data argument, since you don't really want anything else. Lots of new tests: checkNonVersionModifiedInVersion() checkLoadSerial() checkVersionedStoreAndLoad() checkVersionedLoadErrors() checkConflicts() checkVersionLock() checkVersionEmpty() checkVersions() checkAbortVersion() Skip for the Minimal storage: checkVersionedLoadErrors() checkVersionLock() checkVersionEmpty() checkVersions() checkAbortVersion() Override for the Minimal storage (basically check for Unsupported exceptions): checkLoadSerial() checkVersionedStoreAndLoad()
-
Barry Warsaw authored
-
Barry Warsaw authored
long to make it more readable.
-
Barry Warsaw authored
-
Jim Fulton authored
-
- 03 Apr, 2001 14 commits
-
-
Barry Warsaw authored
checkNonVersionStore(): Add some default arguments to make it useful for checkNonVersionStoreAndLoad().
-
Barry Warsaw authored
__init__(), close(): Remove self._references since we sniff the pickle instead. _decref() -> _zaprevision(): Also, changed implementation since we observe that it can't really be shared with the _decref() for pack, and we're moving to a non-destructive undo instead. So make this function (presumably) useful for pack() and cyclic garbage collection. We'll see... undo(): Mark this TBR -- to be removed -- but don't (yet) remove it.
-
Jim Fulton authored
-
Evan Simpson authored
-
Barry Warsaw authored
the Minimal and Full storages.
-
Barry Warsaw authored
more code sharing. DBHOME is unused, remove.
-
Barry Warsaw authored
given by tpc_begin(). _finish(), _abort(): Fix typos.
-
Barry Warsaw authored
TextMixin class.
-
Jim Fulton authored
-
- 02 Apr, 2001 6 commits
-
-
Barry Warsaw authored
-
Barry Warsaw authored
-
Barry Warsaw authored
storages, like transaction aborts and commits, changing objects, etc. Doesn't test undo, versions, or packing.
-
Barry Warsaw authored
-
Jim Fulton authored
-
Evan Simpson authored
-