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 2022/04/19 12:14:17 UTC

[whimsy] branch master updated: No need to lock unused file

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 7bd9e00e No need to lock unused file
7bd9e00e is described below

commit 7bd9e00eab9b4f54c6c1c71873a0b8b7e10f9ade
Author: Sebb <se...@apache.org>
AuthorDate: Tue Apr 19 13:14:11 2022 +0100

    No need to lock unused file
---
 tools/svnupdate.rb | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/tools/svnupdate.rb b/tools/svnupdate.rb
index f3110f37..208ac84e 100644
--- a/tools/svnupdate.rb
+++ b/tools/svnupdate.rb
@@ -5,24 +5,17 @@
 
 require 'mail'
 
-File.umask(0002)
+File.umask(0o002)
 
 STDIN.binmode
 mail = Mail.new(STDIN.read)
 
-# This must agree with the file used by the svnupdate cron job
-LOG = '/srv/whimsy/www/logs/svn-update'
-
+# N.B. Output goes to the procmail file at /srv/svn/procmail.log
 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)
-
-    $stderr.puts "#{Time.now} Updating #{dir}" # Record updates
-    Dir.chdir dir do
-      $stderr.puts `svn cleanup`
-      $stderr.puts `svn update`
-    end
+  $stderr.puts "#{Time.now} Updating #{dir}" # Record updates
+  Dir.chdir dir do
+    $stderr.puts `svn cleanup`
+    $stderr.puts `svn update`
   end
 end