选择CVS优于SVN或Git的原因 [英] Reasons to prefer CVS over SVN or Git

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

问题描述

我刚刚找到一个仍然使用CVS的开源项目。我想知道现在是否还有什么理由更喜欢CVS比SVN或Git。 (我不认为是懒得移民作为答案!-))



CVS是否有其他两个缺乏的东西?说,支持$ OS或$ fancy_tool?



我仍然使用CVS来处理一些我自己的个人资料。 b $ b

与Git不同,您可以轻松地仅检出存储库的一部分。



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



CVS允许您在检出文件时将版本号扩展到每个文件中,从而轻松识别文件的版本



所以我发现CVS(有时甚至是RCS)很方便,当存储库是一个基本不相关的文件集合时,我更加有兴趣跟踪单个文件的变化,但整个版本库的修订并不是特别有意义。



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

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



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


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! ;-) )

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

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?

解决方案

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

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

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.

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.

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.)

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.

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.

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

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