]> source.dussan.org Git - redmine.git/commitdiff
Rails 3.1 compatibility (order declared on association takes precedence).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 26 Feb 2012 13:05:19 +0000 (13:05 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 26 Feb 2012 13:05:19 +0000 (13:05 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9015 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/repository/cvs.rb

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