@@ -25,7 +25,6 @@ def create
25
25
@mirror . project = @project
26
26
27
27
if @mirror . save
28
- GitHosting . git_mirror_identity_file ( @mirror )
29
28
respond_to do |format |
30
29
format . html {
31
30
redirect_to (
@@ -53,7 +52,6 @@ def edit
53
52
def update
54
53
respond_to do |format |
55
54
if @mirror . update_attributes ( params [ :repository_mirrors ] )
56
- GitHosting . git_mirror_identity_file ( @mirror )
57
55
format . html {
58
56
redirect_to (
59
57
url_for (
@@ -78,7 +76,6 @@ def destroy
78
76
# display confirmation view
79
77
else
80
78
if params [ :confirm ]
81
- identify_file = GitHosting . git_mirror_identity_file ( @mirror )
82
79
%x[#{ git_user_runner } rm #{ identify_file } ]
83
80
redirect_url = url_for (
84
81
:controller => 'projects' ,
@@ -100,13 +97,13 @@ def settings
100
97
def push
101
98
respond_to do |format |
102
99
format . html {
103
- @shellout = %x{ export GIT_MIRROR_IDENTITY_FILE=#{ GitHosting . git_mirror_identity_file ( @mirror ) } ; export GIT_SSH='#{ GitHosting . git_exec_mirror } '; #{ GitHosting . git_exec } --git-dir='#{ GitHosting . repository_path ( @project ) } .git' push --mirror '#{ @mirror . url } ' 2>&1 }
104
- @push_failed = ( $?. to_i !=0 ) ? true : false
105
- if @push_failed
106
- ms = " #{ @mirror . url } push error "
107
- nr = ( 70 -ms . length ) /2
108
- GitHosting . logger . debug "Failed:\n %{nrs} #{ ms } %{nrs}\n #{ @shellout } %{nre} #{ ms } %{nre}\n " % { :nrs => ">" *nr , :nre => "<" *nr }
109
- end
100
+ # @shellout = %x{ export GIT_MIRROR_IDENTITY_FILE=#{GitHosting.git_mirror_identity_file(@mirror)}; export GIT_SSH='#{GitHosting.git_exec_mirror}'; #{GitHosting.git_exec} --git-dir='#{GitHosting.repository_path(@project)}.git' push --mirror '#{@mirror.url}' 2>&1 }
101
+ # @push_failed = ($?.to_i!=0) ? true : false
102
+ # if @push_failed
103
+ # ms = " #{@mirror.url} push error "
104
+ # nr = (70-ms.length)/2
105
+ # GitHosting.logger.debug "Failed:\n%{nrs} #{ms} %{nrs}\n#{@shellout}%{nre} #{ms} %{nre}\n" % {:nrs => ">"*nr, :nre => "<"*nr}
106
+ # end
110
107
}
111
108
end
112
109
end
0 commit comments