4

我多年来一直使用以下行.hgsub

setup/help = https://my.repo.com/manuals

它会将名为“manuals”的存储库放入help另一个文件夹中的文件夹setup中。所以我的父存储库结构如下所示:

.hg
setup
|__help
|  |__.hg
|
.hgsub

在我今天更新到 Mercurial 4.9 之前,这没有问题,它现在说:“subrepo 路径包含非法组件:setup/help”,我什至无法提交主 repo。Mercurial现在禁止这样做吗?是否有有效的.hgsub语法来完成这项工作?我不想help成为主项目文件夹的直接子级。我之前的 Mercurial 版本是 4.5,这不像我使用的是古老的工具......

根据请求的错误回溯:

Traceback (most recent call last):
  File "mercurial\scmutil.pyo", line 165, in callcatch
  File "mercurial\dispatch.pyo", line 367, in _runcatchfunc
  File "mercurial\dispatch.pyo", line 1021, in _dispatch
  File "mercurial\dispatch.pyo", line 756, in runcommand
  File "mercurial\dispatch.pyo", line 1030, in _runcommand
  File "mercurial\dispatch.pyo", line 1018, in <lambda>
  File "mercurial\util.pyo", line 1670, in check
  File "mercurial\commands.pyo", line 4621, in push
  File "mercurial\context.pyo", line 277, in sub
  File "mercurial\subrepo.pyo", line 164, in subrepo
  File "mercurial\subrepo.pyo", line 414, in __init__
Abort: subrepo path contains illegal component: setup/help
abort: subrepo path contains illegal component: setup/help
4

2 回答 2

6

我有同样的错误,所以我克隆了 mercurial 存储库......

该错误是在标记版本 4.9 subrepo.py 中引入的。

大约一个月后,它得到了更正,修订版 41583 (87a6e3c953e045d92147925fc71aad7c327fdbfd)。我在实际的默认分支上对其进行了测试,再次工作!

所以,不需要一个bug条目,我们只需要等待下一个版本。

于 2019-03-01T08:37:59.990 回答
1

你对 Python 调试器有多自信?您可以使用--debugger这个时间启动命令。

你可能会看到这样的输出:

entering debugger - type c to continue starting hg or h for help
--Call--
> /usr/lib64/python2.7/contextlib.py(21)__exit__()
-> def __exit__(self, type, value, traceback):
(Pdb)

输入candenter直到您看到与您粘贴的相同的回溯。

当您处于正确的回溯状态时,您可以使用pp root,pp util.expandpath(root)和打印局部变量os.path.realpath(util.expandpath(root))。我们应该能够通过这些变量的值找到问题的根源。

要退出调试器,请输入qenter

于 2019-02-28T08:22:15.023 回答