File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ def settings
9696 def push
9797 respond_to do |format |
9898 format . html {
99- @mirror . push
99+ ( @push_failed , @shellout ) = @mirror . push
100100 }
101101 end
102102 end
Original file line number Diff line number Diff line change @@ -18,19 +18,12 @@ def to_s
1818
1919 def push
2020 repo_path = GitHosting . repository_path ( project )
21- shellout = %x[ echo 'cd "#{ repo_path } " ; env GIT_SSH=~/.ssh/run_gitolite_admin_ssh git push --mirror "#{ url } " 2>&1' | #{ GitHosting . git_user_runner } "bash" ]
21+ shellout = %x[ echo 'cd "#{ repo_path } " ; env GIT_SSH=~/.ssh/run_gitolite_admin_ssh git push --mirror "#{ url } " 2>&1' | #{ GitHosting . git_user_runner } "bash" ] . chomp
2222 push_failed = ( $?. to_i !=0 ) ? true : false
23-
24- err_output = push_failed ? "" : ""
2523 if push_failed
26- ms = " #{ mirror . url } push error "
27- nr = ( 70 -ms . length ) /2
28- GitHosting . logger . debug "Failed:\n %{nrs} #{ ms } %{nrs}\n #{ shellout } %{nre} #{ ms } %{nre}\n " % { :nrs => ">" *nr , :nre => "<" *nr }
29- err_output = err_output + ( "%{nrs} #{ ms } %{nrs}\n " % { :nrs => ">" *nr } )
30- err_output = err_output + "#{ shellout } "
31- err_output = err_output + ( "%{nre} #{ ms } %{nre}\n " % { :nre => "<" *nr } )
32- end
33- err_output
24+ GitHosting . logger . error "Mirror push error: #{ url } \n #{ shellout } "
25+ end
26+ [ push_failed , shellout ]
3427 end
3528
3629end
You can’t perform that action at this time.
0 commit comments