Mercurial > hg > soundsoftware-site
comparison app/controllers/.svn/text-base/repositories_controller.rb.svn-base @ 210:0579821a129a
Update to Redmine trunk rev 4802
author | Chris Cannam |
---|---|
date | Tue, 08 Feb 2011 13:51:46 +0000 |
parents | 07fa8a8b56a8 |
children | 051f544170fe |
comparison
equal
deleted
inserted
replaced
128:07fa8a8b56a8 | 210:0579821a129a |
---|---|
92 def changes | 92 def changes |
93 @entry = @repository.entry(@path, @rev) | 93 @entry = @repository.entry(@path, @rev) |
94 (show_error_not_found; return) unless @entry | 94 (show_error_not_found; return) unless @entry |
95 @changesets = @repository.latest_changesets(@path, @rev, Setting.repository_log_display_limit.to_i) | 95 @changesets = @repository.latest_changesets(@path, @rev, Setting.repository_log_display_limit.to_i) |
96 @properties = @repository.properties(@path, @rev) | 96 @properties = @repository.properties(@path, @rev) |
97 @changeset = @repository.find_changeset_by_name(@rev) | |
97 end | 98 end |
98 | 99 |
99 def revisions | 100 def revisions |
100 @changeset_count = @repository.changesets.count | 101 @changeset_count = @repository.changesets.count |
101 @changeset_pages = Paginator.new self, @changeset_count, | 102 @changeset_pages = Paginator.new self, @changeset_count, |
125 # Force the download | 126 # Force the download |
126 send_data @content, :filename => @path.split('/').last | 127 send_data @content, :filename => @path.split('/').last |
127 else | 128 else |
128 # Prevent empty lines when displaying a file with Windows style eol | 129 # Prevent empty lines when displaying a file with Windows style eol |
129 @content.gsub!("\r\n", "\n") | 130 @content.gsub!("\r\n", "\n") |
131 @changeset = @repository.find_changeset_by_name(@rev) | |
130 end | 132 end |
131 end | 133 end |
132 | 134 |
133 def annotate | 135 def annotate |
134 @entry = @repository.entry(@path, @rev) | 136 @entry = @repository.entry(@path, @rev) |
135 (show_error_not_found; return) unless @entry | 137 (show_error_not_found; return) unless @entry |
136 | 138 |
137 @annotate = @repository.scm.annotate(@path, @rev) | 139 @annotate = @repository.scm.annotate(@path, @rev) |
138 (render_error l(:error_scm_annotate); return) if @annotate.nil? || @annotate.empty? | 140 (render_error l(:error_scm_annotate); return) if @annotate.nil? || @annotate.empty? |
139 end | 141 @changeset = @repository.find_changeset_by_name(@rev) |
140 | 142 end |
143 | |
141 def revision | 144 def revision |
142 raise ChangesetNotFound if @rev.blank? | 145 raise ChangesetNotFound if @rev.blank? |
143 @changeset = @repository.find_changeset_by_name(@rev) | 146 @changeset = @repository.find_changeset_by_name(@rev) |
144 raise ChangesetNotFound unless @changeset | 147 raise ChangesetNotFound unless @changeset |
145 | 148 |