更改Mercurial“默认"上层网址 [英] Changing Mercurial "Default" Parent URL
本文介绍了更改Mercurial“默认"上层网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我有一个Mercurial存储库,并且正在从默认的父URL(我从中克隆它的源)中提取信息.
Let's say I have a Mercurial repository and I'm pulling from a default parent URL (the source I cloned it from).
现在,我想更改默认的父URL(更改主机名,或将其复制到另一台计算机等).有没有办法做到这一点,还是我必须从新的URL重新克隆?
Now I want to change the default parent URL (hostname change, or it was copied to another machine, etc.). Is there a way to do this, or do I have to re-clone from the new URL?
推荐答案
您甚至可以在.hg/hgrc文件的[路径]部分中添加多个条目.
You can even add multiple entries in the [paths] section of your .hg/hgrc file.
[paths]
default = /repo_store/hg/project1
sandbox = /repo_store/hg/project1_experimental
然后可以在mercurial命令中指定其别名.默认回购协议无需指定,但其他必须类似,
And then can specify its alias in the mercurial commands. default repo need not be specified but others have to be like,
hg in # check incoming changes from default repo
hg in default # check incoming changes from default repo
hg in sandbox # check incoming changes from sandbox repo
hg pull sandbox # pull changes from sandbox repo
这篇关于更改Mercurial“默认"上层网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文