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
bf8cc15d
Commit
bf8cc15d
authored
Mar 27, 2001
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inconsequential change to test out checkins mailing list.
parent
e15ecb45
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
lib/python/BDBStorage/BDBMinimalStorage.py
lib/python/BDBStorage/BDBMinimalStorage.py
+8
-6
lib/python/BDBStorage/Minimal.py
lib/python/BDBStorage/Minimal.py
+8
-6
No files found.
lib/python/BDBStorage/BDBMinimalStorage.py
View file @
bf8cc15d
...
...
@@ -4,11 +4,12 @@ See Full.py for an implementation of Berkeley storage that does support undo
and versioning.
"""
# $Revision: 1.
4
$
# $Revision: 1.
5
$
__version__
=
'0.1'
# This uses the Dunn/Kuchling PyBSDDB v3 extension module available from
# http://pybsddb.sourceforge.net
# http://pybsddb.sourceforge.net. It is compatible with release 3.0 of
# PyBSDDB3.
from
bsddb3
import
db
# BerkeleyBase.BerkeleyBase class provides some common functionality for both
...
...
@@ -92,7 +93,8 @@ class Minimal(BerkeleyBase):
# BAW: all objects have the same serial number? JF: all the
# existing storages re-use the transaction's serial number for all
# the objects, but they don't have to. In Jeremy's SimpleStorage,
# it's just a counter.
# it's just a counter. _serial is set in BaseStorage.py during
# tpc_begin().
serial
=
self
.
_serial
while
1
:
rec
=
self
.
_commitlog
.
next_object
()
...
...
@@ -184,9 +186,9 @@ class Minimal(BerkeleyBase):
try
:
oserial
=
self
.
_serials
.
get
(
oid
)
if
oserial
is
not
None
and
serial
<>
oserial
:
# The object exists in the database,
so let's make sure that
#
the serial number given in the call is the same as the last
#
stored serial number. If not, raise a ConflictError
# The object exists in the database,
but the serial number
#
given in the call is not the same as the last stored serial
#
number. Raise a ConflictError.
raise
POSException
.
ConflictError
(
'serial number mismatch (was: %s, has: %s)'
%
(
oserial
,
utils
.
U64
(
serial
)))
...
...
lib/python/BDBStorage/Minimal.py
View file @
bf8cc15d
...
...
@@ -4,11 +4,12 @@ See Full.py for an implementation of Berkeley storage that does support undo
and versioning.
"""
# $Revision: 1.
4
$
# $Revision: 1.
5
$
__version__
=
'0.1'
# This uses the Dunn/Kuchling PyBSDDB v3 extension module available from
# http://pybsddb.sourceforge.net
# http://pybsddb.sourceforge.net. It is compatible with release 3.0 of
# PyBSDDB3.
from
bsddb3
import
db
# BerkeleyBase.BerkeleyBase class provides some common functionality for both
...
...
@@ -92,7 +93,8 @@ class Minimal(BerkeleyBase):
# BAW: all objects have the same serial number? JF: all the
# existing storages re-use the transaction's serial number for all
# the objects, but they don't have to. In Jeremy's SimpleStorage,
# it's just a counter.
# it's just a counter. _serial is set in BaseStorage.py during
# tpc_begin().
serial
=
self
.
_serial
while
1
:
rec
=
self
.
_commitlog
.
next_object
()
...
...
@@ -184,9 +186,9 @@ class Minimal(BerkeleyBase):
try
:
oserial
=
self
.
_serials
.
get
(
oid
)
if
oserial
is
not
None
and
serial
<>
oserial
:
# The object exists in the database,
so let's make sure that
#
the serial number given in the call is the same as the last
#
stored serial number. If not, raise a ConflictError
# The object exists in the database,
but the serial number
#
given in the call is not the same as the last stored serial
#
number. Raise a ConflictError.
raise
POSException
.
ConflictError
(
'serial number mismatch (was: %s, has: %s)'
%
(
oserial
,
utils
.
U64
(
serial
)))
...
...
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