比 SVN 或 Git 更喜欢 CVS 的原因 [英] Reasons to prefer CVS over SVN or Git

查看:37
本文介绍了比 SVN 或 Git 更喜欢 CVS 的原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚发现了一个仍在使用 CVS 的开源项目.我想知道现在是否还有任何理由更喜欢 CVS 而不是 SVN 或 Git.(我不认为懒得迁移作为答案!;-) )

I just found an open source project that still uses CVS. I wondered if there were still any reasons to prefer CVS over SVN or Git nowadays. (I don't count being too lazy to migrate as an answer! ;-) )

CVS 有其他两个缺少的东西吗?比如说,支持 $OS 还是 $fancy_tool?

Does CVS have anything the other two lack? Say, support for $OS or $fancy_tool?

在《使用SVN比使用CVS有什么优势?"有详细的答案为什么不使用 CVS.但我想反过来问.CVS 不可能全是坏事.或者是吗?

In "What are the advantages of using SVN over CVS?" there are elaborated answers why not to use CVS. But I want to ask the other way around. CVS can't be all bad. Or is it?

推荐答案

我仍然使用 CVS 来处理我自己的一些个人事情.

I still use CVS for some of my own personal stuff.

与 Git 不同的是,您可以轻松地仅检出存储库的一个子集.

Unlike with Git, you can easily check out only a subset of the repository.

CVS 为每个文件分配顺序版本号(1.1、1.2、1.3、...).在 Git 中,版本号是 40 个字符的十六进制校验和.在 SVN 中,修订号在整个存储库中是连续的;给定的数字适用于整个存储库.

And CVS assigns sequential version numbers (1.1, 1.2, 1.3, ...) to each file. In Git, version numbers are 40-character hexadecimal checksums. In SVN, revision numbers are sequential across the entire repository; a given number applies to the entire repository.

CVS 允许您在检出文件时将版本号扩展到每个文件中,从而无需参考文件来自的存储库即可轻松识别文件的版本.

And CVS lets you expand version numbers into each file when checking it out, making it easy to identify which version a file is without reference to the repository it came from.

因此,当存储库是大部分不相关文件的集合时,我发现 CVS(有时甚至是 RCS)很方便,而且我更感兴趣的是跟踪单个文件的更改,但整个存储库的修订并不是特别有意义.

So I find CVS (and sometimes even RCS) convenient when the repository is a collection of largely unrelated files, and I'm more interested in tracking changes on individual files, but revisions of the repository as a whole are not particularly meaningful.

(如果存储库包含用于构建单个程序或库的源文件,则情况并非如此;在这种情况下,您需要整个项目的连贯历史.)

(That's not going to be the case if the repository contains source files used to build a single program or library; in that case, you want a coherent history for the project as a whole.)

最后,CVS 将每个文件的历史记录存储在一个文件中(与 RCS 使用的格式相同),格式相对简单.至少有一次,我不得不手动重建已损坏的已保存 CVS 文件.我不确定如何使用 SVN 或 Git 做到这一点.

Finally, CVS stores the history for each file in a single file (with the same format used by RCS) with a relatively straightforward format. At least once, I've had to manually reconstruct a saved CVS file that had become corrupted. I'm not sure how I could have done that with SVN or Git.

更新:这个问题引起了一些无法解释的反对.我只能猜测原因(而且我不太担心偶尔会被否决),但也许有些读者认为我提倡 CVS 作为比 SVN 或 Git 更好的系统.我不是;我只是指出 CVS 在一些相当狭窄的情况下可以有一些优势.

UPDATE: This question has drawn a couple of unexplained downvotes. I can only guess at the reasons (and I don't worry much about the occasional downvote), but perhaps some readers think I'm advocating CVS as a better system than SVN or Git. I am not; I'm merely pointing out that CVS can have some advantages in some fairly narrow circumstances.

这篇关于比 SVN 或 Git 更喜欢 CVS 的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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