-
Tim Peters authored
Merge tim-savepoint branch. Allow rollback to a given savepoint multiple times. transaction/_transaction.py _remove_and_invalidate_after(): Don't remove the argument savepoint from the savepoint stack anymore. abort(): abort(True) relied on the subtxn savepoint being invalidated as a side effect of rolling back to it. Invalidate it explicitly now. Savepoint.rollback(): Don't invalidate self. ZODB/Connection.py Connection._rollback(): Pass a temp container to _cache.invalidate(), because that method clears the container as a side effect. Clearing the index in a savepoint was a disaster if the savepoint was used again. TmpStore.reset(): Make a copy of the argument index. An alternative would be to make all callers make copies, but the only caller now thinks of its `state` argument as being opaque. transaction/savepoint.txt ZODB/tests/{testSubTransaction.py, testConnectionSavepoint.txt} Test the new semantics, and beef up the tests. transaction/tests/savepointsample.py _rollback_savepoint(): Needed to copy the data.
483495dd