Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
ZEO
Commits
da9cb6b5
Commit
da9cb6b5
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
9276d33d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
src/ZODB/FileStorage.py
src/ZODB/FileStorage.py
+12
-4
No files found.
src/ZODB/FileStorage.py
View file @
da9cb6b5
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,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.13
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.13
4
$'
[
11
:
-
2
]
import
base64
import
base64
from
cPickle
import
Pickler
,
Unpickler
,
loads
from
cPickle
import
Pickler
,
Unpickler
,
loads
...
@@ -1101,9 +1101,17 @@ class FileStorage(BaseStorage.BaseStorage,
...
@@ -1101,9 +1101,17 @@ class FileStorage(BaseStorage.BaseStorage,
def
_getSerial
(
self
,
oid
,
pos
):
def
_getSerial
(
self
,
oid
,
pos
):
self
.
_file
.
seek
(
pos
)
self
.
_file
.
seek
(
pos
)
h
=
self
.
_file
.
read
(
16
)
h
=
self
.
_file
.
read
(
DATA_HDR_LEN
)
assert
oid
==
h
[:
8
]
oid2
,
serial
,
sprev
,
stloc
,
vlen
,
splen
=
unpack
(
DATA_HDR
,
h
)
return
h
[
8
:]
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
):
def
_transactionalUndoRecord
(
self
,
oid
,
pos
,
serial
,
pre
,
version
):
"""Get the indo information for a data record
"""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