Version Control

From SwinBrain

Version control systems, also called revision control, are used to manage revisions of documents. In software development version control systems such as CVS and Subversion are used to manage source code. These allow developers to collaborate more effectively by managing the versions of the code, allowing new version to be added and allowing developers to return to previous versions.

Note: SwinBrain is a version controlled system! Specifically a wiki content management system. All changes to wiki content are recorded (and who did them, and when and why). Version control is very useful for the development of projects amoung a group of uses, like software code and software documentation.

Contents

Basic Concepts

Although the exact terminology can change for specific version control products, the following are general concepts that apply to most version control software.

  • Repository: where data is stored, often on a server
  • Check-out (or checkout): get a copy from the repository and store locally (to work on).
  • Commit (or checkin): local changes are sent back (merged) to the repository (server)
  • Change (or diff): the changes between document versions
  • Change list or (change set): the set of changes made in a single commit. Might be used as part of a "merge", "conflict/resolve" process.
  • Update (or sync): Bring the changes from the repository (server) and merge with local "working" copies. This typically needs to be doe before comitting local changes.
  • Branch (or fork): A set of files can be separated from the main group, to allow more isolated developmenet, usually with the intention to "merge" the branch back into the main group at a later stage.
  • Merge: Integrate changes. Might apply to changes with the same file, set of files, or between branches.
  • Import: Add files to the repository for the first time.
  • Export: A "clean" checkout from the repository (ignore local history).
  • Conflict: Two or more changes are made to the same files or the same part of a file. Changes can not be merged.
  • Resolve: The resolution of conflicts. Nice to have "smart" software work this out, but often required human intervention to "resolve" conflicts.

Early or primitive version control systems may use a "locking" concept where an entire file (or folder!) is "locked" while being edited by a single user. Locking works quite well for client software that expects exclusive access to a file or resource. However, this type of greedy system is notorious for problems when used with multiple users; if a client never "checks-in" the resources they have "checked-out", no other use can use them. Even so, a basic lock based version control system is still much better than no version control at all.

CVS

Concurrent Versions System provides an implementation of a version control system. CVS uses a client server architecture with clients connecting to the server to check-out and check-in code.

The following links are useful when getting started with CVS.

Also read the Swinburne CVS and SSH Setup guide. This guide shows you how to setup your client to access the CVS repositories on Swinburne's Mercury server.

SVN

Subversion is an open source project specifically designed to replace CVS. Although there are still open issues to be addressed, it is already seeing adption by projects such as the apache foundation, Python, Samba, PuTTY and Ruby on Rail.

See

Bazaar

Bazaar is an open source version control system written in python. Its most significant user group is the Ubuntu linux community. Bazaar differs from CVS and SVN by being a distributed version control system - this means that a central server is optional and individual users can branch and merge as they choose.

Historically bazaar is a successor to GNU Arch, and to the original bazaar (baz), which was written in C.

See

Other Version Control Products

Other products include Visual Source Safe.

[edit]Links: Topic Brains
Return to Swin Brain