mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-29 03:39:38 +00:00
Merged r5091 from trunk.
scm: mercurial: add :order => 'id DESC' explicitly for MySQL test fails. Because :order => 'id DESC' is defined at 'has_many', there is no need to set 'order'. But, MySQL test fails. Sqlite3 and PostgreSQL pass. Is this MySQL bug? MySQL svn trunk test on Redmine CI server fails. But, svn 1.1-stable passes. If this is MySQL bug, this effects 1.1-stable, too. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@5092 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
78a4a995e6
commit
891ed84fe3
@ -58,7 +58,7 @@ class Repository::Mercurial < Repository
|
||||
# Returns the latest changesets for +path+; sorted by revision number
|
||||
def latest_changesets(path, rev, limit=10)
|
||||
if path.blank?
|
||||
changesets.find(:all, :include => :user, :limit => limit)
|
||||
changesets.find(:all, :include => :user, :limit => limit, :order => "id DESC")
|
||||
else
|
||||
changes.find(:all, :include => {:changeset => :user},
|
||||
:conditions => ["path = ?", path.with_leading_slash],
|
||||
|
||||
@ -87,7 +87,8 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
|
||||
|
||||
# with_limit
|
||||
changesets = @repository.latest_changesets('', nil, 2)
|
||||
assert_equal @repository.latest_changesets('', nil)[0, 2], changesets
|
||||
# assert_equal @repository.latest_changesets('', nil)[0, 2], changesets
|
||||
assert_equal %w|16 15|, changesets.collect(&:revision)
|
||||
|
||||
# with_filepath
|
||||
changesets = @repository.latest_changesets('/sql_escape/percent%dir/percent%file1.txt', nil)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user