You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2020/06/09 20:53:06 UTC
[whimsy] branch master updated: Replace _.system('svn') with
library routine
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new dfe849c Replace _.system('svn') with library routine
dfe849c is described below
commit dfe849c3ea99b3796bf81342e2462a415d2beff9
Author: Sebb <se...@apache.org>
AuthorDate: Tue Jun 9 21:52:55 2020 +0100
Replace _.system('svn') with library routine
---
www/committers/subscribe.cgi | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/www/committers/subscribe.cgi b/www/committers/subscribe.cgi
index 7c6e9d6..72cb4f3 100755
--- a/www/committers/subscribe.cgi
+++ b/www/committers/subscribe.cgi
@@ -247,24 +247,24 @@ _html do
# commit using user's credentials if possible, otherwise use whisysvn
if not $PASSWORD
- credentials = nil
+ credentials = {}
elsif user.asf_member?
- credentials = ['--username', $USER, '--password', $PASSWORD]
+ credentials = {user: $USER, password: $PASSWORD}
else
- credentials = ['--username', 'whimsysvn']
+ credentials = {user: 'whimsysvn'}
end
- _.system ['svn', 'checkout', SUBREQ, tmpdir,
- ['--no-auth-cache', '--non-interactive'], credentials]
+ options = credentials.merge({args: tmpdir})
+ ASF::SVN.svn_('checkout', SUBREQ, _, options)
Dir.chdir tmpdir do
if File.exist? fn
File.write(fn, request + "\n")
- _.system ['svn', 'st']
+ ASF::SVN.svn('status', '.')
else
File.write(fn, request + "\n")
- _.system ['svn', 'add', fn]
+ ASF::SVN.svn('add', fn)
end
if @request != 'unsub'
@@ -273,8 +273,8 @@ _html do
message = "#{@list} -= #{$USER}"
end
- rc = _.system ['svn', 'commit', fn, '--message', message,
- ['--no-auth-cache', '--non-interactive'], credentials]
+ options = credentials.merge({args: ['--message', message]})
+ rc = ASF::SVN.svn_('commit', fn, _, options)
end
end