简体   繁体   English

我可以在mercurial / kiln中为存储库URL分配“别名”吗?

[英]Can I assign an “alias” to a repository URL in mercurial/kiln?

I keep all my personal projects on my Kiln account and I also have a bitbucket account where I push repositories when I need to share them with people. 我将所有个人项目保存在我的Kiln帐户上,并且我还有一个bitbucket帐户,当我需要与人们共享时,我会推送存储库。 Is there some way for me to setup an alias for a repo URL so I can do something like 有没有办法为我设置一个repo URL的别名,所以我可以做类似的事情

hg push kiln

or 要么

hg push bitbucket

instead of typing in the entire URL each time: hg push https://path/to/repo 而不是每次都输入整个URL: hg push https://path/to/repo

Yes, you can do this in your repo's hgrc file using the paths section . 是的,您可以使用路径部分在repo的hgrc文件中执行此操作。

[paths]
default = https://path/to/repo
kiln = https://path/to/kiln
bitbucket = https://path/to/bitbucket

If you create new repos often, you can also add this to your ~/.hgrc file. 如果经常创建新的repos,也可以将其添加到〜/ .hgrc文件中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM