版本控制系统-Apache Subversion
Subversion是一个版本控制系统,相对于的RCS、CVS,采用了分支管理系统,它的设计目标就是取代CVS。互联网上免费的版本控制服务多基于Subversion。采用C/C++开发并在Apache协议下授权。
Apache Subversion is a full-featured version control system originally designed to be a better CVS. Subversion has since expanded beyond its original goal of replacing CVS, but its basic model, design, and interface remain heavily influenced by that goal. Even today, Subversion should still feel very familiar to CVS users.
Features
Most CVS features.
CVS is a relatively basic version control system. For the most part, Subversion has matched or exceeded CVS's feature set where those features continue to apply in Subversion's particular design.Directories are versioned.
Subversion versions directories as first-class objects, just like files.
Copying, deleting, and renaming are versioned.
Copying and deleting are versioned operations. Renaming is also a versioned operation, albeit with some quirks.
Free-form versioned metadata ("properties").
Subversion allows arbitrary metadata ("properties") to be attached to any file or directory. These properties are key/value pairs, and are versioned just like the objects they are attached to. Subversion also provides a way to attach arbitrary key/value properties to a revision (that is, to a committed changeset). These properties are not versioned, since they attach metadata to the version-space itself, but they can be changed at any time.
Atomic commits.
No part of a commit takes effect until the entire commit has succeeded. Revision numbers are per-commit, not per-file, and commit's log message is attached to its revision, not stored redundantly in all the files affected by that commit.
Branching and tagging are cheap (constant time) operations.
There is no reason for these operations to be expensive, so they aren't.
Branches and tags are both implemented in terms of an underlying "copy" operation. A copy takes up a small, constant amount of space. Any copy is a tag; and if you start committing on a copy, then it's a branch as well. (This does away with CVS's "branch-point tagging", by removing the distinction that made branch-point tags necessary in the first place.)
Merge tracking.
Subversion 1.5 introduces merge tracking: automated assistance with managing the flow of changes between lines of development, and with the merging of branches back into their sources. The 1.5 release of merge tracking has basic support for common scenarios; we will be extending the feature in upcoming releases.
File locking.
Subversion supports (but does not require) locking files so that users can be warned when multiple people try to edit the same file. A file can be marked as requiring a lock before being edited, in which case Subversion will present the file in read-only mode until a lock is acquired.
Symbolic links can be versioned.
Unix users can place symbolic links under version control. The links are recreated in Unix working copies, but not in win32 working copies.
Executable flag is preserved.
Subversion notices when a file is executable, and if that file is placed into version control, its executability will be preserved when it it checked out to other locations. (The mechanism Subversion uses to remember this is simply versioned properties, so executability can be manually edited when necessary, even from a client that does not acknowledge the file's executability, e.g., when having the wrong extension under Microsoft Windows).
Apache network server option, with WebDAV/DeltaV protocol.
Subversion can use the HTTP-based WebDAV/DeltaV protocol for network communications, and the Apache web server to provide repository-side network service. This gives Subversion an advantage over CVS in interoperability, and allows certain features (such as authentication, wire compression) to be provided in a way that is already familiar to administrators
Standalone server option (svnserve).
Subversion offers a standalone server option using a custom protocol, since not everyone wants to run an Apache HTTPD server. The standalone server can run as an inetd service or in daemon mode, and offers the same level of authentication and authorization functionality as the HTTPD-based server. The standalone server can also be tunnelled over ssh.
Parseable output.
All output of the Subversion command-line client is carefully designed to be both human readable and automatically parseable; scriptability is a high priority.
Localized messages.
Subversion uses gettext() to display translated error, informational, and help messages, based on current locale settings.
Interactive conflict resolution.
The Subversion command-line client (svn) offers various ways to resolve conflicting changes, include interactive resolution prompting. This mechanism is also made available via APIs, so that other clients (such as graphical clients) can offer interactive conflict resolution appropriate to their interfaces.
Repository read-only mirroring.
Subversion supplies a utility, svnsync for synchronizing (via either push or pull) a read-only slave repository with a master repository.
Write-through proxy over WebDAV.
Subversion 1.5 introduces a write-through proxy feature that allows slave repositories (see read-only mirroring) to handle all read operations themselves while passing write operations through to the master. This feature is only available with the Apache HTTPD (WebDAV) server option.
Natively client/server, layered library design with clean APIs.
Subversion is designed to be client/server from the beginning; thus avoiding some of the maintenance problems which have plagued CVS. The code is structured as a set of modules with well-defined interfaces, designed to be called by other applications.
Binary files handled efficiently.
Subversion is equally efficient on binary as on text files, because it uses a binary diffing algorithm to transmit and store successive revisions.
Costs are proportional to change size, not data size.
In general, the time required for a Subversion operation is proportional to the size of the changes resulting from that operation, not to the absolute size of the project in which the changes are taking place.
Bindings to programming languages.
The Subversion APIs come with bindings for many programming languages, such as Python, Perl, Java, and Ruby. (Subversion itself is written in C.)
Changelists.
Subversion 1.5 introduces changelists, which allows a user to put modified files into named groups on the client side, and then commit by specifying a particular group. For those who work on logically separate changesets simultaneously in the same directory tree, changelists can help keep things organized.
And more...
Even when we manage to keep this list up-to-date, it isn't possible to list every little feature. See the documentation for more information.
优于CVS之处
原子提交。一次提交不管是单个还是多个文件,都是作为一个整体提交的。在这当中发生的意外例如传输中断,不会引起数据库的不完整和数据损坏。
重命名、复制、删除文件等动作都保存在版本历史记录当中。
对于二进制文件,使用了节省空间的保存方法。(简单的理解,就是只保存和上一版本不同之处)
目录也有版本历史。整个目录树可以被移动或者复制,操作很简单,而且能够保留全部版本记录。
分支的开销非常小。
优化过的数据库访问,使得一些操作不必访问数据库就可以做到。这样减少了很多不必要的和数据库主机之间的网络流量。
最新版本:1.8
工作拷贝记录移动作为第一级操作
自动重新整合合并操作
属性继承 Inherited properties
资源库口述配置
移除基于 Neon 的 HTTP 客户端支持
废弃基于 Berkeley DB 的资料库后端
通过 GnuPG Agent 实现的内存内的密码缓存
FSFS 大小和性能的提升
在资料库中存储 authz 文件
全新的管理和架构方面的工具
最新版本:1.12
Apache Subversion 1.12.0 已发布,这是一款全功能的版本控制系统,最初是设计为替代 CVS。如今的 Subversion 已经实现了超越 CVS 的目标,但其基本模型、设计和界面仍然深受 CVS 影响,这也让 CVS 用户使用起来会感到非常熟悉。
更新内容方面,1.12 包括以下新特性:
改进 Shelving 功能 (实验性阶段)
改进 Commit Checkpointing 功能(实验性阶段)
对冲突解决器(Conflict Resolver)的改进
其他功能增强和 bug 修复
修复已知的问题
新功能的兼容性
另外,1.12.0 是一个常规更新版本,官方只提供 6 个月的技术支持,主要是用于测试引入的新功能,而上一个常规 1.11.0 已不再提供技术支持。Apache Subversion 1.9 和 1.10 作为 LTS 版本仍会提供技术支持,下一个 LTS 版本预计将是 1.14,计划2020年发布。
项目主页:http://subversion.apache.org/