Concurrent Versions System
From Wikipedia, the free encyclopedia
This article or section is missing citations or needs footnotes. Using inline citations helps guard against copyright violations and factual inaccuracies. (November 2007) |
Concurrent Versions System | |
---|---|
Developed by | The CVS Team |
Latest release | 1.11.23 / May 8, 2008 |
Preview release | 1.12.13 / September 28, 2005 |
OS | Unix-like, Windows |
Genre | revision control |
License | GNU General Public License |
Website | http://www.nongnu.org/cvs |
In the field of software development, the Concurrent Versions System (CVS), also known as the Concurrent Versioning System, provides a version control system based on open-source code. Version control system software keeps track of all work and all changes in a set of files, and allows several developers (potentially widely separated in space and/or time) to collaborate. Dick Grune developed CVS in the 1980s. CVS has become popular in the open source software world and is released under the GNU General Public License.
Contents |
[edit] Features
CVS uses a client-server architecture: a server stores the current version(s) of a project and its history, and clients connect to the server in order to "check out" a complete copy of the project, work on this copy and then later "check in" their changes. Typically, the client and server connect over a LAN or over the Internet, but client and server may both run on the same machine if CVS has the task of keeping track of the version history of a project with only local developers. The server software normally runs on Unix (although at least the CVSNT server supports various flavors of Microsoft Windows and Linux), while CVS clients may run on any major operating-system platform.
Several developers may work on the same project concurrently, each one editing files within their own "working copy" of the project, and sending (or checking in) their modifications to the server. To avoid the possibility of people stepping on each other's toes, the server will only accept changes made to the most recent version of a file. Developers are therefore expected to keep their working copy up-to-date by incorporating other people's changes on a regular basis. This task is mostly handled automatically by the CVS client, requiring manual intervention only when a conflict arises between a checked-in modification and the yet-unchecked local version of a file.
If the check-in operation succeeds, then the version numbers of all files involved automatically increment, and the CVS-server writes a user-supplied description line, the date and the author's name to its log files. CVS can also run external, user-specified log processing scripts following each commit. These scripts are installed by an entry in CVS's loginfo file, which can trigger email notification or convert the log data into a Web-based format.
Clients can also compare versions, request a complete history of changes, or check out a historical snapshot of the project as of a given date or as of a revision number. Many open-source projects allow "anonymous read access", a feature pioneered by OpenBSD. This means that clients may check out and compare versions with either a blank or simple published password (e.g., "anoncvs"); only the check-in of changes requires a personal account and password in these scenarios.
Clients can also use the "update" command in order to bring their local copies up-to-date with the newest version on the server. This eliminates the need for repeated downloading of the whole project.
CVS can also maintain different "branches" of a project. For instance, a released version of the software project may form one branch, used for bug fixes, while a version under current development, with major changes and new features, can form a separate branch.
CVS uses delta compression for efficient storage of different versions of the same file. The implementation favors files with many lines (usually text files) - in extreme cases the system may store individual copies of each version rather than deltas.
[edit] Terminology
CVS labels a single project (set of related files) which it manages a module. A CVS server stores the modules it manages in its repository. Programmers acquire copies of modules by checking out. The checked-out files serve as a working copy, sandbox or workspace. Changes to the working copy will be reflected in the repository by committing them. To update is to acquire or merge the changes in the repository with the working copy.
[edit] History and status
CVS developed from an earlier versioning-system called Revision Control System (RCS), still in use, which manages individual files but not whole projects. Dick Grune has provided some brief historical notes about CVS on his site. To quote:
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.
– Dick Grune, Dick Grune's website
Grune publicly released the code to mod.sources on June 23, 1986: Google Groups continues to archive and serve the original usenet post.
The code that eventually evolved into the current version of CVS started with Brian Berliner in April 1989, with later input from Jeff Polk and many other contributors. Brian Berliner wrote a paper introducing his improvements to the CVS program which describes how the tool was extended and used internally by Prisma, a third-party developer working on the SunOS kernel, and was released for the benefit of the community under the GPL.
CVS introduced the implementation of branching into version-control systems: the branching techniques in other systems all derive from the CVS implementation.
CVS has always solidly supported distributed, multi-site and offline operations due to the unreliability of the few computer-networks that existed at the time CVS evolved.
Nowadays, a group of volunteers maintains the CVS code. Notably, the development of the Microsoft Windows version of CVS has split off into a separate project named CVSNT and has been more active in extending the feature set of the system, even porting the changes back to the UNIX platform under the name CVSNT.
[edit] Relationship with GNU
Historically, the relationship between CVS and the GNU project could appear somewhat ambiguous: the GNU Web site distributed the program, labelling it "GNU package" on one page and "other GPL-licensed project" on another. Clarification came recently when CVS development moved from cvshome.org to savannah.nongnu.org, with CVS officially assigned to the non-gnu category. On the FTP site, the program has traditionally resided in the /non-gnu/
directory and still does.
[edit] Limitations
For each commonly listed limitation of CVS there exists a commonly listed reason. The developers of CVS insist that the following properties of CVS are not shortcomings, but features that were carefully planned, designed and implemented into CVS:
- CVS does not version the moving or renaming of files and directories. It was implemented this way because in the past Refactoring was avoided in development processes. More recently the thinking has changed and refactoring can be managed by an administrator (by moving the RCS file) as it is required. If you develop in Oracle Forms, Cobol, Fortran or even C++ then the CVS reasoning is quite commonly accepted; if you develop with Java then the CVS reasoning may seem counterintuitive.
- No versioning of symbolic links. Symbolic links stored in a version control system can pose a security risk - someone can create a symbolic link index.htm to /etc/passwd and then store it in the repository; when the "code" is exported to a Web server the Web site now has a copy of the system security file available for public inspection. A developer may prefer the convenience and accept the responsibility to decide what is safe to version and what is not; a project manager or auditor may prefer to reduce the risk by using build scripts that require certain privileges and conscious intervention to execute.
- Limited support for Unicode text-files and non-ASCII filenames. Unix systems run in UTF-8 and so CVS on Unix handles UTF-8 filenames and files natively. For programmers working on Unix systems all with the same encoding then this response seems reasonable; but it causes problems when multiple encodings are used, perhaps because clients are running another OS, such as AS/400 or Windows). Care must also be taken when using CVS to store text or XML files that contain Unicode.
- No atomic commit. The network and server used should have sufficient resilience that a commit can complete without either crashing. In many CM processes development work is performed on branches (for example, add feature A1234) and then merged into the trunk after code review - that final merge is 'atomic' and performed in the data center by QA. In some, for example Subversion, every checkin is atomic, which helps prevent different files being at incompatible versions.
- Expensive branch operations. CVS assumes that the majority of work will take place on the trunk — branches should generally be short-lived or historical. When used as designed, branches are easily managed and branch operations are efficient and fast.
- CVS treats files as textual by default. Text files should be the primary file type stored in the CVS repository. Binary files are supported and files with a particular file extension can automatically be recognised as being binary.
- No support for distributed revision control or unpublished changes. Programmers should commit changes to the files often for frequent merging and rapid publication to all users. Distributed version control systems and systems which support 'unpublished commits' promote making complex extended changes with insufficent communication with the rest of the development team.
Over time, developers have wanted to change the CVS code significantly to add new features, refactor the code, alter the operational model and improve developers' productivity. This has led to the phrase YACC: "Yet Another CVS Clone" (itself a play on the Unix command named, yacc
, which stands for "yet another compiler compiler"). CVS replacement projects include CVSNT (first released 1998), EVS (currently in beta as of 31 August 2007), OpenCVS (not released as of 4 December 2007) and Subversion (first released 2004) and numerous systems to support distributed revision control.
[edit] See also
- Revision control, a general overview of version-control concepts
- A list and comparison of revision control software
- DCVS, a distributed revision control system based on CVS
- Distributed revision control
- TortoiseCVS, a shell-integrated CVS client for Windows
- Subversion (SVN), an open-source revision control system, which aims to be a replacement for CVS
- Git, an open-source revision control system, which aims to be a replacement both for CVS and Subversion.
- TortoiseSVN, a similar tool for use with Subversion, inspired by TortoiseCVS
- CVSNT – open-source revision control system, alternative to CVS
- Bonsai CVS code management system, a tool to report on files, directories, and branches under CVS management.
- Cervisia, a KDE GUI frontend for CVS
- ViewVC, a browser interface for CVS repositories
[edit] IDEs with support for CVS
[edit] References
- David Thomas; Andrew Hunt (2003). Pragmatic Version Control Using CVS. The Pragmatic Programmers. ISBN 0-9745140-0-4.
- Jennifer Vesperman (2006). Essential CVS, 2e, O'Reilly. ISBN 0-596-52703-9.
- Per Cederqvist et al. Version Management with CVS. ISBN 0-9541617-1-8.
- Karl Franz Fogel; Moshe Bar. Open Source Development with CVS. ISBN 1-932111-81-6.
[edit] External links
- CVS - Concurrent Versions System (the main web site for CVS - currently unmaintained)
- Dick Grune's page about CVS
- Interview with Brian Berliner: CVS creator
- Introduction to CVS
- CVS Best Practices A collection of practices for version control using CVS.
- Combined CVS and Subversion tutorial
- Michael Amorose's How To Set Up A CVS Server Page using Red Hat Linux