One of the concept of version control systems, classification, common version control systems (CVS, SVN, BitKeeper, Git, etc.)

 What is

  Version control system (Version Control System, VCS) is a software that helps software teams of developers to work together, and archive a complete history of their work.

why

In our actual development process, often there is such a need or problem

  1. We need to add the program already released new features, there is no problem if the test validation, will use the new code, and verify during the test, can not affect the original code. We should be the common way to back up multiple copies of the source code. Doing so only advantage is simple, but it is particularly easy to make mistakes.
  2. The actual project development are basically more than one person collaboration, when writing code in more than one person, it involves the code merged into a problem.

History Category

  Throughout the history of version control system, " Version Control By Example On," a book of Eric Sink in his book on the version control are classified, broadly speaking, version control history can be divided into three generations:

generation The internet operating Concurrency Examples
The first generation no Only one file Locked RCS, SCCS
The second generation Centralized Multi-file Before submitting merger CVS, SourceSafe, Subversion, Team Foundation Server
Third Generation distributed Change collection Prior to the merger submitted Bazaar, Git, Mercurial

" Version Control By Example " in the author's website can be downloaded directly in electronic (PDF or EPUB)

The first generation

  The first generation version control system is referred to as a local version of the control system . By locking converted into concurrent execution order. Only one person handling the file. Specific process is as follows: First, we should put the file on a server, user-friendly upload or download files; Secondly, anyone who wants to file modification time, you need to put this file locking through the checkout command, so that other people can not be modified ; Finally, when the modifications are complete, the lock needs to be released, through checkin instructions, a new version of the form, to the server storage.
  The first generation version control system mainly RCS, SCCS (1972 released in) and DSEE (Atria ClearCase is considered to be the predecessor). At present, some projects still in use!

Pessimistic lock
  every time access to data, are concerned about data is modified, so every time to get the data will be locked to ensure that data in the course of their own use will not be modified others, unlock the data after the completion of use. Since the data will be other threads to read and write the data locked during the wait.

The second generation

  The second-generation version control system is called a centralized version control system (Centralized Version Control Systems, the CVCS) , which is more tolerant of synchronous changes, but there is an obvious limitation, the user must be incorporated into the current revision before they are allowed to submit work.
Here Insert Picture Description
Can be seen from the figure, in a centralized version control system, if the server belch fart, so that all developers can only look on in despair! Because, SVN for the management of the project is dependent on the central warehouse server! Our changes must be submitted to the central warehouse server.
  The second-generation version control system mainly CVS, SourceSafe, Subversion, Team Foundation Server, SVK.

Optimistic locking
  each time access to data, will not worry about the data is modified, so every time you get the data will not be locked, but when the need to update the data to determine whether the data has been modified others. If the data is modified by another thread, the data update is not performed if the data has not been modified by other threads, the data updates. Since the data is not locked, the data may be performed during read and write operations of other threads.
  Optimistic locking mechanism generally use a version number or CAS algorithm.

Third Generation

  The third-generation version control system is referred to as a distributed version control system (Distributed Version Control Systems, The DVCS) , which allows the combined and submitted separately. On the computer of each user will have a complete data warehouse, no network can still be used.
Here Insert Picture Description
Can be seen from the figure, the distributed version control system may have a server repository, to synchronize the respective developer's private warehouse! In a distributed version control system, the local each participant will have a full warehouse. Timely server crashes, we can still use Git (local warehouse management our code only), when the network is available, then the server can be synchronized!
  The third-generation version control system mainly Bazaar, Git, Mercurial, BitKeeper ,, Monotone. Currently, third-generation version control system has been a great rivers and lakes along the trend (see specific RhodeCode done an analysis report in 2016. Version Control Systems Popularity in 2016 )!

RCS

  修订控制系统(Revision Control System,RCS) 是第一代的版本控制系统。它是一组 UNIX 命令(暂时没有找到有 UI 界面的软件),允许多个用户开发和维护程序代码或文档。
  RCS 于 1982 年由 Purdue University 的 Walter F. Tichy 首次发布。 它是当时流行的源代码控制系统(SCCS,它几乎是第一个版本控制软件工具,早期 Unix 开发人员于1972年开发)的替代工具。 RCS 目前由 GNU 项目维护。GNU 官网介绍:https://www.gnu.org/software/rcs/;项目维护地址:http://savannah.gnu.org/projects/rcs/
  目前,我们可以从GNU RCS 的项目地址: http://savannah.gnu.org/projects/rcs/ 或者 Purdue University 的 RCS 官网 https://www.cs.purdue.edu/homes/trinkle/RCShome/ 下载最新版本的可执行程序、源码、文档。其中,GNU 官网只有源代码,没有预编译的可执行程序。Purdue University 的 RCS 官网倒是有一个旧版本的 Windows 平台的可执行程序。
