Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zodb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joshua
zodb
Commits
d0e472eb
Commit
d0e472eb
authored
Mar 17, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix undoLog() to process arguments correctly.
Fix edge case in pack() -- backpointer to object created in version.
parent
4efb5208
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
src/ZODB/DemoStorage.py
src/ZODB/DemoStorage.py
+13
-11
No files found.
src/ZODB/DemoStorage.py
View file @
d0e472eb
...
...
@@ -79,7 +79,7 @@ method::
and call it to monitor the storage.
"""
__version__
=
'$Revision: 1.1
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
7
$'
[
11
:
-
2
]
import
base64
,
time
,
string
from
ZODB
import
POSException
,
BaseStorage
,
utils
...
...
@@ -355,8 +355,8 @@ class DemoStorage(BaseStorage.BaseStorage):
finally
:
self
.
_lock_release
()
def
undoLog
(
self
,
first
,
last
,
filter
=
None
):
# I think this is wrong given the handling of first and last
# in FileStorage.
if
last
<
0
:
last
=
first
-
last
+
1
self
.
_lock_acquire
()
try
:
# XXX Shouldn't this be sorted?
...
...
@@ -505,25 +505,27 @@ class DemoStorage(BaseStorage.BaseStorage):
if
o
:
if
len
(
o
)
!=
len
(
t
):
_data
[
tid
]
=
1
,
u
,
d
,
e
,
tuple
(
o
)
# Reset data
_data
[
tid
]
=
1
,
u
,
d
,
e
,
tuple
(
o
)
# Reset data
else
:
deleted
.
append
(
tid
)
# Now delete empty transactions
for
tid
in
deleted
:
del
_data
[
tid
]
for
tid
in
deleted
:
del
_data
[
tid
]
# Now reset previous pointers for "current" records:
for
r
in
pindex
.
values
():
r
[
2
]
=
None
# Previous record
if
r
[
3
]:
# vdata
r
[
3
][
1
][
2
]
=
None
pindex
=
None
r
[
2
]
=
None
# Previous record
if
r
[
3
]
and
r
[
3
][
1
]
:
# vdata
# If this record contains version data and
# non-version data, then clear it out.
r
[
3
][
1
][
2
]
=
None
# Finally, rebuild indexes from transaction data:
self
.
_index
,
self
.
_vindex
=
self
.
_build_indexes
()
finally
:
self
.
_lock_release
()
finally
:
self
.
_lock_release
()
self
.
getSize
()
def
_splat
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment