Commit 2b5eaf15 authored by Christophe Dumez's avatar Christophe Dumez

Force user to set a changelog (asked by Aurelien)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6562 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d68d9859
......@@ -68,7 +68,7 @@
<key> <string>_body</string> </key>
<value> <string>from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n
\n
if "changelog" in context.REQUEST.keys() and context.REQUEST["changelog"]!=\'\':\n
if "changelog" in context.REQUEST.keys() and context.REQUEST["changelog"].strip()!=\'\':\n
changelog=context.REQUEST["changelog"]\n
else:\n
changelog=None\n
......@@ -95,6 +95,11 @@ if svn_path[-1]!=\'/\':\n
svn_path+=\'/\'\n
\n
if \'changelog\' not in context.REQUEST.keys() :\n
context.REQUEST.set(\'portal_status_message\', \'Please set a changelog message...\')\n
return context.asContext(added=added, modified=modified, removed=removed ,checked=checked).BusinessTemplate_viewSvnChangelog()\n
\n
if not changelog :\n
context.REQUEST.set(\'portal_status_message\', "Error: Changelog Message can\'t be empty!")\n
return context.asContext(added=added, modified=modified, removed=removed ,checked=checked).BusinessTemplate_viewSvnChangelog()\n
\n
try:\n
......
......@@ -66,7 +66,10 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>to_revert = files.split(\',\')\n
<value> <string>if files != \'none\' and files !=\'\':\n
to_revert = files.split(\',\')\n
else:\n
to_revert = files\n
\n
svn_path = context.getPortalObject().portal_preferences.getPreference(\'subversion_working_copy\')\n
if not svn_path :\n
......
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