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 dc77e26 Use library routine
dc77e26 is described below
commit dc77e26ee23e8c324f572daf723d700ca8d5dadb
Author: Sebb <[email protected]>
AuthorDate: Thu Jul 23 20:53:33 2020 +0100
Use library routine
---
www/secretary/workbench/views/actions/icla.json.rb | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/www/secretary/workbench/views/actions/icla.json.rb
b/www/secretary/workbench/views/actions/icla.json.rb
index 4072eec..c2a4057 100644
--- a/www/secretary/workbench/views/actions/icla.json.rb
+++ b/www/secretary/workbench/views/actions/icla.json.rb
@@ -188,22 +188,14 @@ if @valid_user and @pmc and not @votelink.empty?
end
complete do |dir|
- # checkout acreq directory
- svn 'checkout', '--depth', 'files',
- ASF::SVN.svnurl!('acreq'),
- "#{dir}/acreq"
- # update new-account-reqs.txt
- dest = "#{dir}/acreq/new-account-reqs.txt"
+ rc = ASF::SVN.update(ASF::SVN.svnpath!('acreq', 'new-account-reqs.txt'),
+ "#{@user} account request by #{env.user} for #{@pmc.name}",
+ env, _, {diff: true}) do |input|
+ input + + @acreq + "\n"
+ end
+ raise RuntimeError.new("exit code: #{rc}") if rc != 0
- # update iclas.txt
- File.write dest, File.read(dest) + @acreq + "\n"
-
- # show the changes
- svn 'diff', dest
-
- # commit changes
- svn 'commit', dest, '-m', "#{@user} account request by #{env.user} for
#{@pmc.name}"
end
end