Actions
Patch #5117
closedmercurial_adapter should ensure the right LANG environment variable
Start date:
2010-03-18
Due date:
% Done:
100%
Estimated time:
Description
http://www.redmine.org/projects/redmine/repository/revisions/3506/entry/trunk/lib/redmine/scm/adapters/mercurial_adapter.rb#L47 matches with a regular expression which may not work on some locales.
$ locale | grep LANG LANG="it_IT.UTF-8" $ hg --version Mercurial SCM Distribuito (versione 1.5+20100307)
To ensure the correct behaviour you may set LANG='C'
before calling hg.
rake test error snippets
2) Error: test_annotate(RepositoriesMercurialControllerTest): NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] lib/redmine/scm/adapters/mercurial_adapter.rb:47:in `hgversion_from_command_line' lib/redmine/scm/adapters/mercurial_adapter.rb:40:in `hgversion' lib/redmine/scm/adapters/mercurial_adapter.rb:33:in `client_version' lib/redmine/scm/adapters/mercurial_adapter.rb:51:in `template_path' lib/redmine/scm/adapters/mercurial_adapter.rb:108:in `revisions' lib/redmine/scm/adapters/mercurial_adapter.rb:72:in `info' lib/redmine/scm/adapters/abstract_adapter.rb:162:in `retrieve_root_url' lib/redmine/scm/adapters/abstract_adapter.rb:54:in `initialize' app/models/repository.rb:41:in `new' app/models/repository.rb:41:in `scm' app/models/repository.rb:75:in `default_branch' app/controllers/repositories_controller.rb:205:in `find_repository' /test/functional/repositories_mercurial_controller_test.rb:125:in `test_annotate' 3) Error: test_changes(RepositoriesMercurialControllerTest): NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] lib/redmine/scm/adapters/mercurial_adapter.rb:47:in `hgversion_from_command_line' lib/redmine/scm/adapters/mercurial_adapter.rb:40:in `hgversion' lib/redmine/scm/adapters/mercurial_adapter.rb:33:in `client_version' lib/redmine/scm/adapters/mercurial_adapter.rb:51:in `template_path' lib/redmine/scm/adapters/mercurial_adapter.rb:108:in `revisions' lib/redmine/scm/adapters/mercurial_adapter.rb:72:in `info' lib/redmine/scm/adapters/abstract_adapter.rb:162:in `retrieve_root_url' lib/redmine/scm/adapters/abstract_adapter.rb:54:in `initialize' app/models/repository.rb:41:in `new' app/models/repository.rb:41:in `scm' app/models/repository.rb:75:in `default_branch' app/controllers/repositories_controller.rb:205:in `find_repository' /test/functional/repositories_mercurial_controller_test.rb:79:in `test_changes' 4) Error: test_diff(RepositoriesMercurialControllerTest): NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] lib/redmine/scm/adapters/mercurial_adapter.rb:47:in `hgversion_from_command_line' lib/redmine/scm/adapters/mercurial_adapter.rb:40:in `hgversion' lib/redmine/scm/adapters/mercurial_adapter.rb:33:in `client_version' lib/redmine/scm/adapters/mercurial_adapter.rb:51:in `template_path' lib/redmine/scm/adapters/mercurial_adapter.rb:108:in `revisions' lib/redmine/scm/adapters/mercurial_adapter.rb:72:in `info' lib/redmine/scm/adapters/abstract_adapter.rb:162:in `retrieve_root_url' lib/redmine/scm/adapters/abstract_adapter.rb:54:in `initialize' app/models/repository.rb:41:in `new' app/models/repository.rb:41:in `scm' app/models/repository.rb:87:in `diff' app/controllers/repositories_controller.rb:167:in `diff' /test/functional/repositories_mercurial_controller_test.rb:113:in `test_diff' 5) Error: test_directory_entry(RepositoriesMercurialControllerTest): NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] lib/redmine/scm/adapters/mercurial_adapter.rb:47:in `hgversion_from_command_line' lib/redmine/scm/adapters/mercurial_adapter.rb:40:in `hgversion' lib/redmine/scm/adapters/mercurial_adapter.rb:33:in `client_version' lib/redmine/scm/adapters/mercurial_adapter.rb:51:in `template_path' lib/redmine/scm/adapters/mercurial_adapter.rb:108:in `revisions' lib/redmine/scm/adapters/mercurial_adapter.rb:72:in `info' lib/redmine/scm/adapters/abstract_adapter.rb:162:in `retrieve_root_url' lib/redmine/scm/adapters/abstract_adapter.rb:54:in `initialize' app/models/repository.rb:41:in `new' app/models/repository.rb:41:in `scm' app/models/repository.rb:75:in `default_branch' app/controllers/repositories_controller.rb:205:in `find_repository' /test/functional/repositories_mercurial_controller_test.rb:104:in `test_directory_entry' 6) Error: test_entry_download(RepositoriesMercurialControllerTest): NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] lib/redmine/scm/adapters/mercurial_adapter.rb:47:in `hgversion_from_command_line' lib/redmine/scm/adapters/mercurial_adapter.rb:40:in `hgversion' lib/redmine/scm/adapters/mercurial_adapter.rb:33:in `client_version' lib/redmine/scm/adapters/mercurial_adapter.rb:51:in `template_path' lib/redmine/scm/adapters/mercurial_adapter.rb:108:in `revisions' lib/redmine/scm/adapters/mercurial_adapter.rb:72:in `info' lib/redmine/scm/adapters/abstract_adapter.rb:162:in `retrieve_root_url' lib/redmine/scm/adapters/abstract_adapter.rb:54:in `initialize' app/models/repository.rb:41:in `new' app/models/repository.rb:41:in `scm' app/models/repository.rb:75:in `default_branch' app/controllers/repositories_controller.rb:205:in `find_repository' /test/functional/repositories_mercurial_controller_test.rb:97:in `test_entry_download' 7) Error: test_entry_show(RepositoriesMercurialControllerTest): NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] lib/redmine/scm/adapters/mercurial_adapter.rb:47:in `hgversion_from_command_line' lib/redmine/scm/adapters/mercurial_adapter.rb:40:in `hgversion' lib/redmine/scm/adapters/mercurial_adapter.rb:33:in `client_version' lib/redmine/scm/adapters/mercurial_adapter.rb:51:in `template_path' lib/redmine/scm/adapters/mercurial_adapter.rb:108:in `revisions' lib/redmine/scm/adapters/mercurial_adapter.rb:72:in `info' lib/redmine/scm/adapters/abstract_adapter.rb:162:in `retrieve_root_url' lib/redmine/scm/adapters/abstract_adapter.rb:54:in `initialize' app/models/repository.rb:41:in `new' app/models/repository.rb:41:in `scm' app/models/repository.rb:75:in `default_branch' app/controllers/repositories_controller.rb:205:in `find_repository' /test/functional/repositories_mercurial_controller_test.rb:86:in `test_entry_show' 8) Error: test_show(RepositoriesMercurialControllerTest): NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] lib/redmine/scm/adapters/mercurial_adapter.rb:47:in `hgversion_from_command_line' lib/redmine/scm/adapters/mercurial_adapter.rb:40:in `hgversion' lib/redmine/scm/adapters/mercurial_adapter.rb:33:in `client_version' lib/redmine/scm/adapters/mercurial_adapter.rb:51:in `template_path' lib/redmine/scm/adapters/mercurial_adapter.rb:108:in `revisions' lib/redmine/scm/adapters/mercurial_adapter.rb:72:in `info' lib/redmine/scm/adapters/abstract_adapter.rb:162:in `retrieve_root_url' lib/redmine/scm/adapters/abstract_adapter.rb:54:in `initialize' app/models/repository.rb:41:in `new' app/models/repository.rb:41:in `scm' app/models/repository.rb:75:in `default_branch' app/controllers/repositories_controller.rb:205:in `find_repository' /test/functional/repositories_mercurial_controller_test.rb:40:in `test_show' 9) Error: test_show_at_given_revision(RepositoriesMercurialControllerTest): NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] lib/redmine/scm/adapters/mercurial_adapter.rb:47:in `hgversion_from_command_line' lib/redmine/scm/adapters/mercurial_adapter.rb:40:in `hgversion' lib/redmine/scm/adapters/mercurial_adapter.rb:33:in `client_version' lib/redmine/scm/adapters/mercurial_adapter.rb:51:in `template_path' lib/redmine/scm/adapters/mercurial_adapter.rb:108:in `revisions' lib/redmine/scm/adapters/mercurial_adapter.rb:72:in `info' lib/redmine/scm/adapters/abstract_adapter.rb:162:in `retrieve_root_url' lib/redmine/scm/adapters/abstract_adapter.rb:54:in `initialize' app/models/repository.rb:41:in `new' app/models/repository.rb:41:in `scm' app/models/repository/mercurial.rb:33:in `entries' app/controllers/repositories_controller.rb:72:in `show' /test/functional/repositories_mercurial_controller_test.rb:71:in `test_show_at_given_revision' 10) Error: test_show_directory(RepositoriesMercurialControllerTest): NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] lib/redmine/scm/adapters/mercurial_adapter.rb:47:in `hgversion_from_command_line' lib/redmine/scm/adapters/mercurial_adapter.rb:40:in `hgversion' lib/redmine/scm/adapters/mercurial_adapter.rb:33:in `client_version' lib/redmine/scm/adapters/mercurial_adapter.rb:51:in `template_path' lib/redmine/scm/adapters/mercurial_adapter.rb:108:in `revisions' lib/redmine/scm/adapters/mercurial_adapter.rb:72:in `info' lib/redmine/scm/adapters/abstract_adapter.rb:162:in `retrieve_root_url' lib/redmine/scm/adapters/abstract_adapter.rb:54:in `initialize' app/models/repository.rb:41:in `new' app/models/repository.rb:41:in `scm' app/models/repository.rb:75:in `default_branch' app/controllers/repositories_controller.rb:205:in `find_repository' /test/functional/repositories_mercurial_controller_test.rb:59:in `test_show_directory' 11) Error: test_show_root(RepositoriesMercurialControllerTest): NoMethodError: You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.[] lib/redmine/scm/adapters/mercurial_adapter.rb:47:in `hgversion_from_command_line' lib/redmine/scm/adapters/mercurial_adapter.rb:40:in `hgversion' lib/redmine/scm/adapters/mercurial_adapter.rb:33:in `client_version' lib/redmine/scm/adapters/mercurial_adapter.rb:51:in `template_path' lib/redmine/scm/adapters/mercurial_adapter.rb:108:in `revisions' lib/redmine/scm/adapters/mercurial_adapter.rb:72:in `info' lib/redmine/scm/adapters/abstract_adapter.rb:162:in `retrieve_root_url' lib/redmine/scm/adapters/abstract_adapter.rb:54:in `initialize' app/models/repository.rb:41:in `new' app/models/repository.rb:41:in `scm' app/models/repository.rb:75:in `default_branch' app/controllers/repositories_controller.rb:205:in `find_repository' /test/functional/repositories_mercurial_controller_test.rb:48:in `test_show_root'
This patch applies on redmine 0.9.3
$ script/about About your application's environment Ruby version 1.8.7 (universal-darwin10.0) RubyGems version 1.3.6 Rack version 1.0 Rails version 2.3.5 Active Record version 2.3.5 Active Resource version 2.3.5 Action Mailer version 2.3.5 Active Support version 2.3.5 Application root /Users/nolith/Documents/Projects/redmine-hg Environment development Database adapter sqlite3 Database schema version 20100222000000
Files
Related issues
Actions