You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sam Ruby <ru...@apache.org> on 2016/03/29 17:57:57 UTC

[whimsy.git] [1/1] Commit bbb4fe4: commit member status changes

Commit bbb4fe427751b1087455329d847b92eb55d79817:
    commit member status changes


Branch: refs/heads/master
Author: Sam Ruby <ru...@intertwingly.net>
Committer: Sam Ruby <ru...@intertwingly.net>
Pusher: rubys <ru...@apache.org>

------------------------------------------------------------
www/roster/views/actions/memstat.json.rb                     | +++++++ -----
------------------------------------------------------------
12 changes: 7 additions, 5 deletions.
------------------------------------------------------------


diff --git a/www/roster/views/actions/memstat.json.rb b/www/roster/views/actions/memstat.json.rb
index ac8c92c..5f5759d 100644
--- a/www/roster/views/actions/memstat.json.rb
+++ b/www/roster/views/actions/memstat.json.rb
@@ -13,11 +13,11 @@
   tmpdir.untaint
 
   # checkout out empty foundation directory
-  system ['svn', 'checkout', '--quiet', '--depth', 'empty', *[auth],
+  system ['svn', 'checkout', '--quiet', '--depth', 'empty', auth,
     'https://svn.apache.org/repos/private/foundation', tmpdir]
 
   # fetch single file: members.txt
-  system ['svn', 'update', '--quiet', *[auth], "#{tmpdir}/members.txt"]
+  system ['svn', 'update', '--quiet', auth, "#{tmpdir}/members.txt"]
 
   # read full members.txt
   text = File.read("#{tmpdir}/members.txt")
@@ -28,7 +28,7 @@
   # determine where to put the entry
   if @action == 'emeritus'
     index = text.index(/^\s\*\)\s/, text.index(/^Emeritus/))
-  elsif @action == 'emeritus'
+  elsif @action == 'active'
     index = text.index(/^\s\*\)\s/, text.index(/^Active/))
   else
     raise Exception.new("invalid action #{action.inspect}")
@@ -40,8 +40,10 @@
   # sort the text and save the result to disk
   File.write("#{tmpdir}/members.txt", ASF::Member.sort(text))
 
-  # for now, just show what would have been committed
-  system ['svn', 'diff', "#{tmpdir}/members.txt"]
+  # commit changes
+  rc = system ['svn', 'commit', auth, "#{tmpdir}/members.txt",
+    '--message', "Move #{ASF::Person.find(@userid).member_name} to #{action}"]
+  raise Exception.new("svn commit failed") unless rc == 0
 end
 
 # return  updated committer info