与 CVS 相比,使用 SVN 有何优点?
我的公司正在使用 CVS 作为我们事实上的源代码控制标准。 不过,我听很多人说SVN更好。
我知道 SVN 比较新,但除此之外,我不熟悉它的好处。
我正在寻找的是对两个系统进行良好、简洁的比较,指出每个系统在 Java/Eclipse 开发环境中的优点或缺点。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(12)
众多比较之一:
http://wiki.scummvm.org/index.php/CVS_vs_SVN
现在,这是针对该项目的,但很多内容都适用。
专业颠覆:
One of the many comparisons:
http://wiki.scummvm.org/index.php/CVS_vs_SVN
Now this is very specific to that project, but a lot of stuff apllies in general.
Pro Subversion:
CVS 仅跟踪逐个文件的修改,而 SVN 将整个提交作为新修订进行跟踪,这意味着更容易跟踪项目的历史记录。 再加上所有现代源代码控制软件都使用修订概念的事实,因此从 SVN 迁移比从 CVS 迁移要容易得多。
还有原子提交问题。 虽然我只遇到过一次,但两个人在 CVS 中一起提交可能会相互冲突,从而丢失一些数据并使您的客户端处于不一致的状态。 如果及早发现,这些问题并不重要,因为您的数据仍然在某个地方,但在压力大的环境中可能会很痛苦。
最后,围绕 CVS 开发的工具已经不多了。 虽然像 Git 或 Mercurial 这样的全新工具肯定还缺乏工具,但 SVN 在任何系统上都有相当大的应用程序基础。
编辑 2020:说真的,这个答案已经有 12 年历史了。 忘记 SVN,像其他人一样使用 Git!
CVS only tracks modification on a file-by-file basis, while SVN tracks a whole commit as a new revision, which means that it is easier to follow the history of your project. Add the fact that all modern source control software use the concept of revision so it is far easier to migrate from SVN than it is from CVS.
There is also the atomic commit problem. While I only encountered it once, it is possible that 2 people committing together in CVS can conflict each other, losing some data and putting your client in an inconsistent state. When detected early, these problems are not major because your data is still out there somewhere, but it can be a pain in a stressful environment.
And finally, not many tools are developed around CVS anymore. While the new and shiny-new tools like Git or Mercurial definitely lack tools yet, SVN has a pretty large application base on any system.
EDIT 2020: Seriously, this answer is 12 years old now. Forget SVN, go use Git like everyone else!
作为一个正在 CVS 和 SVN 之间切换的人(最初我们用 cvs2svn 切换了所有项目,然后决定在新项目上只使用 svn 进行过渡),以下是我们遇到的一些问题。
As someone who is in the middle of switching between CVS and SVN (initially we switched all of our projects with cvs2svn and then decided that we would transition by only using svn on new projects), here are some of the problems we have had.
不可忽视的一件事是生态系统。 我当时在一家 CVSNT 商店工作,我发现越来越多的开源工具默认支持 SubVersion。
One thing not to overlook is ecosystem. I was working at a CVSNT shop, and I was finding more and more open source tools supported SubVersion by default.
CVS(并发版本系统)和 SVN(子版本)是两个版本控制文件系统,在单个项目上协作的团队普遍使用。 这些系统允许协作者跟踪所做的更改,并知道谁在开发哪个分支以及是否应将分支应用于主干。 CVS 是两者中较老的一个,它已成为很多人的标准协作工具。 SVN 较新,它引入了许多改进来满足大多数人的需求。
CVS (Concurrent Versions System) and SVN (SubVersioN) are two version control file systems that are popularly used by teams who are collaborating on a single project. These systems allow the collaborators to keep track of the changes that are made and know who is developing which and whether a branch should be applied to the main trunk or not. CVS is the much older of the two and it has been the standard collaboration tool for a lot of people. SVN is much newer and it introduces a lot of improvements to address the demands of most people.
您应该查看 Git 而不是 SVN。 它是速度极快且功能强大的 DVCS。 它不像 SVN 那样用户友好,但它在这方面正在改进,并且学习起来并不难。
You should take a look at Git instead of SVN. It's a DVCS that's blazing-fast and very powerful. It's not as user-friendly as SVN, but it's improving in that regard, and it's not that hard to learn.
嗯,我觉得有一些东西让 svn 很棒。
使用 cvs2svn 可以在几个小时内轻松完成迁移。
Well, a few things which i feel makes svn awesome.
Migration can easily be done in a few hours using cvs2svn.
您还可以选择仅将最新代码从 CVS 迁移到 SVN 并冻结当前的 CVS 存储库。 这将使迁移变得更容易,并且您还可以在旧的 CVS 存储库中构建旧版本。
you might also choose to migrate only the latest code from CVS into SVN and freeze your current CVS repo. this will make migration easier and you might also build your legacy releases in the old CVS repo.
顺便说一句:CVSNT 支持原子提交
btw: CVSNT supports atomic commits
我会赞同 Eridius 对 Git 的建议,但我会将其扩展到其他 DRCS(分布式修订控制系统),例如 Mercurial 和 bazaar。
这些产品是相当新的产品,目前它们的工具和集成水平似乎很低(基于我的初步研究)。 我想说它们最适合那里的电力开发人员(以及这里;-))。
另一方面,CVS 目前不能为您做什么? 从你最初的问题来看,你真的没有任何问题,“CVS 在这方面很糟糕,我可以用什么来代替?”
您必须权衡任何潜在迁移的成本和收益。 对于现有的项目,我认为很难证明其合理性。
I'll second Eridius' suggestion of Git, but I'd expand it to the other DRCS (Distributed Revision Control System) such as Mercurial and bazaar.
These products are fairly recent and the level of tooling and integration with them seems low at the moment (based on my initial research). I'd say they were best suited to the power-developers out there (and on here ;-)).
On the other hand, what doesn't CVS currently do for you? From your initial question, you don't really have any, "CVS sucks at this, what could I use instead?"
You've gotta weigh up the costs of any potential migration against the benefits. For an existing project, I think that it would be hard to justify.
Subversion 书有附录,详细说明了与 CVS 的重要区别,这可能会帮助您做出决定。 这两种方法或多或少是相同的想法,但 SVN 是专门为修复 CVS 中长期存在的缺陷而设计的,因此,至少在理论上,SVN 永远是更好的选择。
The Subversion book has an appendix that details important differences from CVS, which may help you make your decision. The two approaches are more or less the same idea but SVN was specifically designed to fix long standing flaws in CVS so, in theory at least, SVN will always be the better choice.
SVN 与 CVS 相比有 3 个主要优点,
SVN has 3 main advantages over CVS