Fixed: log is not displayed when browsing a copy in a svn repository.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@843 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-10-15 18:41:27 +00:00
parent b9cc65db61
commit 9ce5713ee4
5 changed files with 17 additions and 7 deletions
+8
View File
@@ -42,6 +42,14 @@ class Repository < ActiveRecord::Base
scm.diff(path, rev, rev_to, type)
end
# Default behaviour: we search in cached changesets
def changesets_for_path(path)
path = "/#{path}" unless path.starts_with?('/')
Change.find(:all, :include => :changeset,
:conditions => ["repository_id = ? AND path = ?", id, path],
:order => "committed_on DESC, #{Changeset.table_name}.revision DESC").collect(&:changeset)
end
def latest_changeset
@latest_changeset ||= changesets.find(:first)
end