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 2019/07/18 13:01:30 UTC

[whimsy] branch master updated: Simplify; $stderr should go to /srv/svn/procmail.log

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 7a98a7d  Simplify; $stderr should go to /srv/svn/procmail.log
7a98a7d is described below

commit 7a98a7d60055121587c3284179651c8939148c99
Author: Sebb <se...@apache.org>
AuthorDate: Thu Jul 18 14:01:26 2019 +0100

    Simplify; $stderr should go to /srv/svn/procmail.log
---
 tools/svnupdate.rb | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/tools/svnupdate.rb b/tools/svnupdate.rb
index 6a4e379..7da7de1 100644
--- a/tools/svnupdate.rb
+++ b/tools/svnupdate.rb
@@ -13,27 +13,21 @@ mail = Mail.new(STDIN.read)
 # This must agree with the file used by the svnupdate cron job
 LOG = '/srv/whimsy/www/logs/svn-update'
 
-# More testing
-LOGTMP = '/srv/whimsy/www/logs/svn-update.tmp'
-$stderr.reopen(File.new(LOGTMP,'at'))
-$stdout.reopen(File.new(LOGTMP,'at'))
-
 def update(dir)
   # prevent concurrent updates being performed by the cron job
   File.open(LOG, File::RDWR|File::CREAT, 0644) do |log|
     log.flock(File::LOCK_EX)
 
-    puts "#{Time.now} Updating #{dir}" # Temporary test
+    $stderr.puts "#{Time.now} Updating #{dir}" # Temporary test
     Dir.chdir dir do
-      puts `svn cleanup`
-      puts `svn update`
+      $stderr.puts `svn cleanup`
+      $stderr.puts `svn update`
     end
   end
 end
 
 if mail.subject =~ %r{^board: r\d+ -( in)? /foundation/board} # board-commits@
 
-  puts "Matched board" # test
   # prevent concurrent updates being performed by the cron job
   File.open(LOG, File::RDWR|File::CREAT, 0644) do |log|
     log.flock(File::LOCK_EX)
@@ -72,7 +66,5 @@ elsif mail.subject =~ %r{^bills: r\d+ -( in)? /financials/Bills} # operations@
     end
   end
 
-else
-  puts mail.subject # temporary test
 end