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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
69f86132
Commit
69f86132
authored
Jul 20, 1999
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Needed to qualify undo errors.
parent
c868a643
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
src/ZODB/FileStorage.py
src/ZODB/FileStorage.py
+7
-5
No files found.
src/ZODB/FileStorage.py
View file @
69f86132
...
...
@@ -184,7 +184,7 @@
# may have a back pointer to a version record or to a non-version
# record.
#
__version__
=
'$Revision: 1.1
7
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
8
$'
[
11
:
-
2
]
import
struct
,
time
,
os
,
bpthread
,
string
,
base64
from
struct
import
pack
,
unpack
...
...
@@ -583,9 +583,10 @@ class FileStorage(BaseStorage.BaseStorage):
seek
(
tpos
)
h
=
read
(
23
)
if
len
(
h
)
!=
23
or
h
[:
8
]
!=
tid
:
raise
UndoError
,
'Invalid undo transaction id'
raise
POSException
.
UndoError
,
'Invalid undo transaction id'
if
h
[
16
]
==
'u'
:
return
if
h
[
16
]
!=
' '
:
raise
UndoError
,
'Undoable transaction'
if
h
[
16
]
!=
' '
:
raise
POSException
.
UndoError
,
'Undoable transaction'
tl
=
u64
(
h
[
8
:
16
])
ul
,
dl
,
el
=
unpack
(
">HHH"
,
h
[
17
:
23
])
tend
=
tpos
+
tl
...
...
@@ -601,9 +602,10 @@ class FileStorage(BaseStorage.BaseStorage):
dlen
=
42
+
(
plen
or
8
)
if
vlen
:
dlen
=
dlen
+
16
+
vlen
if
index_get
(
oid
,
0
)
!=
pos
:
raise
UndoError
,
'Undoable transaction'
raise
POSException
.
UndoError
,
'Undoable transaction'
pos
=
pos
+
dlen
if
pos
>
tend
:
raise
UndoError
,
'Undoable transaction'
if
pos
>
tend
:
raise
POSException
.
UndoError
,
'Undoable transaction'
t
[
oid
]
=
prev
seek
(
tpos
+
16
)
...
...
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