Project

General

Profile

Error fetching changes from git repo

Added by Weverton Morais about 15 years ago

Hi,

I'm running redmine and a gitosis server in a linux machine. But, at client side, I'm using Windows and mSysGit as git client. At server side, when I try to fetch changesets from the project git repository I get the following error:

ActiveRecord::StatementInvalid (Mysql::Error: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=': SELECT `changesets`.`id` AS t0_r0, `changesets`.`repository_id` AS t0_r1, `changesets`.`revision` AS t0_r2, `changesets`.`committer` AS t0_r3, `changesets`.`committed_on` AS t0_r4, `changesets`.`comments` AS t0_r5, `changesets`.`commit_date` AS t0_r6, `changesets`.`scmid` AS t0_r7, `changesets`.`user_id` AS t0_r8, `users`.`id` AS t1_r0, `users`.`login` AS t1_r1, `users`.`hashed_password` AS t1_r2, `users`.`firstname` AS t1_r3, `users`.`lastname` AS t1_r4, `users`.`mail` AS t1_r5, `users`.`mail_notification` AS t1_r6, `users`.`admin` AS t1_r7, `users`.`status` AS t1_r8, `users`.`last_login_on` AS t1_r9, `users`.`language` AS t1_r10, `users`.`auth_source_id` AS t1_r11, `users`.`created_on` AS t1_r12, `users`.`updated_on` AS t1_r13, `users`.`type` AS t1_r14 FROM `changesets`  LEFT OUTER JOIN `users` ON `users`.id = `changesets`.user_id     WHERE (`changesets`.repository_id = 22 AND (`changesets`.`committer` = 'git.exe\' nÆo ‚ reconhecido como um comando interno <git.exe\' nÆo ‚ reconhecido como um comando interno>'))  ORDER BY changesets.committed_on DESC, changesets.id DESC LIMIT 1):
.
.
.
/app/models/repository/git.rb:49:in `fetch_changesets'

This error occours only in the project I'm using msysgit as git client. The oldest project, where I uses Cygwin as git client, all works fine.

Are there any sugestions to solve my problem??

Thanks,


Replies (1)

RE: Error fetching changes from git repo - Added by Jean-François Dagenais almost 14 years ago

I am not a pro at all, but I did manage to fix this on my server by doing the following:
  • shutdown the apache server (it runs redmine)
  • dump the whole mysql database to file (with "drop table" statements)
  • in a text editor find the "changeset" table
  • change the default encoding of this table from "latin1" to "utf8"
  • re-import the database
  • restart apache
  • try the fetch changesets again.

There are issues related to git and character encoding. look at #3396, I beleive it's related.

    (1-1/1)