Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
edc70235
Commit
edc70235
authored
Apr 26, 2007
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support storages without any undo methods.
parent
f78cb69e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
src/ZODB/Blobs/BlobStorage.py
src/ZODB/Blobs/BlobStorage.py
+9
-2
No files found.
src/ZODB/Blobs/BlobStorage.py
View file @
edc70235
...
@@ -41,7 +41,7 @@ class BlobStorage(SpecificationDecoratorBase):
...
@@ -41,7 +41,7 @@ class BlobStorage(SpecificationDecoratorBase):
# Proxies can't have a __dict__ so specifying __slots__ here allows
# Proxies can't have a __dict__ so specifying __slots__ here allows
# us to have instance attributes explicitly on the proxy.
# us to have instance attributes explicitly on the proxy.
__slots__
=
(
'fshelper'
,
'dirty_oids'
)
__slots__
=
(
'fshelper'
,
'dirty_oids'
,
'_BlobStorage__supportsUndo'
)
def
__new__
(
self
,
base_directory
,
storage
):
def
__new__
(
self
,
base_directory
,
storage
):
return
SpecificationDecoratorBase
.
__new__
(
self
,
storage
)
return
SpecificationDecoratorBase
.
__new__
(
self
,
storage
)
...
@@ -53,6 +53,13 @@ class BlobStorage(SpecificationDecoratorBase):
...
@@ -53,6 +53,13 @@ class BlobStorage(SpecificationDecoratorBase):
self
.
fshelper
.
create
()
self
.
fshelper
.
create
()
self
.
fshelper
.
checkSecure
()
self
.
fshelper
.
checkSecure
()
self
.
dirty_oids
=
[]
self
.
dirty_oids
=
[]
try
:
supportsUndo
=
storage
.
supportsUndo
except
AttributeError
:
supportsUndo
=
False
else
:
supportsUndo
=
supportsUndo
()
self
.
__supportsUndo
=
supportsUndo
@
non_overridable
@
non_overridable
def
__repr__
(
self
):
def
__repr__
(
self
):
...
@@ -184,7 +191,7 @@ class BlobStorage(SpecificationDecoratorBase):
...
@@ -184,7 +191,7 @@ class BlobStorage(SpecificationDecoratorBase):
# perform a pack on blob data
# perform a pack on blob data
self
.
_lock_acquire
()
self
.
_lock_acquire
()
try
:
try
:
if
unproxied
.
supportsUndo
()
:
if
self
.
__supportsUndo
:
self
.
_packUndoing
(
packtime
,
referencesf
)
self
.
_packUndoing
(
packtime
,
referencesf
)
else
:
else
:
self
.
_packNonUndoing
(
packtime
,
referencesf
)
self
.
_packNonUndoing
(
packtime
,
referencesf
)
...
...
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