Defect #1659

problem accessing CVS repository with UTF-8 comments

Added by Sergio Freire over 9 years ago. Updated over 9 years ago.

Status:ClosedStart date:2008-07-17
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:SCM
Target version:0.8
Resolution:Fixed Affected version:0.7.1

Description

I have configured a CVS repository but when I try to access it, it fails. The logs bellow show the output of the error. It seems that comments with UTF-8 characters like "'" are not properly escaped.

Processing RepositoriesController#show (for 10.112.64.1 at 2008-07-17 14:23:22) [GET]
Session ID: 71475e7c1965bcd28f7ef89894478360
Parameters: {"action"=>"show", "id"=>"b2bua", "controller"=>"repositories"}

ActiveRecord::StatementInvalid (PGError: ERROR: invalid byte sequence for encoding "UTF8": 0xe7e36f
HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".
: SELECT * FROM changesets WHERE (changesets.repository_id = 26 AND (changesets."committer" = E'jplacido' AND changesets."comments" = E'Sincronização com último b2bua e sbbs associados do projecto IPCentrex. A partir de agora deverá ser este o CVS com a versão ''master'' do B2B.' AND changesets."committed_on" BETWEEN '2007-05-16 15:17:21.000000' AND '2007-05-16 15:17:41.000000')) ORDER BY changesets.committed_on DESC, changesets.id DESC LIMIT 1):
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:150:in `log'
/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:407:in `execute'
/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:782:in `select_raw'
/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:769:in `select'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:53:in `select_all'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:74:in `cache_sql'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:53:in `select_all'
/vendor/rails/activerecord/lib/active_record/base.rb:532:in `find_by_sql'
/vendor/rails/activerecord/lib/active_record/base.rb:1233:in `find_every'
/vendor/rails/activerecord/lib/active_record/base.rb:1227:in `find_initial'
/vendor/rails/activerecord/lib/active_record/base.rb:502:in `find'
/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb:66:in `find'
/app/models/repository/cvs.rb:103:in `fetch_changesets'
/lib/redmine/scm/adapters/cvs_adapter.rb:192:in `revisions'
/lib/redmine/scm/adapters/cvs_adapter.rb:126:in `each_line'
/lib/redmine/scm/adapters/cvs_adapter.rb:126:in `revisions'
/lib/redmine/scm/adapters/abstract_adapter.rb:127:in `call'
/lib/redmine/scm/adapters/abstract_adapter.rb:127:in `shellout'
/lib/redmine/scm/adapters/abstract_adapter.rb:125:in `popen'
/lib/redmine/scm/adapters/abstract_adapter.rb:125:in `shellout'
/lib/redmine/scm/adapters/cvs_adapter.rb:114:in `revisions'
/app/models/repository/cvs.rb:98:in `fetch_changesets'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'
/vendor/rails/activerecord/lib/active_record/transactions.rb:80:in `transaction'
/vendor/rails/activerecord/lib/active_record/transactions.rb:100:in `transaction'
/app/models/repository/cvs.rb:96:in `fetch_changesets'
/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:125:in `send'
/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:125:in `method_missing'
/app/controllers/repositories_controller.rb:53:in `show'
/vendor/rails/actionpack/lib/action_controller/base.rb:1158:in `send'
/vendor/rails/actionpack/lib/action_controller/base.rb:1158:in `perform_action_without_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:697:in `call_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark'
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/vendor/rails/actionpack/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'
/vendor/rails/actionpack/lib/action_controller/caching.rb:678:in `perform_action'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
/vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache'
/vendor/rails/actionpack/lib/action_controller/caching.rb:677:in `perform_action'
/vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send'
/vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
/vendor/rails/actionpack/lib/action_controller/session_management.rb:123:in `process'
/vendor/rails/actionpack/lib/action_controller/base.rb:388:in `process'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:171:in `handle_request'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:in `dispatch'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:76:in `process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:74:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:74:in `process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:159:in `process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:158:in `each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:158:in `process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:268:in `initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:268:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:268:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/configurator.rb:282:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/configurator.rb:281:in `each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/configurator.rb:281:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:128:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/command.rb:212:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:281
/usr/bin/mongrel_rails:16:in `load'
/usr/bin/mongrel_rails:16

Associated revisions

Revision 1768
Added by Jean-Philippe Lang over 9 years ago

Fixes error with CVS+Postgresql and non-UTF8 commit logs (#917, #1659).

History

#1 Updated by Thomas Lecavelier over 9 years ago

Have you an exposed CVS repository with the given problem to help debugging?

#2 Updated by Jean-Philippe Lang over 9 years ago

  • Category set to SCM
  • Status changed from New to Closed
  • Target version set to 0.8
  • Resolution set to Fixed

This problem should be solved by r1767 and r1768.
Choose the appropriate source enconding (eg. ISO-8859-1) in Application settings -> Repositories. Messages will be reencoded to UTF-8 before insertion in the database.

Also available in: Atom PDF