Mercurial-添加不在存储库文件夹中的项目 [英] Mercurial - Add project which is not within repository folder

查看:65
本文介绍了Mercurial-添加不在存储库文件夹中的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是经验不足的Mercurial用户.我正在将VS2010与Mercurial一起使用.我在一个单一的存储库中一切正常,其中包含一个解决方案文件和两个嵌套在父"文件夹中的项目.每当我更改文件时,提交过程都会检测到更改等,等等.

I am an inexperienced Mercurial user. I am using VS2010 with Mercurial. I had everything working nicely against a single repository, which contained a solution file and two projects nested within the 'parent' folder. Whenever I changed a file then the commit process would detect the change etc, etc.

然后我添加了第三个项目.我在一个新文件夹中添加了该项目,其中新文件夹是包含原始解决方案文件(其中嵌套了两个原始项目)的顶级文件夹的对等项.尽管第三个项目已添加到解决方案文件中,但在源代码管理方面,Mercurial并未将其视为属于"该解决方案.确实,它完全没有显示在源代码控制之下.

Then I added a third project. I added this project in a new folder, where the new folder was a peer of the top-level folder containing the original solution file (with original 2 projects nested within). Although the third project has been added to the solution file, it is not being recognised by Mercurial as 'belonging' to the solution in terms of source control. Indeed, it is not showing as being under source control at all.

如何将第三个项目添加到相同的存储库中,即使它位于映射到原始Mercurial存储库的原始文件夹外部"呢?

How do I add the third project to the same repository, even though it sits 'outside' the original folder which maps to the original Mercurial repository?

非常感谢.

推荐答案

您应该为每个项目使用不同的存储库.这是因为当您在hg中进行提交时,提交是针对整个层次结构的,而不仅仅是针对您所在的目录(或更低版本).有关更多详细信息,请参见概念上的最后一个重大差异 http://hginit.com/00.html

You should use a different repository for each project. This is because when you do a commit in hg, the commit is for the entire hierarchy, not just the directory (and below) that you are in. For more details have a look at the One last big conceptual difference section of http://hginit.com/00.html

这篇关于Mercurial-添加不在存储库文件夹中的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