diff --git a/product/ERP5Subversion/SubversionClient.py b/product/ERP5Subversion/SubversionClient.py index d10d5ba2fee5aec6bac3f9fa4514aefed27a8c30..06bd4b154ef69e6e3bf119278b62ac90da526985 100644 --- a/product/ERP5Subversion/SubversionClient.py +++ b/product/ERP5Subversion/SubversionClient.py @@ -242,6 +242,12 @@ try: # Since plain Python classes are not convenient in Zope, convert the objects. return [Status(x) for x in self.client.status(path, **kw)] + def removeAllInList(self, list): + """Remove all files and folders in list + """ + for file in list: + removeAll(file) + def diff(self, path, revision1, revision2): tmp = mktemp() os.makedirs(tmp) @@ -250,7 +256,7 @@ try: else: diff = self.client.diff(tmp_path=tmp, url_or_path=path, recurse=False, revision1=pysvn.Revision(pysvn.opt_revision_kind.number,revision1), revision2=pysvn.Revision(pysvn.opt_revision_kind.number,revision2)) # clean up temp dir - removeAll(tmp) + self.activate().removeAllInList([tmp,]) return diff def revert(self, path, recurse=False): diff --git a/product/ERP5Subversion/Tool/SubversionTool.py b/product/ERP5Subversion/Tool/SubversionTool.py index 5df83c89e3d6048ab795443ca4b7cb3d2615721e..5de89ed037919e513ad71b7b3b51e67b60f273a4 100644 --- a/product/ERP5Subversion/Tool/SubversionTool.py +++ b/product/ERP5Subversion/Tool/SubversionTool.py @@ -633,8 +633,10 @@ class SubversionTool(BaseTool, UniqueObject, Folder): """ path = self.getSubversionPath(bt) client = self._getClient() + if url[-1] == '/' : + url = url[:-1] # Update from SVN - client.switch(path, url) + client.switch(path=path, url=url) security.declareProtected('Import/Export objects', 'add') # path can be a list or not (relative or absolute)