假设我有一个 Mercurial 存储库,并且我从默认父 URL(我从中克隆它的源)中提取内容。
现在我想更改默认的父 URL(主机名更改,或者将其复制到另一台计算机等)。有没有办法做到这一点,或者我必须从新的 URL 重新克隆?
最佳答案
您甚至可以在 .hg/hgrc 文件的 [paths] 部分添加多个条目。
[paths]
default = /repo_store/hg/project1
sandbox = /repo_store/hg/project1_experimental
然后可以在mercurial命令中指定其别名。不需要指定默认存储库,但其他存储库必须类似于,
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 - 更改 Mercurial "Default"父 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/860761/