Mercurial and chinese code
When the way to repository include some chinese code, there's some problem with it to show the way or the name of files.
#3 Updated by xiaoyu yin about 9 years ago
Thank you fist! I have tried the Settings -> Repository setting to set the code of repository, but it doesn't solve the problem.
I have tried the #2664 patch and it doesn't solve the problem too.
BitNami Redmine Stack
- Redmine 0.9.3
- Apache 2.2.14
- ImageMagick 6.5.6-8-Q8
- MySQL 5.0.83
- Subversion 1.6.6
- Ruby 1.8.7
- Rails 2.3.5
- RubyGems 1.3.5
tortoisehg-1.0.1-hg-1.5.1-x86(= mercurial 1.5.1)
system: Windows Xp professional 2002 SP3
#4 Updated by Toshi MARUYAMA about 9 years ago
- File redmine-windows-japanese-sjis.png added
- File redmine-windows-japanese-sjis-setting.png added
- File tortoisehg-windows-japanese-sjis.png added
- File explorer-windows-japanese-sjis.png added
Thank you for your feedback.
I have tried on Japanese Windows Vista and SQLite.
I can see Japanese named file.
You need to delete repository created before patch applied and recreate the same repository from Redmine settings tab.
#7 Updated by xiaoyu yin about 9 years ago
Dose the issue-2664-0.9-stable-2010-04-11.patch will add an 'repository path encoding Options' in the repository tab settings of redmine ? or I need to set the 'repository encoding Options' in the repository tab settings of redmine to UTF-8 ?
I Modified my source file as the issue-2664-0.9-stable-2010-04-11.patch told, but there's nothing changed.
And I have tried to delete repository and recreate by redmine, but there's nothing changed.
By the way , my hg's language setting is English for redmine doesn't Identification chinese hg. When I changed hg to English language, the redmine works.
You can see from picture that the commit message and author in chinese are all correct except the chinese path.
#8 Updated by Toshi MARUYAMA about 9 years ago
You need to run "patch" command with -p1 option on redmine directory and run "rake db:migrate" .
$ hg clone -U http://bitbucket.org/svn/redmine $ cd redmine $ hg update -r 0.9-stable $ wget http://www.redmine.org/attachments/download/3544/issue-2664-0.9-stable-2010-04-11.patch $ patch -p1 < issue-2664-0.9-stable-2010-04-11.patch patching file lib/redmine/scm/adapters/mercurial/hg-template-0.9.5.tmpl patching file lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl patching file lib/redmine/scm/adapters/mercurial_adapter.rb patching file app/helpers/repositories_helper.rb patching file app/models/repository.rb patching file db/migrate/20100410053957_add_repositories_path_encoding.rb patching file lib/redmine/scm/adapters/path_encodable_wrapper.rb $ hg status M app/helpers/repositories_helper.rb M app/models/repository.rb M lib/redmine/scm/adapters/mercurial/hg-template-0.9.5.tmpl M lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl M lib/redmine/scm/adapters/mercurial_adapter.rb ? db/migrate/20100410053957_add_repositories_path_encoding.rb ? issue-2664-0.9-stable-2010-04-11.patch ? lib/redmine/scm/adapters/path_encodable_wrapper.rb $ rake db:migrate RAILS_ENV=XXXX
#9 Updated by Toshi MARUYAMA about 9 years ago
You can use "hg import" instead of "patch" command.
$ hg pare changeset: 3718:50156ae18af6 branch: 0.9-stable tag: tip parent: 3713:661ffe81dfdd user: jplang@e93f8b46-1217-0410-a6f0-8f06a7374b81 date: Mon May 03 16:21:37 2010 +0000 summary: tagged version 0.9.4 $ hg import issue-2664-0.9-stable-2010-04-11.patch applying issue-2664-0.9-stable-2010-04-11.patch applied fb5f1869fb60 $ hg glog -l3 @ changeset: 3720:4d0e8db09b44 | branch: 0.9-stable | tag: tip | user: Yuya Nishihara <XXXXXXXXXXXXXXX> | date: Sun Apr 11 11:17:38 2010 +0900 | summary: repository: add filename encoding conversion | o changeset: 3719:fb5f1869fb60 | branch: 0.9-stable | user: Yuya Nishihara <XXXXXXXXXXXXXXX> | date: Sun Apr 11 11:17:43 2010 +0900 | summary: mercurial: escape any filenames by urlescape | o changeset: 3718:50156ae18af6 | branch: 0.9-stable | parent: 3713:661ffe81dfdd | user: jplang@e93f8b46-1217-0410-a6f0-8f06a7374b81 | date: Mon May 03 16:21:37 2010 +0000 | summary: tagged version 0.9.4 |
#13 Updated by Toshi MARUYAMA about 9 years ago
I don't know what BitNami is.
"hg clone" is an example of source install.
You need rename config/database.yml.example to config/database.yml.
$ rake db:migrate RAILS_ENV=test_sqlite3 (in R:/REDMINE/bitbucket-redmine-qclone/redmine-mq) Loaded suite r:/Ruby/bin/rake Started Finished in 0.001 seconds. 0 tests, 0 assertions, 0 failures, 0 errors
$ rake db:migrate RAILS_ENV=XXXX (in R:/REDMINE/bitbucket-redmine-qclone/redmine-mq) rake aborted! No such file or directory - R:/REDMINE/bitbucket-redmine-qclone/redmine-mq/config/environments/XXXX.rb (See full trace by running task with --trace)
#15 Updated by Toshi MARUYAMA about 9 years ago
Set PATH to your ruby.exe installed path.
You can use control panel too.
R:\Ruby\bin>dir 2010/03/23 12:24 <DIR> . 2010/03/23 12:24 <DIR> .. 2010/02/10 12:34 419 convert_to_should_syntax 2010/02/10 12:34 170 convert_to_should_syntax.bat 2009/11/10 04:00 48,640 dbm3.dll 2009/11/10 04:00 3,880 erb 2009/11/10 04:00 177 erb.bat 2009/11/10 04:00 62,464 gdbm3.dll 2009/11/10 04:01 571 gem 2009/11/10 04:01 177 gem.bat 2009/11/10 04:00 377 irb 2009/11/10 04:00 177 irb.bat 2009/11/10 04:00 1,568,177 libeay32-0.9.8-msvcrt.dll 2009/11/10 04:00 978,432 libiconv2.dll 2009/11/10 03:56 839,680 msvcrt-ruby18.dll 2009/11/10 04:00 114,688 pdcurses.dll 2010/01/18 21:56 392 rackup 2010/01/18 21:56 152 rackup.bat 2010/03/23 12:24 394 rails 2010/03/23 12:24 151 rails.bat 2010/01/18 21:56 390 rake 2010/01/18 21:56 150 rake.bat 2009/11/10 04:00 1,541 rdoc 2009/11/10 04:00 177 rdoc.bat 2009/11/10 04:00 1,489 ri 2009/11/10 04:00 177 ri.bat 2009/11/10 04:00 422,583 ruby.exe 2009/11/10 04:00 422,583 rubyw.exe 2009/09/12 09:53 312 setrbvars.bat 2009/11/10 04:00 329,215 ssleay32-0.9.8-msvcrt.dll 2009/11/10 04:00 151 testrb 2009/11/10 04:00 177 testrb.bat 2009/11/10 04:00 59,904 zlib1.dll
#21 Updated by xiaoyu yin almost 9 years ago
- File migrate_result.txt added
Sorry for so long time to test it.
I have run migrate command successfully, but the option doesn't been added.
I test it for several times, only once I can see the adition option but even this, there still shows error on chinese codes.
#22 Updated by Toshi MARUYAMA almost 9 years ago
#24 Updated by xiaoyu yin almost 9 years ago
Oh, it's luckly today. I had to uninstall the redmine and reinstall it. Then creat hg repository in redmine folder.
And then import the patch. And then restart the redmine service. It works!! The path_encoding column was added successfully.
I repeat the steps above, it works too.
So, there's no error code now.
Thank you Toshi Maruyama! The problem solved.