From 80b9ecb26516880fb1788889e774beef79461847 Mon Sep 17 00:00:00 2001
From: Christophe Dumez <christophe@nexedi.com>
Date: Wed, 12 Apr 2006 14:05:06 +0000
Subject: [PATCH] fixed relative path to absolute path translation (forgotten
 at some places)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6558 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_svn/svn_commit.xml                 | 5 +++--
 .../SkinTemplateItem/portal_skins/erp5_svn/svn_log.xml   | 9 ++++++++-
 .../portal_skins/erp5_svn/svn_revert.xml                 | 6 ++++--
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_commit.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_commit.xml
index 1efa7af765..2700c5470e 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_commit.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_commit.xml
@@ -99,8 +99,7 @@ if \'changelog\' not in context.REQUEST.keys() :\n
 \n
 try:\n
   if commit_non_recurs != \'none\' and commit_non_recurs != \'\':\n
-    for relative_path in commit_non_recurs:\n
-      relative_path = svn_path+relative_path\n
+    commit_non_recurs = [svn_path + relative_path for relative_path in commit_non_recurs]\n
     context.getPortalObject()["portal_subversion"].checkin(path=commit_non_recurs, recurse=False, log_message=changelog)\n
   if commit_recurs != \'none\' and commit_recurs != \'\':\n
     for relative_path in commit_recurs:\n
@@ -171,6 +170,8 @@ return context.BusinessTemplate_viewSvnStatus()\n
                             <string>commit_non_recurs</string>
                             <string>commit_recurs</string>
                             <string>svn_path</string>
+                            <string>append</string>
+                            <string>$append0</string>
                             <string>_getiter_</string>
                             <string>relative_path</string>
                             <string>False</string>
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_log.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_log.xml
index 6b35baa593..164f828763 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_log.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_log.xml
@@ -70,6 +70,12 @@
 
 from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n
 from Products.ERP5Type.Document import newTempBase\n
+svn_path = context.getPortalObject().portal_preferences.getPreference(\'subversion_working_copy\')\n
+if not svn_path :\n
+  raise "Error: Please set Subversion working path in preferences"\n
+if svn_path[-1]!=\'/\':\n
+  svn_path+=\'/\'\n
+file = svn_path + file\n
 try:\n
   log_list = context.getPortalObject()["portal_subversion"].log(file)\n
 except SubversionSSLTrustError, error:\n
@@ -137,8 +143,9 @@ return object_list\n
                             <string>Products.ERP5Type.Document</string>
                             <string>newTempBase</string>
                             <string>_getattr_</string>
-                            <string>_getitem_</string>
                             <string>context</string>
+                            <string>svn_path</string>
+                            <string>_getitem_</string>
                             <string>log_list</string>
                             <string>error</string>
                             <string>error1</string>
diff --git a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_revert.xml b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_revert.xml
index 0b326aa903..fccb7ff3ef 100644
--- a/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_revert.xml
+++ b/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_revert.xml
@@ -67,6 +67,7 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>to_revert = files.split(\',\')\n
+\n
 svn_path = context.getPortalObject().portal_preferences.getPreference(\'subversion_working_copy\')\n
 if not svn_path :\n
   raise "Error: Please set Subversion working path in preferences"\n
@@ -74,8 +75,7 @@ if svn_path[-1]!=\'/\':\n
   svn_path+=\'/\'\n
 \n
 if to_revert != \'none\' :\n
-  for relative_path in to_revert:\n
-    relative_path = svn_path + relative_path\n
+  to_revert = [svn_path + relative_path for relative_path in to_revert]\n
   context.getPortalObject()["portal_subversion"].revert(path=to_revert)\n
 \n
 context.REQUEST.set(\'portal_status_message\', \'Changes reverted successfully!\')\n
@@ -126,6 +126,8 @@ return context.BusinessTemplate_viewSvnStatus()\n
                             <string>context</string>
                             <string>svn_path</string>
                             <string>_getitem_</string>
+                            <string>append</string>
+                            <string>$append0</string>
                             <string>_getiter_</string>
                             <string>relative_path</string>
                           </tuple>
-- 
2.30.9