Adds a setting to limit the number of revisions displayed on a repository file log (default=100).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2350 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -76,11 +76,12 @@ class Repository < ActiveRecord::Base
|
||||
end
|
||||
|
||||
# Default behaviour: we search in cached changesets
|
||||
def changesets_for_path(path)
|
||||
def changesets_for_path(path, options={})
|
||||
path = "/#{path}" unless path.starts_with?('/')
|
||||
Change.find(:all, :include => {:changeset => :user},
|
||||
:conditions => ["repository_id = ? AND path = ?", id, path],
|
||||
:order => "committed_on DESC, #{Changeset.table_name}.id DESC").collect(&:changeset)
|
||||
:conditions => ["repository_id = ? AND path = ?", id, path],
|
||||
:order => "committed_on DESC, #{Changeset.table_name}.id DESC",
|
||||
:limit => options[:limit]).collect(&:changeset)
|
||||
end
|
||||
|
||||
# Returns a path relative to the url of the repository
|
||||
|
||||
Reference in New Issue
Block a user