Commit 3b7784e4 authored by Romain Courteaud's avatar Romain Courteaud

erp5_forge: handle SVN exception

parent 664df735
......@@ -56,4 +56,4 @@ try:
removed=commit_dict['removed']
)
except Exception, error:
return context.BusinessTemplate_handleException(error, script.id, commit_dict=commit_dict)
return context.BusinessTemplate_handleException(error, script.id, commit_dict)
import json
commit_dict = json.loads(commit_json) if commit_json is not None else {
'keep': keep
}
if keep:
commit_dict['keep'] = keep
try:
new_bt = context.getVcsTool().update(keep)
new_bt = context.getVcsTool().update(commit_dict['keep'])
except Exception, error:
return context.BusinessTemplate_handleException(
error, script.id, form_id=form_id, keep=keep)
error, script.id, commit_dict)
return new_bt.Base_redirect('BusinessTemplate_viewInstallationDialog', keep_items={
'portal_status_message': 'Working copy updated successfully.',
'workflow_action': 'install_action',
'form_id': form_id
'form_id': 'view'
})
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form_id=\'view\', keep=False</string> </value>
<value> <string>commit_json=None, keep=False</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -18,11 +18,10 @@ except GitLoginError, e:
method = 'BusinessTemplate_viewGitLogin'
commit_dict['caller'] = caller
# XXX caller_kw
# Always propage all informations throught formulator hidden field
request = context.REQUEST
request.form['your_commit_json'] = json.dumps(commit_dict)
return context.Base_renderForm(method, keep_items={
return context.asContext(**kw).Base_renderForm(method, keep_items={
'portal_status_message': message
})
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>exception, caller, commit_dict, **caller_kw</string> </value>
<value> <string>exception, caller, commit_dict</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -125,7 +125,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: context.getVcsTool().getRemoteUrl()</string> </value>
<value> <string>here/remote_url</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -65,6 +65,8 @@
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
</list>
</value>
</item>
......@@ -72,6 +74,20 @@
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>your_commit_json</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
......
......@@ -65,6 +65,8 @@
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
</list>
</value>
</item>
......@@ -72,6 +74,20 @@
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>your_commit_json</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
......
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