一个存储库/多个项目而不会混淆? [英] One repository/multiple projects without getting mixed up?

查看:75
本文介绍了一个存储库/多个项目而不会混淆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在阅读了Joel关于Mercurial的上一篇文章之后,我将其作为单用户,单计算机源代码控制系统在XP上进行介绍.

After reading Joel's last article on Mercurial, I'm giving it a shot on XP as a single-user, single-computer source control system.

不过,我想检查的一件事是:仅创建我所保存的所有小项目的存储库会更容易. C:\ VB.Net \,但结果是我对其中的不同项目(C:\ VB.Net \ ProjectA \,C:\ VB.Net \ ProjectB \等)所做的更改将被混入其中一个变更日志.

One thing I'd like to check, though, is: It'd be easier to just create a repository of all the tiny projects I keep in eg. C:\VB.Net\, but the result is that the changes I make to the different projects therein (C:\VB.Net\ProjectA\, C:\VB.Net\ProjectB\, etc.) will be mixed in a single changelog.

但是,如果我对所有项目都使用单个存储库,那么在进行差异分析或查看更改历史记录时,是否能够过滤数据,以便仅看到与给定项目相关的更改?否则,在每个项目目录中创建存储库是唯一的解决方案吗?

But if I use a single repository for all projects, when I do diff's or go through the change history, will I be able to filter data so that I only see changes pertaining to a given project? Otherwise, is creating repositories in each project directory the only solution?

谢谢.

推荐答案

我将为每个项目保留一个存储库.开销是最小的(每个源代码目录只有一个hg init,或者在资源管理器中单击了一个右键),您不会感到困惑.毕竟,为什么对一个程序进行更改会影响一个完全不相关的程序的版本历史?

I'd keep one repository for each single project. The overhead is minimal (just one hg init for each source code directory, or one right-click in Explorer), and you won't get confused. After all, why should a change to one program affect the version history of a completely unrelated one?

当然,您可以在存储库资源管理器中查看每个文件的历史记录,但是我认为将无关的内容混合到一个存储库中与版本控制这一概念背道而驰.

Of course, you can see the history of each file in the Repository Explorer, but I think it goes against the very concept of version control to mix unrelated stuff into one repository.

这篇关于一个存储库/多个项目而不会混淆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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