水银路径是否在 hgrc 中递归扩展?

发布于 2024-10-06 04:23:49 字数 259 浏览 0 评论 0原文

在 Mercurial 中,您可以在 [paths] 部分中向 hgrc 添加行,以创建要推送和拉取的别名。但这些可以递归扩展吗?例如:

# .hg/hgrc
[paths]
myserver = ssh://myserver/path/to/remote/repo
default = myserver

如果我将其放入 hgrc 并尝试执行 hg Push default,它会推送到 myserver 吗?

In mercurial, you add lines to hgrc in the [paths] section to create aliases to push to and pull from. But can these be expanded recursively? For example:

# .hg/hgrc
[paths]
myserver = ssh://myserver/path/to/remote/repo
default = myserver

If I put that in my hgrc and try to do hg push default, will it push to myserver?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

格子衫的從容 2024-10-13 04:23:49

不,他们不是。使用以下 hgrc 文件进行简单测试:

[paths]
repo = C:\Temp\repo
default = repo

然后推送:

[C:\Temp\clone1] :hg push
abort: repository C:\Temp\clone1\repo not found!

...告诉我这不起作用。您必须复制 URL。

基本上,看起来该名称只是被理解为当前存储库所在位置的本地相对路径。

No, they are not. A simple test with the following hgrc file:

[paths]
repo = C:\Temp\repo
default = repo

and then a push:

[C:\Temp\clone1] :hg push
abort: repository C:\Temp\clone1\repo not found!

... tells me that this doesn't work. You're going to have to copy the URL's.

Basically, it looks like the name is just understood as a local, relative path, from where the current repository resides.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文