From 141a5bf1ebd9a432cd8e94dd57ed76c5f7503670 Mon Sep 17 00:00:00 2001 From: Christophe Dumez <christophe@nexedi.com> Date: Mon, 27 Mar 2006 13:44:30 +0000 Subject: [PATCH] - Working on diff - fixed a bug in xml generation git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6316 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Subversion/SubversionClient.py | 5 +++++ product/ERP5Subversion/Tool/SubversionTool.py | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/product/ERP5Subversion/SubversionClient.py b/product/ERP5Subversion/SubversionClient.py index ee209c897b..770247c500 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 838662c958..43f4fc56a4 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) : -- 2.30.9