diff --git a/product/ERP5Subversion/SubversionClient.py b/product/ERP5Subversion/SubversionClient.py index ee209c897b2c8868c37b6e4ff2bc0fc8d21afb68..770247c5001a3c752b8616133f02562a5d0fe9e0 100644 --- a/product/ERP5Subversion/SubversionClient.py +++ b/product/ERP5Subversion/SubversionClient.py @@ -225,6 +225,11 @@ try: def status(self, path, **kw): # Since plain Python classes are not convenient in Zope, convert the objects. return [Status(x) for x in self.client.status(path, **kw)] + + def diff(self, path): + self._getPreferences() + os.system('mkdir -p /tmp/tmp-svn/') + return self.client.diff('/tmp/tmp-svn',path) def newSubversionClient(container, **kw): return SubversionClient(**kw).__of__(container) diff --git a/product/ERP5Subversion/Tool/SubversionTool.py b/product/ERP5Subversion/Tool/SubversionTool.py index 838662c958b31596ab0fd492ecc76cf9bc95be74..43f4fc56a4f615abf48afc77ba7d657796b63d9d 100644 --- a/product/ERP5Subversion/Tool/SubversionTool.py +++ b/product/ERP5Subversion/Tool/SubversionTool.py @@ -260,14 +260,14 @@ class SubversionTool(UniqueObject, Folder): """Make a diff for a file or a directory. """ client = self._getClient() - return client.diff(self._getWorkingPath(path)) + return client.diff(path) security.declareProtected('Import/Export objects', 'revert') def revert(self, path): """Revert local changes in a file or a directory. """ client = self._getClient() - return client.revert(self._getWorkingPath(path)) + return client.revert(path) security.declareProtected('Import/Export objects', 'checkin') def checkin(self, path, log_message = 'None', recurse=True): @@ -282,7 +282,7 @@ class SubversionTool(UniqueObject, Folder): """Get status. """ client = self._getClient() - return client.status(self._getWorkingPath(path), **kw) + return client.status(path, **kw) def getModifiedTree(self, path) : # Remove trailing slash if it's present @@ -324,7 +324,7 @@ class SubversionTool(UniqueObject, Folder): tmp = parent.getDir(filename) tmp.msg_status = str(msg_status) else : - parent.sub_dirs.append(File(filename, str(msg_status))) + parent.sub_dirs.append(File(full_path, str(msg_status))) return somethingModified and root def treeToXML(self, item) :