Netbeans / Mercurial - 在“Team - > Share”菜单下定义多个推/拉存储库?

时间:2012-02-09 00:53:20

标签: netbeans mercurial push dvcs

在Netbeans w / Mercurial中,您有一个菜单,其中列出了您的默认推/拉存储库以及“其他”选项,以手动指定要推/拉的存储库:

push/pull menu

我的“默认推/拉”设置为我们的中央存储库,但我的工作存储库首先被拉入临时存储库。毋庸置疑,我可以在“共享”菜单中使用更多项目而不仅仅是“默认推/拉”。有没有办法定义更多,所以它看起来像:

- Share
--- Push to default
--- Push to my-other-repo-1
--- Push to my-other-repo-2
--- Push to other
--- Pull from default
--- Pull from my-other-repo-1
--- Pull from my-other-repo-2
--- Pull from other

目前我只选择“从其他人那里拉”,但每次都必须手动输入其他存储库的信息。

1 个答案:

答案 0 :(得分:2)

我查看了source for the Mercurial integration with NetBeans,无法扩展菜单。它只是created,其中包含“推送其他...”和“拉其他......”的单个菜单项。

Mercurial实际上有a mechanism,您可以在其中添加快捷方式到其他存储库:

[paths]
default = http://server/mike-transcodes-719
my-other-repo-1 = ssh://server/other-repo11
my-other-repo-2 = http://server/other-repo-2

使用.hg/hgrc文件中的此类部分,您现在可以执行

$ hg pull my-other-repo-1
命令行上的

。但是,NetBeans仅读取default文件中default-push部分中的default-pull[paths].hg/hgrc值。在菜单中包含其他推/拉路径会很聪明,但它们会被忽略。

这是NetBeans版本7.1的版本,希望将来会发生变化。