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
Kirill Smelkov
ZODB
Commits
7a22f281
Commit
7a22f281
authored
May 30, 2003
by
Toby Dickenson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge toby-getserial-branch. Fix for new getSerial behaviour for uncreated objects.
parent
f2c4a871
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
trunk/src/ZODB/FileStorage.py
trunk/src/ZODB/FileStorage.py
+12
-4
No files found.
trunk/src/ZODB/FileStorage.py
View file @
7a22f281
...
...
@@ -115,7 +115,7 @@
# may have a back pointer to a version record or to a non-version
# record.
#
__version__
=
'$Revision: 1.13
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.13
4
$'
[
11
:
-
2
]
import
base64
from
cPickle
import
Pickler
,
Unpickler
,
loads
...
...
@@ -1101,9 +1101,17 @@ class FileStorage(BaseStorage.BaseStorage,
def
_getSerial
(
self
,
oid
,
pos
):
self
.
_file
.
seek
(
pos
)
h
=
self
.
_file
.
read
(
16
)
assert
oid
==
h
[:
8
]
return
h
[
8
:]
h
=
self
.
_file
.
read
(
DATA_HDR_LEN
)
oid2
,
serial
,
sprev
,
stloc
,
vlen
,
splen
=
unpack
(
DATA_HDR
,
h
)
assert
oid
==
oid2
if
splen
==
z64
:
# a back pointer
bp
=
self
.
_file
.
read
(
8
)
if
bp
==
z64
:
# If the backpointer is 0 (encoded as z64), then
# this transaction undoes the object creation.
raise
KeyError
(
oid
)
return
serial
def
_transactionalUndoRecord
(
self
,
oid
,
pos
,
serial
,
pre
,
version
):
"""Get the indo information for a data record
...
...
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