Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在windows上使用git review向gerrit提交代码时出错_Git_Gerrit_Git Review - Fatal编程技术网

在windows上使用git review向gerrit提交代码时出错

在windows上使用git review向gerrit提交代码时出错,git,gerrit,git-review,Git,Gerrit,Git Review,当我尝试在windows上使用gitbash向gerrit提交代码时出错。 错误如下: $ git review You are about to submit multiple commits. This is expected if you are submitting a commit that is dependent on one or more in-review commits. Otherwise you should consider squashing your change

当我尝试在windows上使用gitbash向gerrit提交代码时出错。 错误如下:

$ git review
You are about to submit multiple commits. This is expected if you are
submitting a commit that is dependent on one or more in-review
commits. Otherwise you should consider squashing your changes into one
commit before submitting.
Traceback (most recent call last):
  File "c:\Python33\Scripts\git-review-script.py", line 9, in <module>
    load_entry_point('git-review==1.24', 'console_scripts', 'git-review')()
  File "C:\Python33\lib\site-packages\git_review\cmd.py", line 1214, in main
    assert_one_change(remote, branch, yes, have_hook)
  File "C:\Python33\lib\site-packages\git_review\cmd.py", line 718, in assert_on
e_change
    "Do you really want to submit the above commits?" % output)
  File "C:\Python33\lib\encodings\cp850.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2026' in position
8042: character maps to <undefined>
$ git review --version
git-review-script.py version 1.24
此外,我的windows计算机上的git版本为:

git version 1.9.4.msysgit.1
我迫切需要帮助或任何关于如何让这个工作的线索


我的cmd.exe上显示的字符编码是850

尝试安装Python 2.7.*并用它启动git review。我在Python3上运行git review时也遇到问题。*尽管作者声称它是受支持的


通过详细调查您的问题,我注意到问题在于
\u2026
字符(即-…)。Python与解码

作为临时解决方案,请提交邮件,不要包含有问题的字符(用三个点替换…)

您还可以使用命令
git review-y
跳过显示确认信息(因此也会显示错误消息)



我已经创建了一个for git review。

谢谢,我也尝试过使用Python 2.7,但它没有帮助。Python 2.7而不是3.3显示了相同的错误。我通过卸载最新版本,然后安装get-pip.py重新安装了git review。但是这也没有帮助。关于这方面还有什么建议吗..我一直坚持着这一点。我不知道直到最近几个月它才起作用,最近我将git review升级到了1.24。虽然git review-s命令可以工作,但只有当我试图通过git review-R命令将代码推送到gerrit进行代码审阅时,它才会失败,并显示上述消息。嗨!非常感谢您的回复。这确实很有用。尽管我找不到任何(…)我的提交消息中的字符,但不知何故,我认为我的提交消息很长,这可能是引入省略号的原因。尽管如此,我还是重新编写了提交消息,并使用了git review-y。git review-y命令的作用是什么?我的意思是-y选项?
-y
选项告诉git review不要问您需要确认一次向gerrit发送多个提交。因为问题在于显示此确认,跳过它可以解决问题。运行
git review-h
了解更多信息。非常感谢。这确实很有帮助。是的。替换中文字符,
git review
正在win7上运行。提交消息是否包含水平省略号(U+2026)字符?你能把它换成“…”吗?