diff options
Diffstat (limited to 'app/models/repository/mercurial.rb')
-rw-r--r-- | app/models/repository/mercurial.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/models/repository/mercurial.rb b/app/models/repository/mercurial.rb index 54262d9a6..ac10e064c 100644 --- a/app/models/repository/mercurial.rb +++ b/app/models/repository/mercurial.rb @@ -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) |