问题描述
我刚刚找到一个仍然使用CVS的开源项目。我想知道现在是否还有什么理由更喜欢CVS比SVN或Git。 (我不认为是懒得移民作为答案!-))
CVS是否有其他两个缺乏的东西?说,支持$ OS或$ fancy_tool?
更新:这个问题引出了一些无法解释的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的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!