whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/1] Commit 9fe0da7: don't try to update a read-only checkout
Date Thu, 10 Mar 2016 12:00:22 GMT
Commit 9fe0da70ac6abd3b8957a335df74700cba828ef1:
    don't try to update a read-only checkout


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

------------------------------------------------------------
www/board/agenda/models/agenda.rb                            | ++ -------
------------------------------------------------------------
17 changes: 3 additions, 14 deletions.
------------------------------------------------------------


diff --git a/www/board/agenda/models/agenda.rb b/www/board/agenda/models/agenda.rb
index 527f8ca..69f95a1 100755
--- a/www/board/agenda/models/agenda.rb
+++ b/www/board/agenda/models/agenda.rb
@@ -100,23 +100,12 @@ def self.update(file, message, retries=20, &block)
         end
       end
 
-      # update the file in question; update output if mtime changed
-      # (it may not: during testing, commits are prevented)
-      path = File.join(FOUNDATION_BOARD, file)
-      File.open(path, 'r') do |fh|
-        fh.flock(File::LOCK_EX)
-        _.system ['svn', 'cleanup', FOUNDATION_BOARD]
-        mtime = File.mtime(path) if output
-        _.system ['svn', 'update', auth, path]
-        output = IO.read(path) if mtime != File.mtime(path)
-      end
-
-      # reparse the file if the output changed
-      if output != baseline or mtime != File.mtime(path)
+      # update the cache if the file has changed
+      if output != baseline
         self.update_cache(file, path, output, ENV['RACK_ENV'] == 'test')
       end
 
-      # return the result
+      # return the result in the response
       _.method_missing(:_agenda, Agenda[file][:parsed])
     end
 

Mime
View raw message