Replaces find(:all) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10917 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -92,11 +92,12 @@ class Repository::Mercurial < Repository
|
||||
# Sqlite3 and PostgreSQL pass.
|
||||
# Is this MySQL bug?
|
||||
def latest_changesets(path, rev, limit=10)
|
||||
changesets.find(:all,
|
||||
:include => :user,
|
||||
:conditions => latest_changesets_cond(path, rev, limit),
|
||||
:limit => limit,
|
||||
:order => "#{Changeset.table_name}.id DESC")
|
||||
changesets.
|
||||
includes(:user).
|
||||
where(latest_changesets_cond(path, rev, limit)).
|
||||
limit(limit).
|
||||
order("#{Changeset.table_name}.id DESC").
|
||||
all
|
||||
end
|
||||
|
||||
def latest_changesets_cond(path, rev, limit)
|
||||
|
||||
Reference in New Issue
Block a user