Commit e12bdb68 authored by Jim Fulton's avatar Jim Fulton

Fixed bug in undoLog. The test for skipping records before the first

requested disregarded the filter. That is, the arguments first and
last should be applied *after* filtering.
parent 053893a6
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
# may have a back pointer to a version record or to a non-version # may have a back pointer to a version record or to a non-version
# record. # record.
# #
__version__='$Revision: 1.39 $'[11:-2] __version__='$Revision: 1.40 $'[11:-2]
import struct, time, os, bpthread, string, base64, sys import struct, time, os, bpthread, string, base64, sys
from struct import pack, unpack from struct import pack, unpack
...@@ -827,9 +827,6 @@ class FileStorage(BaseStorage.BaseStorage): ...@@ -827,9 +827,6 @@ class FileStorage(BaseStorage.BaseStorage):
while i < last and pos > 39: while i < last and pos > 39:
seek(pos-8) seek(pos-8)
pos=pos-u64(read(8))-8 pos=pos-u64(read(8))-8
if i < first:
i = i+1
continue
seek(pos) seek(pos)
h=read(23) h=read(23)
tid, tl, status, ul, dl, el = unpack(">8s8scHHH", h) tid, tl, status, ul, dl, el = unpack(">8s8scHHH", h)
...@@ -846,7 +843,7 @@ class FileStorage(BaseStorage.BaseStorage): ...@@ -846,7 +843,7 @@ class FileStorage(BaseStorage.BaseStorage):
d.update(e) d.update(e)
except: pass except: pass
if filter is None or filter(d): if filter is None or filter(d):
append(d) if i >= first: append(d)
i=i+1 i=i+1
return r return r
......
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