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
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
Nicolas Wavrant
ZODB
Commits
fe6775d6
Commit
fe6775d6
authored
Oct 30, 2002
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge changes from ZODB3 3.1 final release. Bump version to 3.1+.
parent
1678cc25
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
src/ZODB/ConflictResolution.py
src/ZODB/ConflictResolution.py
+9
-0
src/ZODB/__init__.py
src/ZODB/__init__.py
+1
-1
src/ZODB/tests/ConflictResolution.py
src/ZODB/tests/ConflictResolution.py
+2
-2
No files found.
src/ZODB/ConflictResolution.py
View file @
fe6775d6
...
...
@@ -116,6 +116,15 @@ def tryToResolveConflict(self, oid, committedSerial, oldSerial, newpickle,
return
file
.
getvalue
(
1
)
except
ConflictError
:
return
0
except
:
# If anything else went wrong, catch it here and avoid passing an
# arbitrary exception back to the client. The error here will mask
# the original ConflictError. A client can recover from a
# ConflictError, but not necessarily from other errors. But log
# the error so that any problems can be fixed.
zLOG
.
LOG
(
"Conflict Resolution"
,
zLOG
.
ERROR
,
"Unexpected error"
,
error
=
sys
.
exc_info
())
return
0
class
ConflictResolvingStorage
:
"Mix-in class that provides conflict resolution handling for storages"
...
...
src/ZODB/__init__.py
View file @
fe6775d6
...
...
@@ -12,7 +12,7 @@
#
##############################################################################
__version__
=
'3.1
b2
'
__version__
=
'3.1
+
'
import
sys
import
cPersistence
,
Persistence
...
...
src/ZODB/tests/ConflictResolution.py
View file @
fe6775d6
...
...
@@ -104,7 +104,7 @@ class ConflictResolvingStorage:
# pickle is to commit two different transactions relative to
# revid1 that add two to _value.
revid2
=
self
.
_dostoreNP
(
oid
,
revid
=
revid1
,
data
=
zodb_pickle
(
obj
))
self
.
assertRaises
(
Attribute
Error
,
self
.
assertRaises
(
Conflict
Error
,
self
.
_dostoreNP
,
oid
,
revid
=
revid1
,
data
=
zodb_pickle
(
obj
))
...
...
@@ -122,7 +122,7 @@ class ConflictResolvingStorage:
# pickle is to commit two different transactions relative to
# revid1 that add two to _value.
revid2
=
self
.
_dostoreNP
(
oid
,
revid
=
revid1
,
data
=
zodb_pickle
(
obj
))
self
.
assertRaises
(
Type
Error
,
self
.
assertRaises
(
Conflict
Error
,
self
.
_dostoreNP
,
oid
,
revid
=
revid1
,
data
=
zodb_pickle
(
obj
))
...
...
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