源代码控制 - 分布式系统与非分布式系统 - 有什么区别?
我刚刚读了 Spolsky 关于分布式与非分布式版本控制系统的最后一篇文章 http:// /www.joelonsoftware.com/items/2010/03/17.html。两者有什么区别?我们公司使用TFS。这属于哪个阵营?
I just read Spolsky's last piece about Distributed vs. Non-Distributed version control systems http://www.joelonsoftware.com/items/2010/03/17.html. What's the difference between the two? Our company uses TFS. What camp does this fall in?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
不同之处在于发布过程:
。
版本控制系统是关于掌握数据更改的复杂性(因为并行任务和/或一项任务的并行工作),并且与其他人(其他任务和/或其他人)协作的方式在 CVCS 之间有很大不同和 DVCS。
TFS (Team Foundation Server) 是一个项目管理系统,其中包括 CVCS:Team Foundation 版本控制 ( TFVC),以“工作项”的概念为中心。
它的集中化方面强制了一致性(除了源之外的其他元素)
另请参阅此VSS 到 TFS 文档,其中说明了它如何适应一个团队可以访问一个参考。
一种引用意味着更容易维护(无需执行同步或数据刷新),因此其中管理的元素(任务列表、项目计划、问题和需求)数量更多。
The difference is in the publication process:
.
Version Control System is about mastering the complexity of the changes in data (because of parallel tasks and/or parallel works on one task), and the way you collaborate with others (other tasks and/or other people) is quite different between a CVCS and a DVCS.
TFS (Team Foundation Server) is a project management system which includes a CVCS: Team Foundation Version Control (TFVC), centered around the notion of "work item".
Its centralized aspect enforces a consistency (of other elements than just sources)
See also this VSS to TFS document, which illustrates how it is adapted to a team having access to one referential.
One referential means it is easier to maintain (no synchronization or data refresh to perform), hence the greater number of elements (tasks lists, project plans, issues, and requirements) managed in it.
简单来说,集中式 VCS(包括 TFS)系统有一个中央存储,每个用户都获取并提交到这一位置。
在分布式 VCS 中,每个用户都拥有完整的存储库,并且可以进行更改,然后将其同步到其他存储库,服务器通常并不是真正必要的。
Simply speaking, a centralized VCS (including TFS) system has a central storage and each users gets and commits to this one location.
In distributed VCS, each user has the full repository and can make changes that are then synchronized to other repositories, a server is usually not really necessary.
请查看 http://hginit.com。 Joel 为 Mercurial(即 DVCS)编写了一个很好的教程。我以前没有读过任何有关 DVCS 的文章(我一直使用 SVN),我发现它很容易理解。
Check out http://hginit.com. Joel wrote a nice tutorial for Mercurial, which is a DVCS. I hadn't done any reading about DVCS before (I've always used SVN) and I found it easy to understand.
集中式 VCS (CVCS) 涉及与之交互的中央服务器。分布式 VCS (DVCS) 不需要集中式服务器。
DVCS 签出是完整且独立的,包括存储库历史记录。 CVCS 的情况并非如此。
对于 CVCS,大多数活动都需要与服务器交互。 DVCS 则不然,因为它们是“完整”的签出、回购历史记录等等。
您需要写入权限才能提交 CVCS; DVCS 的用户相互“拉动”更改。这导致了 GitHub 和 BitBucket 等平台推动的更多社交编码。
这些是一些相关的项目,毫无疑问还有其他的。
A centralized VCS (CVCS) involves a central server that is interacted with. A distributed VCS (DVCS) doesn't need a centralized server.
DVCS checkouts are complete and self-contained, including repository history. This is not the case with CVCS.
With a CVCS, most activities require interacting with the server. Not so with DVCS, since they are "complete" checkouts, repo history and all.
You need write access to commit to a CVCS; users of DVCS "pull" changes from each other. This leads to more social coding facilitated by the likes of GitHub and BitBucket.
Those are a few relevant items, no doubt there are others.
差异是巨大的。
在分布式系统中,每个开发人员都在自己的沙箱中工作;他可以自由地进行尽可能多的实验,并且只有在代码准备就绪时才推送到“主”存储库。
在中央系统中,每个人都在同一个沙箱中工作。这意味着如果您的代码不稳定,您就无法签入它,因为您会破坏其他人的代码。
如果您正在开发一项功能,那么它自然需要一段时间才能稳定,并且由于您无法承担任何不稳定的代码,因此您将等待更改直到它们稳定为止。这使得开发变得非常缓慢,特别是当有很多人参与该项目时。您只是无法轻松添加新功能,因为您遇到了稳定性问题,您希望主干中的代码稳定,但您不能!
对于分布式系统,因为每个开发人员都在自己的沙箱上工作,所以他不需要担心弄乱其他人的代码。而且由于这些系统往往非常擅长合并,因此您仍然可以使代码库与主存储库保持同步,同时仍然在本地存储库中维护您的更改。
The difference is huge.
In distributed systems, each developer works in his own sandbox; he has the freedom to experiment as much as he want, and only push to the "main" repository when his code is ready.
In central systems, everyone works in the same sandbox. This means that if your code is not stable, you can't check it in, because you will break everyone else's code.
If you're working on a feature, it will naturally take a while before it stabilizes, and because you can't afford to commit any unstable code, you would sit on changes until they're stable. This makes development really really slow, specially when you have lots of people working on the project. You just can't add new features easily because you have this stabilization issue where you want the code in the trunk to be stable but you can't!
with distributed systems, because each developer works on his own sandbox, he doesn't need to worry about messing up anyone else's code. And because these systems tend to be really good at merging, you can still have your codebase be up to date with the main repository while still maintaining your changes in your local repository.
我建议阅读 Martin Fowler 对 版本控制工具 的评论
简而言之,CVCS 和 DVCS 之间的主要区别前者(TFS 就是一个例子)有一个中央代码存储库,而在后一种情况下,有多个存储库,并且没有一个是“默认”的中央存储库 - 它们都是平等的。
I would recommend reading Martin Fowler's review of Version Control Tools
In short the key difference between CVCS and DVCS is that the former (of which TFS is an example) have one central repository of code and in the latter case, there are multiple repositories and no one is 'by default' the central one - they are all equal.