Commit 51c16a3f authored by Christophe Dumez's avatar Christophe Dumez

- added svn switch function


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7206 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cc752165
...@@ -256,6 +256,9 @@ try: ...@@ -256,6 +256,9 @@ try:
def revert(self, path, recurse=False): def revert(self, path, recurse=False):
return self.client.revert(path, recurse) return self.client.revert(path, recurse)
def switch(self, path, url):
return self.client.switch(path=path, url=url)
def log(self, path): def log(self, path):
try: try:
log_list = self.client.log(path) log_list = self.client.log(path)
......
...@@ -627,6 +627,15 @@ class SubversionTool(BaseTool, UniqueObject, Folder): ...@@ -627,6 +627,15 @@ class SubversionTool(BaseTool, UniqueObject, Folder):
# Import in zodb # Import in zodb
return self.importBT(bt) return self.importBT(bt)
security.declareProtected('Import/Export objects', 'switch')
def switch(self, bt, url):
"""switch SVN repository for a working copy.
"""
path = self.getSubversionPath(bt)
client = self._getClient()
# Update from SVN
client.switch(path, url)
security.declareProtected('Import/Export objects', 'add') security.declareProtected('Import/Export objects', 'add')
# path can be a list or not (relative or absolute) # path can be a list or not (relative or absolute)
def add(self, path, bt=None): def add(self, path, bt=None):
......
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