]> source.dussan.org Git - redmine.git/commitdiff
use "where" instead of find_by_ at Repository::Cvs class
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 18 Jan 2015 16:40:34 +0000 (16:40 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 18 Jan 2015 16:40:34 +0000 (16:40 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13904 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/repository/cvs.rb

index e61ede50d77ec369550dec2de33beaa3b3000bfc..000e3e00430cfd71b448c56010a5d8400ebe418a 100644 (file)
@@ -57,9 +57,9 @@ class Repository::Cvs < Repository
     if entries
       entries.each() do |entry|
         if ( ! entry.lastrev.nil? ) && ( ! entry.lastrev.revision.nil? )
-          change = filechanges.find_by_revision_and_path(
-                     entry.lastrev.revision,
-                     scm.with_leading_slash(entry.path) )
+          change = filechanges.where(
+                       :revision => entry.lastrev.revision,
+                       :path => scm.with_leading_slash(entry.path)).first
           if change
             entry.lastrev.identifier = change.changeset.revision
             entry.lastrev.revision   = change.changeset.revision