Commit 80b9ecb2 authored by Christophe Dumez's avatar Christophe Dumez

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
parent 1ecc7dcf
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
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