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/10 13:00:22 UTC
[whimsy.git] [1/1] Commit 9fe0da7: don't try to update a read-only checkout
Commit 9fe0da70ac6abd3b8957a335df74700cba828ef1:
don't try to update a read-only checkout
Branch: refs/heads/master
Author: Sam Ruby <ru...@intertwingly.net>
Committer: Sam Ruby <ru...@intertwingly.net>
Pusher: rubys <ru...@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