##// END OF EJS Templates
scm: code clean up repositories controller....
Toshi MARUYAMA -
r5755:5543ec5f5a4f
parent child
Show More
@@ -82,7 +82,10 class RepositoriesController < ApplicationController
82
82
83 def destroy
83 def destroy
84 @repository.destroy
84 @repository.destroy
85 redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'repository'
85 redirect_to :controller => 'projects',
86 :action => 'settings',
87 :id => @project,
88 :tab => 'repository'
86 end
89 end
87
90
88 def show
91 def show
@@ -204,7 +207,8 class RepositoriesController < ApplicationController
204 User.current.pref[:diff_type] = @diff_type
207 User.current.pref[:diff_type] = @diff_type
205 User.current.preference.save
208 User.current.preference.save
206 end
209 end
207 @cache_key = "repositories/diff/#{@repository.id}/" + Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}")
210 @cache_key = "repositories/diff/#{@repository.id}/" +
211 Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}")
208 unless read_fragment(@cache_key)
212 unless read_fragment(@cache_key)
209 @diff = @repository.diff(@path, @rev, @rev_to)
213 @diff = @repository.diff(@path, @rev, @rev_to)
210 show_error_not_found unless @diff
214 show_error_not_found unless @diff
General Comments 0
You need to be logged in to leave comments. Login now