Rails 3.1 compatibility (order declared on association takes precedence).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9015 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-02-26 13:05:19 +00:00
parent 39aa4cac86
commit ad2036aaba
1 changed files with 2 additions and 3 deletions

View File

@ -181,10 +181,9 @@ class Repository::Cvs < Repository
end end
# Renumber new changesets in chronological order # Renumber new changesets in chronological order
changesets.find( Changeset.all(
:all,
:order => 'committed_on ASC, id ASC', :order => 'committed_on ASC, id ASC',
:conditions => "revision LIKE 'tmp%'" :conditions => ["repository_id = ? AND revision LIKE 'tmp%'", id]
).each do |changeset| ).each do |changeset|
changeset.update_attribute :revision, next_revision_number changeset.update_attribute :revision, next_revision_number
end end