PyCharm or Mercurial error: Number of lines annotated by Mercurial is not equal to number of lines in the file
PyCharm or Mercurial error: Number of lines annotated by Mercurial is not equal to number of lines in the file
当我点击注释时,我经常在 PyCharm 2018.2.5(运行 on Ubuntu 18.04)中收到此消息:
Number of lines annotated by Mercurial is not equal to number of lines
in the file. Check file econding and line separators
看起来像是 Mercurial 错误,但在命令行中,对同一文件执行以下命令是成功的:
# hg annotate -ud <file>
行编码为LF
,文件编码为UTF-8
编辑
Mercurial 版本:
# hg --version
Mercurial Distributed SCM (version 4.5.3)
我尝试注释的文件在子存储库中,并检查我发现的日志
PyCharm 正在尝试使用父亲的回购协议进行注释。
如果我在父亲的目录中执行命令,我得到一个空的结果。
所以错误具有误导性,显然我不知道如何在这种情况下设置 PyCharm。
有办法解决这个问题吗?
我明白了。我认为回答我自己的问题是有意义的。
我的项目结构如下:
- 项目根目录(无 VCS)
- RepoDir(汞存储库)
- SubRepoDir(hg 子存储库)
在这个配置中有些东西混淆了 PyCharm,以及第三级的子存储库
不会被识别。
以下效果很好:
- RepoDir 作为项目根目录(hg 存储库)
- SubRepoDir(hg 子存储库)
如果需要其他目录,可以将它们添加为内容根。
当我点击注释时,我经常在 PyCharm 2018.2.5(运行 on Ubuntu 18.04)中收到此消息:
Number of lines annotated by Mercurial is not equal to number of lines in the file. Check file econding and line separators
看起来像是 Mercurial 错误,但在命令行中,对同一文件执行以下命令是成功的:
# hg annotate -ud <file>
行编码为LF
,文件编码为UTF-8
编辑
Mercurial 版本:
# hg --version
Mercurial Distributed SCM (version 4.5.3)
我尝试注释的文件在子存储库中,并检查我发现的日志 PyCharm 正在尝试使用父亲的回购协议进行注释。 如果我在父亲的目录中执行命令,我得到一个空的结果。 所以错误具有误导性,显然我不知道如何在这种情况下设置 PyCharm。
有办法解决这个问题吗?
我明白了。我认为回答我自己的问题是有意义的。
我的项目结构如下:
- 项目根目录(无 VCS)
- RepoDir(汞存储库)
- SubRepoDir(hg 子存储库)
- RepoDir(汞存储库)
在这个配置中有些东西混淆了 PyCharm,以及第三级的子存储库 不会被识别。
以下效果很好:
- RepoDir 作为项目根目录(hg 存储库)
- SubRepoDir(hg 子存储库)
如果需要其他目录,可以将它们添加为内容根。