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
507ab6cb
Commit
507ab6cb
authored
Nov 26, 2004
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Collector #1593: fixed dumb _get_id() implementation in
OFS.CopySupport that produced copy_of_copy_of....files
parent
307c6a52
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
doc/CHANGES.txt
doc/CHANGES.txt
+3
-0
lib/python/OFS/CopySupport.py
lib/python/OFS/CopySupport.py
+9
-4
No files found.
doc/CHANGES.txt
View file @
507ab6cb
...
@@ -46,6 +46,9 @@ Zope Changes
...
@@ -46,6 +46,9 @@ Zope Changes
Bugs fixed
Bugs fixed
- Collector #1593: fixed dumb _get_id() implementation in
OFS.CopySupport that produced copy_of_copy_of....files
- Collector #1450: files in utilities/ZODBTools are now installed
- Collector #1450: files in utilities/ZODBTools are now installed
during the installation process in the 'bin' directory
during the installation process in the 'bin' directory
...
...
lib/python/OFS/CopySupport.py
View file @
507ab6cb
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
$Id$
$Id$
"""
"""
import
sys
,
Globals
,
Moniker
,
tempfile
,
ExtensionClass
import
re
,
sys
,
Globals
,
Moniker
,
tempfile
,
ExtensionClass
from
marshal
import
loads
,
dumps
from
marshal
import
loads
,
dumps
from
urllib
import
quote
,
unquote
from
urllib
import
quote
,
unquote
from
zlib
import
compress
,
decompress
from
zlib
import
compress
,
decompress
...
@@ -113,13 +113,18 @@ class CopyContainer(ExtensionClass.Base):
...
@@ -113,13 +113,18 @@ class CopyContainer(ExtensionClass.Base):
return
self
.
manage_main
(
self
,
REQUEST
)
return
self
.
manage_main
(
self
,
REQUEST
)
return
cp
return
cp
copy_re
=
re
.
compile
(
'^copy[0-9]*_of_'
)
def
_get_id
(
self
,
id
):
def
_get_id
(
self
,
id
):
# Allow containers to override the generation of
# Allow containers to override the generation of
# object copy id by attempting to call its _get_id
# object copy id by attempting to call its _get_id
# method, if it exists.
# method, if it exists.
n
=
0
copy_match
=
self
.
copy_re
.
match
(
id
)
if
(
len
(
id
)
>
8
)
and
(
id
[
8
:]
==
'copy_of_'
):
if
(
copy_match
)
and
(
copy_match
.
end
()
<
len
(
id
)
):
n
=
1
n
=
1
orig_id
=
self
.
copy_re
.
sub
(
''
,
id
)
else
:
n
=
0
orig_id
=
id
orig_id
=
id
while
1
:
while
1
:
if
self
.
_getOb
(
id
,
None
)
is
None
:
if
self
.
_getOb
(
id
,
None
)
is
None
:
...
...
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