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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
a6c1713d
Commit
a6c1713d
authored
Jul 12, 2016
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Long lines. Grrrr.
parent
45831d69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
src/ZODB/ConflictResolution.py
src/ZODB/ConflictResolution.py
+6
-3
No files found.
src/ZODB/ConflictResolution.py
View file @
a6c1713d
...
@@ -18,7 +18,8 @@ import six
...
@@ -18,7 +18,8 @@ import six
import
zope.interface
import
zope.interface
from
ZODB.POSException
import
ConflictError
from
ZODB.POSException
import
ConflictError
from
ZODB.loglevels
import
BLATHER
from
ZODB.loglevels
import
BLATHER
from
ZODB._compat
import
BytesIO
,
PersistentUnpickler
,
PersistentPickler
,
_protocol
from
ZODB._compat
import
(
BytesIO
,
PersistentUnpickler
,
PersistentPickler
,
_protocol
)
# Subtle: Python 2.x has pickle.PicklingError and cPickle.PicklingError,
# Subtle: Python 2.x has pickle.PicklingError and cPickle.PicklingError,
# and these are unrelated classes! So we shouldn't use pickle.PicklingError,
# and these are unrelated classes! So we shouldn't use pickle.PicklingError,
...
@@ -73,7 +74,8 @@ def state(self, oid, serial, prfactory, p=''):
...
@@ -73,7 +74,8 @@ def state(self, oid, serial, prfactory, p=''):
p
=
p
or
self
.
loadSerial
(
oid
,
serial
)
p
=
p
or
self
.
loadSerial
(
oid
,
serial
)
p
=
self
.
_crs_untransform_record_data
(
p
)
p
=
self
.
_crs_untransform_record_data
(
p
)
file
=
BytesIO
(
p
)
file
=
BytesIO
(
p
)
unpickler
=
PersistentUnpickler
(
find_global
,
prfactory
.
persistent_load
,
file
)
unpickler
=
PersistentUnpickler
(
find_global
,
prfactory
.
persistent_load
,
file
)
unpickler
.
load
()
# skip the class tuple
unpickler
.
load
()
# skip the class tuple
return
unpickler
.
load
()
return
unpickler
.
load
()
...
@@ -241,7 +243,8 @@ def tryToResolveConflict(self, oid, committedSerial, oldSerial, newpickle,
...
@@ -241,7 +243,8 @@ def tryToResolveConflict(self, oid, committedSerial, oldSerial, newpickle,
prfactory
=
PersistentReferenceFactory
()
prfactory
=
PersistentReferenceFactory
()
newpickle
=
self
.
_crs_untransform_record_data
(
newpickle
)
newpickle
=
self
.
_crs_untransform_record_data
(
newpickle
)
file
=
BytesIO
(
newpickle
)
file
=
BytesIO
(
newpickle
)
unpickler
=
PersistentUnpickler
(
find_global
,
prfactory
.
persistent_load
,
file
)
unpickler
=
PersistentUnpickler
(
find_global
,
prfactory
.
persistent_load
,
file
)
meta
=
unpickler
.
load
()
meta
=
unpickler
.
load
()
if
isinstance
(
meta
,
tuple
):
if
isinstance
(
meta
,
tuple
):
klass
=
meta
[
0
]
klass
=
meta
[
0
]
...
...
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