1. 05 Apr, 2001 1 commit
    • Barry Warsaw's avatar
      More new tests: · 5abae7de
      Barry Warsaw authored
          checkAbortVersionErrors
          checkModifyAfterAbortVersion
          checkCommitToNonVersion
          checkCommitToOtherVersion
          checkAbortOneVersionCommitTheOther
      
      All are inhibited for Minimal storage.
      5abae7de
  2. 04 Apr, 2001 10 commits
    • Barry Warsaw's avatar
      _finish(): Fixed bug that was breaking abortVersion(). The lrevid · 7b6cdb78
      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.
      7b6cdb78
    • Barry Warsaw's avatar
      Fix bugs exposed by unit testing. Note that this version of the · a64b1c71
      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.
      a64b1c71
    • Barry Warsaw's avatar
      Factor out _dostore() which stores object revisions, since this is a · 0dd3eab8
      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()
      0dd3eab8
    • Barry Warsaw's avatar
      7bf50f70
    • Barry Warsaw's avatar
      store(): convert the oserial used in the ConflictError message to a · 82175353
      Barry Warsaw authored
      long to make it more readable.
      82175353
    • Barry Warsaw's avatar
      Fix a comment · 367176d3
      Barry Warsaw authored
      367176d3
    • 's avatar
      643702cb
    • 's avatar
      88b382e1
    • Jim Fulton's avatar
      This one was redundant. · 4ad03aa6
      Jim Fulton authored
      4ad03aa6
    • 's avatar
      Fixed an assumption of 'L' trailing str() of a long · 1392c45f
      authored
      1392c45f
  3. 03 Apr, 2001 14 commits
  4. 02 Apr, 2001 12 commits
  5. 01 Apr, 2001 2 commits
  6. 30 Mar, 2001 1 commit
    • Barry Warsaw's avatar
      Fixes so that Full now passes the basic test suite (essentially the · 1b7aef1d
      Barry Warsaw authored
      same set of tests that Minimal also passes).  Not yet tested:
      versions, undo, packing, garbage collection.
      
      InternalInconsistencyError: the base class should be AssertionError.
      
      Fix typo in name of table that keeps the pickle reference counts (it
      should be _pickleRefcounts).
      
      next_object() => next()
      
      Use referencef() in a completely backwards compatible way (I happen to
      have an older version of ZODB installed).
      
      load(): Fix typo in name of table that stores the pickle data (it
      should be _pickles).
      
      store(): Use a local variable called `zero' for the 8-byte zero
      pointer.  When there is no current serial number for the object
      (i.e. it is being stored for the first time), initialize oserial to
      zero (but not orevid).  Better printing of the ConflictError message.
      When there is no version string (i.e. this is being stored in a
      non-version), initialize nvrevid to zero.  Better printing of the
      VersionLockError.  Fix typo in return value; we should return the
      cached serial number, not the serial number that was passed in as an
      argument.
      1b7aef1d