Commit a9d355ee authored by Jean-Paul Smets's avatar Jean-Paul Smets

Fixed major acquisition bug which made revert operation destroy whatever was present.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12083 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 50001d8a
......@@ -885,6 +885,10 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
other_files=None, recurse=False):
"""Revert local changes in a file or a directory
in ZODB and on hard drive
XXX-JPS: naming of parameters is wrong. added_files
should be added_file_list. Action: rename to added_file_list
and provide compatibility for scripts.
"""
client = self._getClient()
object_to_update = {}
......@@ -923,7 +927,7 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
path_added_list.append(tmp)
## hack to remove objects
# Create a temporary bt with objects to delete
tmp_bt = getToolByName(business_template, 'portal_templates')\
tmp_bt = getToolByName(business_template.getPortalObject(), 'portal_templates')\
.newContent(portal_type="Business Template")
tmp_bt.setTemplatePathList(path_added_list)
tmp_bt.setTitle('tmp_bt_revert')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment