Commit 6410bd0f authored by Jeremy Hylton's avatar Jeremy Hylton

Don't pass a revid to pack(). Pass the current time.

Two problems: A revid doesn't have the right type.  But even if we
decoded the revid using TimeStamp(revid).timeTime(), it would be the
wrong time.  We want to pack to the current time to delete older
revisions.

I believe the test case tried to keep one revision available so that
it could be packed.  The new test doesn't do that, so it will fail
even after we fix FileStorage.  I think the right answer is to call
time.time() after the second commit *and* make sure that there is at
least a one second delay between the two stores.
parent cc4b9ae5
......@@ -437,7 +437,7 @@ class TransactionalUndoStorage:
# Now pack just the initial revision of the object. We need the
# second revision otherwise we won't be able to undo the third
# revision!
self._storage.pack(revid1, referencesf)
self._storage.pack(time.time(), referencesf)
# And now attempt to undo the last transaction
t = Transaction()
self._storage.tpc_begin(t)
......
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