Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
dc066075
Commit
dc066075
authored
Dec 29, 2003
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
_search_before(): Removed some code that was impossible to reach.
parent
be318524
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
lib/python/BDBStorage/BDBFullStorage.py
lib/python/BDBStorage/BDBFullStorage.py
+6
-9
No files found.
lib/python/BDBStorage/BDBFullStorage.py
View file @
dc066075
...
...
@@ -14,7 +14,7 @@
"""Berkeley storage with full undo and versioning support.
$Revision: 1.7
7
$
$Revision: 1.7
8
$
"""
import
time
...
...
@@ -924,7 +924,7 @@ class BDBFullStorage(BerkeleyBase, ConflictResolvingStorage):
self
.
_lock_acquire
()
try
:
# Get the current revision information for the object. As per the
# protocol, let Key
e
rrors percolate up.
# protocol, let Key
E
rrors percolate up.
tid
=
self
.
_getTid
(
oid
)
return
self
.
_load
(
oid
,
tid
,
version
)
finally
:
...
...
@@ -950,7 +950,8 @@ class BDBFullStorage(BerkeleyBase, ConflictResolvingStorage):
assert
cur_tid
<
tid
data
,
tid
,
ver
=
self
.
_load
(
oid
,
cur_tid
,
""
)
return
data
,
cur_tid
,
None
# p is the transaction after the one we're looking for.
# Grab its tid to use as the end tid return value.
next_tid
=
p
[
0
][
8
:]
return
self
.
_search_before
(
c
,
oid
,
tid
,
next_tid
)
finally
:
...
...
@@ -968,18 +969,14 @@ class BDBFullStorage(BerkeleyBase, ConflictResolvingStorage):
# there is no matching record.
if
key
[:
8
]
!=
oid
:
return
None
# It's possible that the range search hits oid, tid + 1 exactly,
# but only the first time.
if
key
==
oid
+
tid
:
return
self
.
_noncurrent_search
(
c
,
oid
,
tid
,
tid
)
vid
,
nvrevid
,
lrevid
=
unpack
(
">8s8s8s"
,
rec
[:
24
])
if
vid
==
ZERO
:
revid
=
lrevid
else
:
revid
=
nvrevid
data
=
self
.
_pickles
[
oid
+
revid
]
tid
=
key
[
8
:]
return
data
,
tid
,
end_tid
start_
tid
=
key
[
8
:]
return
data
,
start_
tid
,
end_tid
def
_getTidMissingOk
(
self
,
oid
):
# For the object, return the curent serial number and transaction id
...
...
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