Mercurial 存储库可以嵌套吗?
如果已经有一个 Mercurial 存储库
/User/peter/development
,现在我想添加一个存储库,
/User/peter
因为我还想版本 .bashrc
、.profile
或 , 会发生什么情况/User/peter/notes
也是如此。在现有存储库之上拥有一个存储库是否会给 Mercurial 造成冲突?
What happens if there is already a Mercurial repository at
/User/peter/development
and now I want to add a repository for
/User/peter
because I also want to version .bashrc
, .profile
, or maybe /User/peter/notes
as well. Will having a repository above an already existing repository create conflicts for Mercurial?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一切都会好起来的。
Mercurial 似乎足够聪明,可以忽略其中已有存储库的子目录。这是与它的对话:
如您所见,当我添加到外部存储库时,它会忽略内部目录。
如果您想更加确定,可以将内部目录添加到
.hgignore
中。Everything will be okay.
It seems that Mercurial is smart enough to ignore subdirectories which already have repositories in them. Here's a conversation with it:
As you can see, when i add to the outer repository, it ignores the inner directory.
If you wanted to be extra sure, you could add the inner directory to your
.hgignore
.Mercurial 中添加了一个"subrepositories" 功能版本 1.3,并且是
1.5 中支持,允许一些 hg 命令作用于嵌套存储库
递归地。
There is a "subrepositories" feature that was added to Mercurial in version 1.3, and is
supported in 1.5, which allows some hg commands to act on nested repositories
recursively.