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
fbb50b05
Commit
fbb50b05
authored
Oct 15, 2004
by
Dmitry Vasiliev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge rev 28197 from ZODB 3.3 branch.
Imports normalization.
parent
41c20bde
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
21 deletions
+14
-21
src/ZODB/BaseStorage.py
src/ZODB/BaseStorage.py
+3
-5
src/ZODB/ConflictResolution.py
src/ZODB/ConflictResolution.py
+1
-1
src/ZODB/Connection.py
src/ZODB/Connection.py
+1
-3
src/ZODB/DemoStorage.py
src/ZODB/DemoStorage.py
+8
-8
src/ZODB/ExportImport.py
src/ZODB/ExportImport.py
+0
-1
src/ZODB/Mount.py
src/ZODB/Mount.py
+1
-3
No files found.
src/ZODB/BaseStorage.py
View file @
fbb50b05
...
@@ -20,12 +20,10 @@ import threading
...
@@ -20,12 +20,10 @@ import threading
import
time
import
time
import
logging
import
logging
import
UndoLogCompatible
import
POSException
from
persistent.TimeStamp
import
TimeStamp
from
persistent.TimeStamp
import
TimeStamp
from
ZODB
import
POSException
,
utils
from
ZODB
import
POSException
from
ZODB.utils
import
z64
from
ZODB.utils
import
z64
,
oid_repr
from
ZODB.UndoLogCompatible
import
UndoLogCompatible
from
ZODB.UndoLogCompatible
import
UndoLogCompatible
log
=
logging
.
getLogger
(
"ZODB.BaseStorage"
)
log
=
logging
.
getLogger
(
"ZODB.BaseStorage"
)
...
@@ -402,7 +400,7 @@ class BaseStorage(UndoLogCompatible):
...
@@ -402,7 +400,7 @@ class BaseStorage(UndoLogCompatible):
for
r
in
transaction
:
for
r
in
transaction
:
oid
=
r
.
oid
oid
=
r
.
oid
if
verbose
:
if
verbose
:
print
utils
.
oid_repr
(
oid
),
r
.
version
,
len
(
r
.
data
)
print
oid_repr
(
oid
),
r
.
version
,
len
(
r
.
data
)
if
restoring
:
if
restoring
:
self
.
restore
(
oid
,
r
.
tid
,
r
.
data
,
r
.
version
,
self
.
restore
(
oid
,
r
.
tid
,
r
.
data
,
r
.
version
,
r
.
data_txn
,
transaction
)
r
.
data_txn
,
transaction
)
...
...
src/ZODB/ConflictResolution.py
View file @
fbb50b05
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
# FOR A PARTICULAR PURPOSE
# FOR A PARTICULAR PURPOSE
#
#
##############################################################################
##############################################################################
import
sys
import
logging
import
logging
from
cStringIO
import
StringIO
from
cStringIO
import
StringIO
from
cPickle
import
Unpickler
,
Pickler
from
cPickle
import
Unpickler
,
Pickler
...
...
src/ZODB/Connection.py
View file @
fbb50b05
...
@@ -20,10 +20,8 @@ import sys
...
@@ -20,10 +20,8 @@ import sys
import
threading
import
threading
import
warnings
import
warnings
from
time
import
time
from
time
import
time
from
utils
import
u64
from
persistent
import
PickleCache
from
persistent
import
PickleCache
from
persistent.interfaces
import
IPersistent
import
transaction
import
transaction
...
@@ -33,7 +31,7 @@ from ZODB.POSException \
...
@@ -33,7 +31,7 @@ from ZODB.POSException \
import
ConflictError
,
ReadConflictError
,
InvalidObjectReference
,
\
import
ConflictError
,
ReadConflictError
,
InvalidObjectReference
,
\
ConnectionStateError
ConnectionStateError
from
ZODB.TmpStore
import
TmpStore
from
ZODB.TmpStore
import
TmpStore
from
ZODB.utils
import
oid_repr
,
z64
,
positive_id
from
ZODB.utils
import
u64
,
oid_repr
,
z64
,
positive_id
from
ZODB.serialize
import
ObjectWriter
,
ConnectionObjectReader
,
myhasattr
from
ZODB.serialize
import
ObjectWriter
,
ConnectionObjectReader
,
myhasattr
from
ZODB.interfaces
import
IConnection
from
ZODB.interfaces
import
IConnection
from
zope.interface
import
implements
from
zope.interface
import
implements
...
...
src/ZODB/DemoStorage.py
View file @
fbb50b05
...
@@ -80,9 +80,9 @@ and call it to monitor the storage.
...
@@ -80,9 +80,9 @@ and call it to monitor the storage.
"""
"""
import
base64
,
time
,
string
import
base64
,
time
from
ZODB
import
POSException
,
BaseStorage
,
utils
from
ZODB
import
POSException
,
BaseStorage
from
ZODB.utils
import
z64
from
ZODB.utils
import
z64
,
oid_repr
from
persistent.TimeStamp
import
TimeStamp
from
persistent.TimeStamp
import
TimeStamp
from
cPickle
import
loads
from
cPickle
import
loads
from
BTrees
import
OOBTree
from
BTrees
import
OOBTree
...
@@ -509,8 +509,8 @@ class DemoStorage(BaseStorage.BaseStorage):
...
@@ -509,8 +509,8 @@ class DemoStorage(BaseStorage.BaseStorage):
o
.
append
(
" %s %s"
%
(
TimeStamp
(
tid
),
p
))
o
.
append
(
" %s %s"
%
(
TimeStamp
(
tid
),
p
))
for
r
in
t
:
for
r
in
t
:
oid
,
pre
,
vdata
,
p
,
tid
=
r
oid
,
pre
,
vdata
,
p
,
tid
=
r
oid
=
utils
.
oid_repr
(
oid
)
oid
=
oid_repr
(
oid
)
tid
=
utils
.
oid_repr
(
tid
)
tid
=
oid_repr
(
tid
)
## if serial is not None: serial=str(TimeStamp(serial))
## if serial is not None: serial=str(TimeStamp(serial))
pre
=
id
(
pre
)
pre
=
id
(
pre
)
if
vdata
and
vdata
[
1
]:
vdata
=
vdata
[
0
],
id
(
vdata
[
1
])
if
vdata
and
vdata
[
1
]:
vdata
=
vdata
[
0
],
id
(
vdata
[
1
])
...
@@ -523,7 +523,7 @@ class DemoStorage(BaseStorage.BaseStorage):
...
@@ -523,7 +523,7 @@ class DemoStorage(BaseStorage.BaseStorage):
items
.
sort
()
items
.
sort
()
for
oid
,
r
in
items
:
for
oid
,
r
in
items
:
if
r
:
r
=
id
(
r
)
if
r
:
r
=
id
(
r
)
o
.
append
(
' %s: %s'
%
(
utils
.
oid_repr
(
oid
),
r
))
o
.
append
(
' %s: %s'
%
(
oid_repr
(
oid
),
r
))
o
.
append
(
'
\
n
Version Index:'
)
o
.
append
(
'
\
n
Version Index:'
)
items
=
self
.
_vindex
.
items
()
items
=
self
.
_vindex
.
items
()
...
@@ -534,6 +534,6 @@ class DemoStorage(BaseStorage.BaseStorage):
...
@@ -534,6 +534,6 @@ class DemoStorage(BaseStorage.BaseStorage):
vitems
.
sort
()
vitems
.
sort
()
for
oid
,
r
in
vitems
:
for
oid
,
r
in
vitems
:
if
r
:
r
=
id
(
r
)
if
r
:
r
=
id
(
r
)
o
.
append
(
' %s: %s'
%
(
utils
.
oid_repr
(
oid
),
r
))
o
.
append
(
' %s: %s'
%
(
oid_repr
(
oid
),
r
))
return
string
.
join
(
o
,
'
\
n
'
)
return
'
\
n
'
.
join
(
o
)
src/ZODB/ExportImport.py
View file @
fbb50b05
...
@@ -21,7 +21,6 @@ import logging
...
@@ -21,7 +21,6 @@ import logging
from
ZODB.POSException
import
ExportError
from
ZODB.POSException
import
ExportError
from
ZODB.utils
import
p64
,
u64
from
ZODB.utils
import
p64
,
u64
from
ZODB.serialize
import
referencesf
from
ZODB.serialize
import
referencesf
import
sys
logger
=
logging
.
getLogger
(
'ZODB.ExportImport'
)
logger
=
logging
.
getLogger
(
'ZODB.ExportImport'
)
...
...
src/ZODB/Mount.py
View file @
fbb50b05
...
@@ -15,9 +15,7 @@
...
@@ -15,9 +15,7 @@
$Id$"""
$Id$"""
import
string
import
time
import
time
import
sys
import
thread
import
thread
import
logging
import
logging
import
persistent
import
persistent
...
@@ -187,7 +185,7 @@ class MountPoint(persistent.Persistent, Acquisition.Implicit):
...
@@ -187,7 +185,7 @@ class MountPoint(persistent.Persistent, Acquisition.Implicit):
if
newMount
:
if
newMount
:
try
:
id
=
data
.
getId
()
try
:
id
=
data
.
getId
()
except
:
id
=
'???'
# data has no getId() method. Bad.
except
:
id
=
'???'
# data has no getId() method. Bad.
p
=
string
.
join
(
parent
.
getPhysicalPath
()
+
(
id
,),
'/'
)
p
=
'/'
.
join
(
parent
.
getPhysicalPath
()
+
(
id
,)
)
logger
.
info
(
'Mounted database %s at %s'
,
logger
.
info
(
'Mounted database %s at %s'
,
self
.
_getMountParams
(),
p
)
self
.
_getMountParams
(),
p
)
else
:
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