Project

General

Profile

Actions

Defect #2890

closed

CVS fetch changesets for latin1 charset

Added by Lautaro Bonetto almost 16 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Start date:
2009-03-03
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

I have a spanish project and we used CVS with spanish comments on it.
When I added the repository in Redmine and executed the task "rake redmine:fetch_changesets --trace RAILS_ENV=production", this error appear.

Can you fix it, please?

Mysql::Error: #HY000Illegal mix of collations (latin1_spanish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=': SELECT * FROM `changesets`     WHERE (`changesets`.reposito
ry_id = 12 AND (`changesets`.`committer` = 'gabriel.a.furrer' AND `changesets`.`committed_on` BETWEEN '2008-03-28 12:38:04' AND '2008-03-28 12:38:24' AND `changesets`.`comments` = 'Se e
liminaron de la estructura los archivos vacφo.txt'))  ORDER BY changesets.committed_on DESC, changesets.id DESC LIMIT 1
D:/proyectos/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:147:in `log'
D:/proyectos/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:302:in `execute'
D:/proyectos/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:537:in `select'
D:/proyectos/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'
D:/proyectos/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:61:in `select_all'
D:/proyectos/redmine/vendor/rails/activerecord/lib/active_record/base.rb:586:in `find_by_sql'
D:/proyectos/redmine/vendor/rails/activerecord/lib/active_record/base.rb:1345:in `find_every'
D:/proyectos/redmine/vendor/rails/activerecord/lib/active_record/base.rb:1307:in `find_initial'
D:/proyectos/redmine/vendor/rails/activerecord/lib/active_record/base.rb:538:in `find'
D:/proyectos/redmine/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:47:in `find'
D:/proyectos/redmine/app/models/repository/cvs.rb:109:in `fetch_changesets'
D:/proyectos/redmine/lib/redmine/scm/adapters/cvs_adapter.rb:191:in `revisions'
D:/proyectos/redmine/lib/redmine/scm/adapters/cvs_adapter.rb:126:in `each_line'
D:/proyectos/redmine/lib/redmine/scm/adapters/cvs_adapter.rb:126:in `revisions'
D:/proyectos/redmine/lib/redmine/scm/adapters/abstract_adapter.rb:177:in `call'
D:/proyectos/redmine/lib/redmine/scm/adapters/abstract_adapter.rb:177:in `shellout'
D:/proyectos/redmine/lib/redmine/scm/adapters/abstract_adapter.rb:175:in `popen'
D:/proyectos/redmine/lib/redmine/scm/adapters/abstract_adapter.rb:175:in `shellout'
D:/proyectos/redmine/lib/redmine/scm/adapters/abstract_adapter.rb:165:in `shellout'
D:/proyectos/redmine/lib/redmine/scm/adapters/cvs_adapter.rb:114:in `revisions'
D:/proyectos/redmine/app/models/repository/cvs.rb:104:in `fetch_changesets'
D:/proyectos/redmine/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'
D:/proyectos/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:79:in `transaction'
D:/proyectos/redmine/vendor/rails/activerecord/lib/active_record/transactions.rb:98:in `transaction'
D:/proyectos/redmine/app/models/repository/cvs.rb:102:in `fetch_changesets'
D:/proyectos/redmine/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in `__send__'
D:/proyectos/redmine/vendor/rails/activesupport/lib/active_support/core_ext/symbol.rb:11:in `to_proc'
D:/proyectos/redmine/app/models/repository.rb:142:in `each'
D:/proyectos/redmine/app/models/repository.rb:142:in `fetch_changesets'
D:/proyectos/redmine/lib/tasks/fetch_changesets.rake:22
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain'
D:/Ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
D:/Ruby/bin/rake:19:in `load'
D:/Ruby/bin/rake:19

Related issues

Related to Redmine - Defect #3196: Don't properly support encoding of repositories (git)ClosedToshi MARUYAMA2009-04-17

Actions
Related to Redmine - Patch #236: Patch for remote cvs server and non-English cvs environmentClosed

Actions
Related to Redmine - Defect #2133: CVS comments in utf8 get truncatedClosedToshi MARUYAMA

Actions
Related to Redmine - Feature #1735: Per project repository log encoding settingClosedToshi MARUYAMA2008-08-03

Actions
Actions #1

Updated by Lautaro Bonetto almost 16 years ago

This is my "ruby script/about":

D:\proyectos\redmine>ruby script/about
About your application's environment
Ruby version              1.8.6 (i386-mswin32)
RubyGems version          1.3.1
Rails version             2.1.2
Active Record version     2.1.2
Action Pack version       2.1.2
Active Resource version   2.1.2
Action Mailer version     2.1.2
Active Support version    2.1.2
Application root          D:/proyectos/redmine
Environment               development
Database adapter          mysql
Database schema version   0
Actions #2

Updated by Damien Couderc over 15 years ago

Hi there,
got almost the same problem but with the following collations :
(latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE)

It also occurs on the changeset fetching.

I use RedMine 0.8.4 with MySQL (btw about script only show data about development environment)

$ ruby script/about
About your application's environment
Ruby version              1.8.7 (i486-linux)
RubyGems version          1.3.1
Rails version             2.1.2
Active Record version     2.1.2
Action Pack version       2.1.2
Active Resource version   2.1.2
Action Mailer version     2.1.2
Active Support version    2.1.2
Edge Rails revision       unknown
Application root          /var/lib/redmine/redmine-0.8.4
Environment               development
Database adapter          sqlite3
Database schema version   0

Actions #3

Updated by Damien Couderc over 15 years ago

I have been able to fix the problem by changing the charset of the changesets table.

Here is the method :

ALTER TABLE changeset CONVERT TO CHARACTER SET utf8;

Added to this i also modified the file my.cnf to add the following :

<...>

[mysqld]
default-character-set = utf8
<...>

[mysql]
default-character-set = utf8
<...>

[mysqldump]
default-character-set = utf8
<...>

I'm not sure this last part has helped but i tried it first so i cannot tell if it is needed by the first part (AKA changing charset).

I hope it will help.

Actions #4

Updated by Toshi MARUYAMA almost 14 years ago

  • Category changed from Database to SCM
Actions #5

Updated by Toshi MARUYAMA almost 14 years ago

  • Status changed from New to Closed

I added feature #1735 until r4983.

Actions

Also available in: Atom PDF