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
7038f9fd
Commit
7038f9fd
authored
Jan 18, 2002
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update TemporaryStorage to use new constructor for ConflictError
parent
2804e2ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
lib/python/Products/TemporaryFolder/TemporaryStorage.py
lib/python/Products/TemporaryFolder/TemporaryStorage.py
+7
-4
No files found.
lib/python/Products/TemporaryFolder/TemporaryStorage.py
View file @
7038f9fd
...
@@ -17,10 +17,10 @@ MappingStorage. Unlike MappingStorage, it needs not be packed to get rid of
...
@@ -17,10 +17,10 @@ MappingStorage. Unlike MappingStorage, it needs not be packed to get rid of
non-cyclic garbage and it does rudimentary conflict resolution. This is a
non-cyclic garbage and it does rudimentary conflict resolution. This is a
ripoff of Jim's Packless bsddb3 storage.
ripoff of Jim's Packless bsddb3 storage.
$Id: TemporaryStorage.py,v 1.
7 2002/01/11 14:53:38 chrism
Exp $
$Id: TemporaryStorage.py,v 1.
8 2002/01/18 04:23:45 jeremy
Exp $
"""
"""
__version__
=
'$Revision: 1.
7
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
8
$'
[
11
:
-
2
]
from
zLOG
import
LOG
from
zLOG
import
LOG
from
ZODB.referencesf
import
referencesf
from
ZODB.referencesf
import
referencesf
...
@@ -105,7 +105,9 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage):
...
@@ -105,7 +105,9 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage):
try
:
try
:
data
=
self
.
_conflict_cache
.
get
((
oid
,
serial
),
marker
)
data
=
self
.
_conflict_cache
.
get
((
oid
,
serial
),
marker
)
if
data
is
marker
:
if
data
is
marker
:
raise
POSException
.
ConflictError
,
(
oid
,
serial
)
# XXX Need 2 serialnos to pass them to ConflictError--
# the old and the new
raise
POSException
.
ConflictError
(
oid
=
oid
)
else
:
else
:
return
data
[
0
]
# data here is actually (data, t)
return
data
[
0
]
# data here is actually (data, t)
finally
:
finally
:
...
@@ -125,7 +127,8 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage):
...
@@ -125,7 +127,8 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage):
if
serial
!=
oserial
:
if
serial
!=
oserial
:
data
=
self
.
tryToResolveConflict
(
oid
,
oserial
,
serial
,
data
)
data
=
self
.
tryToResolveConflict
(
oid
,
oserial
,
serial
,
data
)
if
not
data
:
if
not
data
:
raise
POSException
.
ConflictError
,
(
serial
,
oserial
)
raise
POSException
.
ConflictError
(
oid
=
oid
,
serials
=
(
oserial
,
serial
))
else
:
else
:
oserial
=
serial
oserial
=
serial
newserial
=
self
.
_serial
newserial
=
self
.
_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