[refs #90] catch error

This commit is contained in:
Alexander Machehin 2012-09-28 18:26:12 +06:00
parent 847ecc2a15
commit 0069dfffc7
1 changed files with 3 additions and 2 deletions

View File

@ -50,7 +50,8 @@ class PullRequest < ActiveRecord::Base
end
def check(do_transaction = true)
new_status = case merge
res = merge
new_status = case res
when /Already up-to-date/
'already'
when /Merge made by the 'recursive' strategy/
@ -60,7 +61,7 @@ class PullRequest < ActiveRecord::Base
system("cd #{path} && git reset --hard HEAD") # clean git index
'block'
else
raise
raise res
end
if do_transaction