Commit e073f3ff authored by marutosijp's avatar marutosijp

workaround unit cvs test failure on sqlite3

git-svn-id: https://svn.redmine.org/redmine/trunk@13901 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 5fcddd16
......@@ -57,9 +57,16 @@ 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) )
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
if change
entry.lastrev.identifier = change.changeset.revision
entry.lastrev.revision = change.changeset.revision
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment