Description of problem: My laptop use Chinese language, and I en-counter a bug when run "git review --setup" for openstack nova git repo. Version-Release number of selected component (if applicable): git-review-1.22-1.fc20.noarch How reproducible: clone the openstack nova project git repo, run "git review --setup". Steps to Reproduce: 1. Use the Simplified Chinese locale for the desktop. 2. clone the openstack nova project git repo. 3. run "git review --setup". Actual results: To trigger this problem in English Desktop, please use the environment variables below to trigger the bug. [nova]$ LANG=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8 git review --setup Traceback (most recent call last): File "/usr/bin/git-review", line 1187, in <module> print(e) UnicodeEncodeError: 'ascii' codec can't encode characters in position 180-183: ordinal not in range(128) and to print the error log, I use python3 to run git-review tool, see below: [nova]$ LANG=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8 python3 /usr/bin/git-review --setup Problems encountered installing commit-msg hook The following command failed with exit code 1 "scp -P None :hooks/commit-msg .git/hooks/commit-msg" ----------------------- cp: 无法获取":hooks/commit-msg" 的文件状态(stat): 没有那个文件或目录 ----------------------- Expected results: run "git review --setup" successfully without error. [nova]$ git-review --setup [nova]$ Additional info:
Doesn't support ascii chars still.
FWIW: I get a similar error as follows: UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position 192: ordinal not in range(128) Running with python3, I see that the message is: The following command failed with exit code 1 "scp -P None :hooks/commit-msg .git/hooks/commit-msg" ----------------------- cp: cannot stat ‘:hooks/commit-msg’: No such file or directory In this case: the error occurs for the ‘ (0x2018: left single quote) character (and presumably for the ’ (0x2019: right singe quote) character). LANG=en_US.UTF-8 git-review.noarch 1.22-1.fc20 python.i686 2.7.5-9.fc20 python3.i686 3.3.2-8.fc20
Although it was fixed in 1.23, I was unable to package that due to regressions. This is finally fixed in 1.24, please verify.
I tried git-review 1.24 on Fedora 20, it seems work now. $ rpm -q git-review git-review-1.24-1.fc20.noarch $ git review --setup
Thanks, closing.