Commit 488bfd75 authored by Tim Peters's avatar Tim Peters

XXX comments about the confusing self._packt (it appears in reality to be

a two-state flag, with possible values z64 or None -- eh?).
parent b0bc5f9c
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
############################################################################## ##############################################################################
"""Storage implementation using a log written to a single file. """Storage implementation using a log written to a single file.
$Revision: 1.7 $ $Revision: 1.8 $
""" """
import base64 import base64
...@@ -107,6 +107,8 @@ class FileStorage(BaseStorage.BaseStorage, ...@@ -107,6 +107,8 @@ class FileStorage(BaseStorage.BaseStorage,
FileStorageFormatter): FileStorageFormatter):
# default pack time is 0 # default pack time is 0
# XXX It's unclear what this is for. Looks like the only values it
# XXX can ever have are z64 and None.
_packt = z64 _packt = z64
_records_before_save = 10000 _records_before_save = 10000
...@@ -1128,6 +1130,8 @@ class FileStorage(BaseStorage.BaseStorage, ...@@ -1128,6 +1130,8 @@ class FileStorage(BaseStorage.BaseStorage,
return pos return pos
if stop_at_pack: if stop_at_pack:
# check the status field of the transaction header # check the status field of the transaction header
# XXX Looks like self._packt is either z64 or None, so unclear
# XXX what the _tid < self._packt is trying to say.
if h[16] == 'p' or _tid < self._packt: if h[16] == 'p' or _tid < self._packt:
break break
raise UndoError("Invalid transaction id") raise UndoError("Invalid transaction id")
......
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