我似乎已经打开了mercurial的.py文件(使用Notepad ++),只是出于好奇来检查mercurial hg扩展的工作方式,我现在无法使用评论板:这是我面临的错误..我什至替换了reviewboard文件夹,但似乎编译后的python文件造成了问题。 如果有某种方法可以重新编译它们以重置编码,我会很高兴:
chcp 65001
set PYTHONIOENCODING=utf-8
我还尝试按照一些帖子中的建议在Windows命令行上重新设置编码,以解决编码问题:
#!python
** Mercurial version (4.6.1). TortoiseHg version (4.6.1)
** Command: --nofork workbench
** CWD: C:\hiteshi\Latest\GM_dev
** Encoding: cp1252
** Extensions loaded: fetch, gestalt, kilnauth, big-push, kiln, caseguard, hgflow, strip, mq, reviewboard, histedit, shelve, largefiles, tortoisehg.util.configitems
** Python version: 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)]
** Windows version: sys.getwindowsversion(major=6, minor=2, build=9200, platform=2, service_pack='')
** Processor architecture: x64
** Qt-5.9.2 PyQt-5.9.1 QScintilla-2.10.2.dev1711012104
Traceback (most recent call last):
File "tortoisehg\hgqt\postreview.pyo", line 361, in accept
File "tortoisehg\hgqt\postreview.pyo", line 274, in postReviewOpts
File "tortoisehg\hgqt\postreview.pyo", line 263, in getSummary
File "tortoisehg\util\hglib.pyo", line 117, in fromunicode
File "encodings\cp1252.pyo", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\ufffd' in position 31: character maps to <undefined>
答案 0 :(得分:0)
我们遇到了这个问题,即Tortoise Hg的更新版本(4.6)与REview板版本不兼容,似乎已经在Tortoise Hg论坛上提出了此问题。解决方案1)将Hg还原到以前的版本4.5。或2)使用“导出到补丁”选项手动更新评估板