在 Netbeans w/Mercurial 中,您有一个菜单,其中列出了默认的推/拉存储库以及“其他”选项,用于手动指定要推/拉的存储库:
我的“默认推/拉”设置为我们的中央存储库,但我的工作存储库首先被拉入临时存储库。不用说,我可以在“共享”菜单中使用更多项目,而不仅仅是“默认推/拉”。有没有办法定义更多,所以它看起来像:
- 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
目前我只是选择“从其他存储库中提取”,但每次都必须手动输入其他存储库的信息。
最佳答案
我查看了 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 仅从 [paths]
读取 default
、default-push
和 default-pull
值.hg/hgrc
文件中的部分。在菜单中包含其他推/拉路径本来是明智的做法,但它们被忽略了。
这是从 NetBeans 7.1 版开始的,希望将来会发生变化。
关于Netbeans/Mercurial - 在 "Team -> Share"菜单下定义多个推/拉存储库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9203986/