Here Insert Picture Description

CVS

  并发版本系统(Concurrent Versions System,CVS)是最初的第二代版本控制系统。大约十年间,它是最为流行的版本控制系统,直到 2000 年被 Subversion 所取代。CVS 的安装教程可以在其项目主页 上找到。由于 CVS 是集中式版本控制系统,所以它有客户端和服务端之区分。但要开始使用 CVS 的话,即使只在你的本地机器上使用,也必须设置 CVS 的服务端。
  CVS 最早是由一位名叫 Dick Grune 的荷兰科学家在 1986 年开发的,当时有一个编译器项目,他正在寻找一种能与其学生合作的方法。我在英文网站 http://dickgrune.com/Programs/CVS.orig/#History 中找到如下一段话:

I created CVS to be able to cooperate with my students, Erik Baalbergen and Maarten Waage, on the ACK (Amsterdam Compiler Kit) C compiler. The three of us had vastly different schedules (one student was a steady 9-5 worker, the other was irregular, and I could work on the project only in the evenings). Their project ran from July 1984 to August 1985. CVS was initially called cmt, for the obvious reason that it allowed us to commit versions independently.

  Grune 于 1986 年 6 月 23 日公开发布了该代码。CVS 最初仅仅只是一个包装了 RCS( 修订控制系统(Revision Control System)) 的 Shell 脚本集合。最终演变成当前版本的 CVS 的代码始于 1989 年 4 月的 Brian Berliner 的贡献,后来由 Jeff Polk 和许多其他贡献者提供帮助。 Brian Berliner 撰写了一篇论文,介绍了他对 CVS 程序的改进 - 该程序描述了该工具是如何在 Prysma 内部扩展和使用的。 1990 年 11 月 19 日,CVS 1.0 版被提交给自由软件基金会进行开发和分发。

关于 CVS 的使用可以参考这篇文章:https://zhuanlan.zhihu.com/p/51792519

VSS

  VSS 的全称为 Visual Source Safe,是美国微软公司出品的版本控制系统。兼容 Check out-Modify-Check in(独占工作模式)与 Copy-Modify-Merge(并行工作模式)。它也属于集中式版本控制系统。
  VSS 通常与微软公司的 Visual Studio 产品同时发布,并且高度集成。VSS 使用文件系统作为存储方式,每次版本变更时就需要大量地读写硬盘。这也是 VSS 最广受垢弊的缺点。VSS2005 拥有Web 访问功能,不再与 Visual Studio 同时发布。
  2008 年,微软发布了 Team Foundation Server 的项目生命期管理工具,以替代 VSS。其不仅仅包含版本控制系统,还包括一系列的项目生命期管理工具。此中使用的还是集中式版本控制系统。

  • Team Foundation Server:本地版本,用户安装使用!
  • Team Foundation Service:云端版本,使用微软账户登录!

  2019 年,微软发布了全新的 Azure DevOps Server。这不仅仅是个改名,整个软件的架构都进行了重新的调整!有了它,我们就可以使用一系列的项目生命期管理工具。版本控制系统仅仅是其中的一小部分。注意其中的版本控制系统是基于 Git 的分布式版本控制系统。

  • Azure DevOps Server:本地版本,用户安装使用!是 Team Foundation Server 的升级版本。
  • Azure DevOps Service:云端版本,使用微软账户登录!是 Team Foundation Service 的升级版本。

SVN

  SVN(Subversion 的缩写)是一个开放源代码的版本控制系统,相较于 RCS、CVS,它采用了分支管理系统。SVN 由 CollabNet 公司于 2000 年资助并发起开发,目的是创建一个更好用的版本控制系统以取代 CVS。
  2000 年 2 月,CollabNet 联系了 Open Source Development with CVS(Coriolis, 1999)的作者 Karl Fogel,问他是否愿意为这个新项目工作。这时 Karl 已经在和他的朋友 Jim Blandy 讨论一个新的版本控制系统的设计。他不仅已经起好了名字 “Subversion”,而且有了 Subvesion 资料库的基本设计。
  经过 14 个月的编码,在 2001 年 8 月 31 号,Subversion 可以“自我寄生”了。就是说,Subversion 开发人员停止使用 CVS 管理 Subversion 的源代码,开始使用 Subversion 代替。
  2009 年 11 月,Subversion 被 Apache Incubator 项目所接收。2010 年 1 月,正式成为 Apache 软件基金会的一个顶级项目。项目地址:https://subversion.apache.org/,我们可以从中下载源代码、文档,没有预编译的可执行程序。

