summaryrefslogtreecommitdiffstats
path: root/app/models/repository/cvs.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2015-01-18 16:27:31 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2015-01-18 16:27:31 +0000
commit2cc3ba063fa06f7326ba5dd0303e1b17fb443564 (patch)
tree69b4be3137265fdd4c6def05312ed8a8dfcd80bd /app/models/repository/cvs.rb
parent9915962356ce4bb218ffce55a6120a5d72eb2d08 (diff)
downloadredmine-2cc3ba063fa06f7326ba5dd0303e1b17fb443564.tar.gz
redmine-2cc3ba063fa06f7326ba5dd0303e1b17fb443564.zip
revert r13901
git-svn-id: http://svn.redmine.org/redmine/trunk@13903 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/repository/cvs.rb')
-rw-r--r--app/models/repository/cvs.rb13
1 files changed, 3 insertions, 10 deletions
diff --git a/app/models/repository/cvs.rb b/app/models/repository/cvs.rb
index 9503e98a1..e61ede50d 100644
--- a/app/models/repository/cvs.rb
+++ b/app/models/repository/cvs.rb
@@ -57,16 +57,9 @@ class Repository::Cvs < Repository
if entries
entries.each() do |entry|
if ( ! entry.lastrev.nil? ) && ( ! entry.lastrev.revision.nil? )
- if ActiveRecord::Base.connection.adapter_name =~ /sqlite/i &&
- Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR == 2 &&
- Rails::VERSION::TINY == 0
- change_rev = filechanges.where(:revision => entry.lastrev.revision)
- change = change_rev.find { |c| c.path == scm.with_leading_slash(entry.path) }
- else
- change = filechanges.where(
- :revision => entry.lastrev.revision,
- :path => scm.with_leading_slash(entry.path)).first
- end
+ change = filechanges.find_by_revision_and_path(
+ entry.lastrev.revision,
+ scm.with_leading_slash(entry.path) )
if change
entry.lastrev.identifier = change.changeset.revision
entry.lastrev.revision = change.changeset.revision