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 3b39c32  Simplify by using SVN.update method
3b39c32 is described below

commit 3b39c328ec8285a040c2d62399f0039b1fdcf08b
Author: Sebb <s...@apache.org>
AuthorDate: Wed Jul 8 21:02:46 2020 +0100

    Simplify by using SVN.update method
---
 www/secretary/workbench/views/actions/ccla.json.rb | 21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/www/secretary/workbench/views/actions/ccla.json.rb 
b/www/secretary/workbench/views/actions/ccla.json.rb
index fa8f7a0..54f88b3 100644
--- a/www/secretary/workbench/views/actions/ccla.json.rb
+++ b/www/secretary/workbench/views/actions/ccla.json.rb
@@ -90,23 +90,10 @@ task "svn commit foundation/officers/cclas.txt" do
   end
 
   complete do |dir|
-    # checkout empty officers directory
-    svn 'checkout', '--depth', 'empty',
-      ASF::SVN.svnurl!('officers'), 
-      File.join(dir, 'officers')
-
-    # retrieve cclas.txt
-    dest = File.join(dir, 'officers', 'cclas.txt')
-    svn 'update', dest
-
-    # update cclas.txt
-    File.write dest, File.read(dest) + @cclalines + "\n"
-
-    # show the changes
-    svn 'diff', dest
-
-    # commit changes
-    svn 'commit', dest, '-m', @document
+    path = ASF::SVN.svnpath!('officers', 'cclas.txt')
+    ASF::SVN.update(path, @document, env, _, {diff: true}) do |tmpdir, 
contents|
+      contents + @cclalines + "\n"
+    end
   end
 end
 

Reply via email to