以下是几款常用的 SVN 客户端图形化软件:

  • TortoiseSVN:开源软件,在 Windows 上非常受到欢迎的一套客户端软件,它与资源管理器集成得相当不错,可以透过资源管理器在文件或目录上用鼠标右键的菜单完成 SVN 的操作。官方网站:http://tortoisesvn.net/
  • SnailSVN:Mac OS X 平台下类似 TortoiseSVN 的图形化 SVN 客户端,可自动标记文件状态,并通过右键菜单提供各种常用 SVN 功能。 网站:https://langui.net/snailsvn/
  • Ankhsvn:将 subversion 的操作集成进 Visual Studio 的 SVN 客户端软件。官方网站:http://ankhsvn.open.collab.net/
  • Subclipse:将 Subversion 的操作集成进 Eclipse 的 SVN 客户端软件。官方网站:http://subclipse.tigris.org/
  • SmartSVN:同时支持 Mac、Linux、Windows。是一款收费软件。

BitKeeper

  BitKeeper 是一套 BitMover 公司开发的分布式版本控制软件,它曾是一款专有软件。BitKeeper 是最初的分布式源代码控制系统。BitKeeper 的许多概念取自 TeamWare(Larry McVoy 在 Sun 公司时开发的产品)。
  BitMover 公司 CEO Larry McVoy 与 Linus 曾是好友, Larry 说服 Linus 在内核开发中使用 BitKeeper。而 BitKeeper 在免费使用的许可证中加入很多限制条件,惹恼了内核开发者,最终促使 Linus 开发出了毁灭 BitMove r的 Git。

2016 年 5 月 11 日,BitKeeper 宣布以 Apache 2.0 许可证开源。

Mercurial

  Mercurial 是跨平台的分布式版本控制软件,主要由 Python 语言实现。Mercurial一开始的主要运行平台是 Linux,现在 Mercurial 已经移植到 Windows、Mac OS X 和大多数的类 Unix 系统中。Mercurial 主要由命令行程序组成,现在也有了图形用户界面。
  Mercurial 的创建者和主要开发人员是 Matt Mackal。其源代码采用GNU通用公共许可证第二版为授权,确保了Mercurial是一个自由软件。

Git

  在 Linux 开源的初期,Linux 开源项目的代码是 linus 本人通过 linux 命令 diff 和 patch 两条命令手动完成。随着 Linux 代码越来越壮大,靠 Linus 一个人来手动合并已经不现实。2002 年,Linus 选择了一个商业版本控制系统 BitKeeper 作为 Linux 内核的代码管理工具(BitKeeper 的开发商 BitMover 授权 linux 社区免费使用)。但是,免费使用是有很多的限制的,因此 linux 社区的大佬开始破解 BitKeeper。其中,samba 的作者 andrew 破解成功了。但是被 BitMover 公司发现,收回免费使用权。
  迫不得已,Linus 选择了自己开发一个分布式版本控制工具以替代 BitKeeper。linus 闭关一个月,写出了 Git。在一个月后,Git 成功接管了 Linux 社区的版本控制工作,并且开始开源。维基百科中,有如下历史记录:

  • 2005 年 4 月 3 日,开始开发 Git。
  • 2005 年 4 月 6 日,项目发布。
  • 2005 年 4 月 7 日,Git 就可以作为自身的版本控制工具了。
  • 2005 年 4 月 18 日,发生第一个多分支合并。
  • 2005 年 4 月 29 日,Git 的性能就已经达到了 Linus 的预期。
  • June 16, 2005, the Linux kernel 2.6.12 released, then Git already in the maintenance of the Linux kernel source code.

  2005 July 26, Linus retired from the Git to another major contributor to the maintenance of a Git Junio ​​C Hamano.

Linus Torvalds developed the Git distributed version control system in 2016 after 11 years, BitKeeper announced in open source under the Apache 2.0 license.

reference

  1. https://blog.51cto.com/12805107/2089757
  2. https://www.imooc.com/article/details/id/44217
  3. https://softwareengineering.stackexchange.com/questions/35074/im-a-subversion-geek-why-should-i-consider-or-not-consider-mercurial-or-git-or
  4. https://www.jianshu.com/p/a46f1cdada53
  5. https://gotgit.readthedocs.io/en/latest/index.html
  6. https://blog.csdn.net/qq_36647038/article/details/84022363
  7. http://www.worldhello.net/gotgit/

Reproduced in: https://blog.csdn.net/ZCShouCSDN/article/details/100590313

 

Guess you like

Origin www.cnblogs.com/boyYu/p/12145507.html