Commit 9884ce43 authored by Christophe Dumez's avatar Christophe Dumez

- Don't revert changes before updating business template anymore. This way, we...

- Don't revert changes before updating business template anymore. This way, we don't loose local changes when updating a BT.
- Removed "update local working copy" function because it made it too easy to revert changes committed by someone else without noticing


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8390 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3fa56d54
......@@ -733,27 +733,11 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
# First remove unversioned in working copy that could conflict
self.removeAllInList(x['uid'] for x in self.unversionedFiles(path))
client = self._getClient()
# Revert local changes in working copy first
# to import a "pure" BT after update
self.revert(path=path, recurse=True)
# Update from SVN
client.update(path)
# Import in zodb
return self.importBT(business_template)
security.declareProtected('Import/Export objects', 'updatewc')
def updatewc(self, business_template):
"""Update a working copy.
"""
path = self._getWorkingPath(self.getSubversionPath(business_template))
# First do recursive revert to avoid conflicts
self.revert(path, business_template, True)
# then remove unversioned in working copy that could conflict
self.removeAllInList(x['uid'] for x in self.unversionedFiles(path))
client = self._getClient()
# Update from SVN
client.update(path)
security.declareProtected('Import/Export objects', 'switch')
def switch(self, business_template, url):
"""switch SVN repository for a working copy.
......
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