From: William Morgan Date: Tue, 25 Aug 2009 13:51:15 +0000 (-0400) Subject: Merge branch 'locking-refactor' X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=da1abd360e25011bdbe23b9194f926f29b8aef44;p=sup Merge branch 'locking-refactor' Conflicts: bin/sup bin/sup-sync-back bin/sup-tweak-labels lib/sup.rb lib/sup/suicide.rb --- da1abd360e25011bdbe23b9194f926f29b8aef44 diff --cc bin/sup index 8a377f7,c6556e3..bbb6c17 --- a/bin/sup +++ b/bin/sup @@@ -130,32 -129,8 +130,8 @@@ def stop_cursin end module_function :start_cursing, :stop_cursing -Index.new +Index.init - begin - Index.lock - rescue Index::LockError => e - require 'highline' - - h = HighLine.new - h.wrap_at = :auto - h.say Index.fancy_lock_error_message_for(e) - - case h.ask("Should I ask that process to kill itself? ") - when /^\s*y(es)?\s*$/i - h.say "Ok, suggesting seppuku..." - FileUtils.touch Redwood::SUICIDE_FN - sleep SuicideManager::DELAY * 2 - FileUtils.rm_f Redwood::SUICIDE_FN - h.say "Let's try that again." - retry - else - h.say < e - $stderr.puts fancy_lock_error_message_for(e) - $stderr.puts <