view .svn/pristine/70/70dfef569a65ef5db9a25ad36d19a3ee38afe71d.svn-base @ 909:cbb26bc654de redmine-1.3

Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author Chris Cannam
date Fri, 24 Feb 2012 19:09:32 +0000
parents
children
line wrap: on
line source
class CopyRepositoriesLogEncoding < ActiveRecord::Migration
  def self.up
    encoding = Setting.commit_logs_encoding.to_s.strip
    encoding = encoding.blank? ? 'UTF-8' : encoding
    Repository.find(:all).each do |repo|
      scm = repo.scm_name
      case scm
        when 'Subversion', 'Mercurial', 'Git', 'Filesystem' 
          repo.update_attribute(:log_encoding, nil)
        else
          repo.update_attribute(:log_encoding, encoding)
      end
    end
  end

  def self.down
  end
end