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
699f1162
Commit
699f1162
authored
Dec 18, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed _getCopy to use db export/import.
parent
690a9690
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
lib/python/OFS/CopySupport.py
lib/python/OFS/CopySupport.py
+8
-4
No files found.
lib/python/OFS/CopySupport.py
View file @
699f1162
"""Copy interface"""
__version__
=
'$Revision: 1.
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
6
$'
[
11
:
-
2
]
import
Globals
,
Moniker
,
rPickle
import
Globals
,
Moniker
,
rPickle
,
tempfile
from
cPickle
import
loads
,
dumps
from
urllib
import
quote
,
unquote
from
App.Dialogs
import
MessageDialog
rPickle
.
register
(
'OFS.Moniker'
,
'Moniker'
,
Moniker
.
Moniker
)
...
...
@@ -68,7 +67,12 @@ class CopySource:
def
_getCopy
(
self
,
container
):
# Ask an object for a new copy of itself.
return
loads
(
dumps
(
self
,
1
))
f
=
tempfile
.
TemporaryFile
()
self
.
_p_jar
.
export_file
(
self
,
f
)
f
.
seek
(
0
)
r
=
container
.
_p_jar
.
import_file
(
f
)
f
.
close
()
return
r
def
_postCopy
(
self
,
container
):
# Called after the copy is finished to accomodate special cases
...
...
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