- 17 Apr, 2001 5 commits
-
-
Chris McDonough authored
-
Fred Drake authored
err_exit(): Allow the return code to be passed in, with a default of 2 (the usual Unix return code for command-line errors). main(): Remove the try/except that caused a second err_exit() call after the first call to sys.exit(). The try/except also prevented the first sys.exit() from actually doing so (only the second, unintended call caused the script to exit). When the users *asks* for help (-h), use a return code of 0 since there was not an error that triggered the help message.
-
Andreas Jung authored
-
Andreas Jung authored
-
- 16 Apr, 2001 13 commits
-
-
Martijn Pieters authored
-
Barry Warsaw authored
-
Barry Warsaw authored
try clause. :(
-
Barry Warsaw authored
-
Barry Warsaw authored
object, don't rely on its prevrevid pointing to the previous metadata record. That's because if the last revision was an undo record, it will have a prevrevid pointing to the revision previous to the undone one (phew! :). Instead, use a cursor to find the previous metadata record to restore. supportsTransactionalUndo(): Added.
-
Barry Warsaw authored
creating test classes.
-
Barry Warsaw authored
-
Andreas Jung authored
-
Andreas Jung authored
-
Shane Hathaway authored
-
- 13 Apr, 2001 11 commits
-
-
Barry Warsaw authored
- DNE='nonexist' (it must be 8-bytes and this is easier to pick out) - _setupDBs(): use self._nextserial to choose the next serial number; this is easier to follow than the timestamps the base class uses. - _begin(): increment the next serial counter and assign that to self._serial Also, ObjectDoesNotExist: Removed, we use a straight KeyError instead since undoInfo() obviates the need for this hack. _vote(): Removed, base class implements this. _finish(): At the point we increment the refcounts of the objects refered to by the pickle, add a FIXME note. Since objects can be revised multiple times in a single transaction, we need to make sure not to increment the refcounts too many times (not tested, so fix is deferred for later). abortVersion(): The API requires a VersionError if we try to abort the empty version. load(): The API requires that if we try to load an object on a non-existant version, or a version on which the object hasn't been changed, that we return the non-version revision of the object instead of raising an exception. transactionalUndo(): Fixed (as yet untested) bug in extraction of pack-protection flag from transaction's metadata. Rewrote the "revid <> tid" branch to check the commit log for any promised revisions to the object committed earlier in this transaction. It's possible to revise an object multiple times in the same transaction. Along those lines, record modified oids in a set (i.e. dictionary) so we don't get duplicates in the return value. Use write_object_undo() instead of write_moved_object() so previous revisions in the same transaction get recorded by the commit log. undoLog(): The API defines default arguments, and their semantics, so use them! Also fix typos in cursor method calls and in unpacking the user/desc/ext information in the transaction metadata.
-
Barry Warsaw authored
-
Barry Warsaw authored
storages, so it makes sense to move it from there to the base class. _vote() now puts the CommitLog into the promised() state.
-
Barry Warsaw authored
the infrastructure.
-
Evan Simpson authored
-
Barry Warsaw authored
to record an undo transaction for an object. This will remember the previous revids for the undone objects, which is necessary because a transaction may undo several revisions of an object. get_prevrevid(): Given an oid, get the recorded previous revid for the object.
-
Evan Simpson authored
-
- 12 Apr, 2001 11 commits
-
-
Jim Fulton authored
is undone, the application can note the fact in the undoing transaction. This is extremely desireable when doing transactional undo, so that you can keep track of what the undoing transactions actually (un)did.
-
Jim Fulton authored
-
Jim Fulton authored
was used to start the process. This allows zdaemon-controlled processes to take advantage of optimization.
-
Chris McDonough authored
-
Chris McDonough authored
-
Chris McDonough authored
-
Andreas Jung authored
-