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
bc2bd6b5
Commit
bc2bd6b5
authored
Apr 16, 2001
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transactionalUndo(): Un-Python-2.1-ification; can't use continue in a
try clause. :(
parent
a7781d98
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
lib/python/BDBStorage/BDBFullStorage.py
lib/python/BDBStorage/BDBFullStorage.py
+4
-4
lib/python/BDBStorage/Full.py
lib/python/BDBStorage/Full.py
+4
-4
No files found.
lib/python/BDBStorage/BDBFullStorage.py
View file @
bc2bd6b5
...
...
@@ -4,7 +4,7 @@ See Minimal.py for an implementation of Berkeley storage that does not support
undo or versioning.
"""
# $Revision: 1.1
5
$
# $Revision: 1.1
6
$
__version__
=
'0.1'
import
struct
...
...
@@ -647,16 +647,16 @@ class Full(BerkeleyBase):
# zombification record
if
not
mrec
or
mrec
[
0
][:
8
]
<>
oid
:
newrevs
.
append
((
oid
,
vid
+
nvrevid
+
DNE
+
revid
))
continue
# BAW: If the revid of this object record is the same
# as the revid we're being asked to undo, then I think
# we have a problem (since the storage invariant is
# that it doesn't retain metadata records for multiple
# modifications of the object in the same txn).
if
mrec
[
0
][
8
:]
==
revid
:
el
if
mrec
[
0
][
8
:]
==
revid
:
raise
StorageSystemError
# All is good, so just restore this metadata record
newrevs
.
append
((
oid
,
mrec
[
1
]))
else
:
newrevs
.
append
((
oid
,
mrec
[
1
]))
finally
:
mdc
.
close
()
else
:
...
...
lib/python/BDBStorage/Full.py
View file @
bc2bd6b5
...
...
@@ -4,7 +4,7 @@ See Minimal.py for an implementation of Berkeley storage that does not support
undo or versioning.
"""
# $Revision: 1.1
5
$
# $Revision: 1.1
6
$
__version__
=
'0.1'
import
struct
...
...
@@ -647,16 +647,16 @@ class Full(BerkeleyBase):
# zombification record
if
not
mrec
or
mrec
[
0
][:
8
]
<>
oid
:
newrevs
.
append
((
oid
,
vid
+
nvrevid
+
DNE
+
revid
))
continue
# BAW: If the revid of this object record is the same
# as the revid we're being asked to undo, then I think
# we have a problem (since the storage invariant is
# that it doesn't retain metadata records for multiple
# modifications of the object in the same txn).
if
mrec
[
0
][
8
:]
==
revid
:
el
if
mrec
[
0
][
8
:]
==
revid
:
raise
StorageSystemError
# All is good, so just restore this metadata record
newrevs
.
append
((
oid
,
mrec
[
1
]))
else
:
newrevs
.
append
((
oid
,
mrec
[
1
]))
finally
:
mdc
.
close
()
else
:
...
...
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