Vote #63631
完了problem accessing CVS repository with UTF-8 comments
0%
説明
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'
execute'
/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:407:in
/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:782:in select_raw'
select'
/vendor/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:769:in
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in select_all_without_query_cache'
select_all'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:53:in
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:74:in cache_sql'
select_all'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:53:in
/vendor/rails/activerecord/lib/active_record/base.rb:532:in find_by_sql'
find_every'
/vendor/rails/activerecord/lib/active_record/base.rb:1233:in
/vendor/rails/activerecord/lib/active_record/base.rb:1227:in find_initial'
find'
/vendor/rails/activerecord/lib/active_record/base.rb:502:in
/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb:66:in find'
fetch_changesets'
/app/models/repository/cvs.rb:103:in
/lib/redmine/scm/adapters/cvs_adapter.rb:192:in revisions'
each_line'
/lib/redmine/scm/adapters/cvs_adapter.rb:126:in
/lib/redmine/scm/adapters/cvs_adapter.rb:126:in revisions'
call'
/lib/redmine/scm/adapters/abstract_adapter.rb:127:in
/lib/redmine/scm/adapters/abstract_adapter.rb:127:in shellout'
popen'
/lib/redmine/scm/adapters/abstract_adapter.rb:125:in
/lib/redmine/scm/adapters/abstract_adapter.rb:125:in shellout'
revisions'
/lib/redmine/scm/adapters/cvs_adapter.rb:114:in
/app/models/repository/cvs.rb:98:in fetch_changesets'
transaction'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in
/vendor/rails/activerecord/lib/active_record/transactions.rb:80:in transaction'
transaction'
/vendor/rails/activerecord/lib/active_record/transactions.rb:100:in
/app/models/repository/cvs.rb:96:in fetch_changesets'
send'
/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:125:in
/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:125:in method_missing'
show'
/app/controllers/repositories_controller.rb:53:in
/vendor/rails/actionpack/lib/action_controller/base.rb:1158:in send'
perform_action_without_filters'
/vendor/rails/actionpack/lib/action_controller/base.rb:1158:in
/vendor/rails/actionpack/lib/action_controller/filters.rb:697:in call_filters'
perform_action_without_benchmark'
/vendor/rails/actionpack/lib/action_controller/filters.rb:689:in
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in perform_action_without_rescue'
measure'
/usr/lib/ruby/1.8/benchmark.rb:293:in
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in perform_action_without_rescue'
perform_action_without_caching'
/vendor/rails/actionpack/lib/action_controller/rescue.rb:199:in
/vendor/rails/actionpack/lib/action_controller/caching.rb:678:in perform_action'
cache'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in
/vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in cache'
perform_action'
/vendor/rails/actionpack/lib/action_controller/caching.rb:677:in
/vendor/rails/actionpack/lib/action_controller/base.rb:524:in send'
process_without_filters'
/vendor/rails/actionpack/lib/action_controller/base.rb:524:in
/vendor/rails/actionpack/lib/action_controller/filters.rb:685:in process_without_session_management_support'
process'
/vendor/rails/actionpack/lib/action_controller/session_management.rb:123:in
/vendor/rails/actionpack/lib/action_controller/base.rb:388:in process'
handle_request'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:171:in
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:in dispatch'
dispatch_cgi'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in dispatch'
process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:76:in
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:74:in synchronize'
process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/rails.rb:74:in
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:159:in process_client'
each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:158:in
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:158:in process_client'
run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in initialize'
new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:285:in run'
initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:268:in
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:268:in new'
run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel.rb:268:in
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/configurator.rb:282:in run'
each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/configurator.rb:281:in
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/configurator.rb:281:in run'
run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:128:in
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/../lib/mongrel/command.rb:212:in run'
load'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.4/bin/mongrel_rails:281
/usr/bin/mongrel_rails:16:in
/usr/bin/mongrel_rails:16
journals
Have you an exposed CVS repository with the given problem to help debugging?
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------