##// END OF EJS Templates
scm: space and tab cleanup of app/controllers/repositories_controller.rb....
Toshi MARUYAMA -
r4697:3493bb1d3709
parent child
Show More
@@ -67,13 +67,13 class RepositoriesController < ApplicationController
67 67 redirect_to :action => 'committers', :id => @project
68 68 end
69 69 end
70
70
71 71 def destroy
72 72 @repository.destroy
73 73 redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'repository'
74 74 end
75
76 def show
75
76 def show
77 77 @repository.fetch_changesets if Setting.autofetch_changesets? && @path.empty?
78 78
79 79 @entries = @repository.entries(@path, @rev)
@@ -88,7 +88,7 class RepositoriesController < ApplicationController
88 88 end
89 89
90 90 alias_method :browse, :show
91
91
92 92 def changes
93 93 @entry = @repository.entry(@path, @rev)
94 94 (show_error_not_found; return) unless @entry
@@ -96,23 +96,23 class RepositoriesController < ApplicationController
96 96 @properties = @repository.properties(@path, @rev)
97 97 @changeset = @repository.find_changeset_by_name(@rev)
98 98 end
99
99
100 100 def revisions
101 101 @changeset_count = @repository.changesets.count
102 102 @changeset_pages = Paginator.new self, @changeset_count,
103 per_page_option,
104 params['page']
103 per_page_option,
104 params['page']
105 105 @changesets = @repository.changesets.find(:all,
106 :limit => @changeset_pages.items_per_page,
107 :offset => @changeset_pages.current.offset,
108 :include => [:user, :repository])
106 :limit => @changeset_pages.items_per_page,
107 :offset => @changeset_pages.current.offset,
108 :include => [:user, :repository])
109 109
110 110 respond_to do |format|
111 111 format.html { render :layout => false if request.xhr? }
112 112 format.atom { render_feed(@changesets, :title => "#{@project.name}: #{l(:label_revision_plural)}") }
113 113 end
114 114 end
115
115
116 116 def entry
117 117 @entry = @repository.entry(@path, @rev)
118 118 (show_error_not_found; return) unless @entry
@@ -122,7 +122,8 class RepositoriesController < ApplicationController
122 122
123 123 @content = @repository.cat(@path, @rev)
124 124 (show_error_not_found; return) unless @content
125 if 'raw' == params[:format] || @content.is_binary_data? || (@entry.size && @entry.size > Setting.file_max_size_displayed.to_i.kilobyte)
125 if 'raw' == params[:format] || @content.is_binary_data? ||
126 (@entry.size && @entry.size > Setting.file_max_size_displayed.to_i.kilobyte)
126 127 # Force the download
127 128 send_data @content, :filename => filename_for_content_disposition(@path.split('/').last)
128 129 else
@@ -135,7 +136,7 class RepositoriesController < ApplicationController
135 136 def annotate
136 137 @entry = @repository.entry(@path, @rev)
137 138 (show_error_not_found; return) unless @entry
138
139
139 140 @annotate = @repository.scm.annotate(@path, @rev)
140 141 (render_error l(:error_scm_annotate); return) if @annotate.nil? || @annotate.empty?
141 142 @changeset = @repository.find_changeset_by_name(@rev)
@@ -153,7 +154,7 class RepositoriesController < ApplicationController
153 154 rescue ChangesetNotFound
154 155 show_error_not_found
155 156 end
156
157
157 158 def diff
158 159 if params[:format] == 'diff'
159 160 @diff = @repository.diff(@path, @rev, @rev_to)
@@ -185,11 +186,11 class RepositoriesController < ApplicationController
185 186 end
186 187 end
187 188
188 def stats
189 def stats
189 190 end
190
191
191 192 def graph
192 data = nil
193 data = nil
193 194 case params[:graph]
194 195 when "commits_per_month"
195 196 data = graph_commits_per_month(@repository)
General Comments 0
You need to be logged in to leave comments. Login now