Appendix D. Revision Control

Revision control systems are a way to not only travel back in time, but to see what has changed at various points in your timeline. They are also called versioning or version control systems, which is actually a more technically accurate name. Such a system allows you to maintain a central repository of files in a project, and to keep track of changes to those files, as well as the reason for those changes. Some revision control systems allow more than one developer to work concurrently on the same project, or even the same file.

Revision control systems are essential to modern software development efforts, but they are also useful in many other areas, such as writing documentation, tracking system configurations (e.g., /etc), and even writing books. We kept this book under revision control using Subversion while writing it.

Some of the useful features of revision control systems include:

  • Making it very difficult to lose code, especially when the repository is properly backed up.

  • Facilitating change control practices, and encourage documenting why a change is being made.

  • Allowing people in multiple locations to work together on a project, and to keep up with others’ changes, without losing data by saving on top of each other.

  • Allowing one person to work from multiple locations over time without losing work or stepping on changes made at other locations.

  • Allowing you to back out changes easily or to see exactly what has changed between one revision and another (except binary files). If you follow effective logging practices, they will even tell you why a change was made.

  • Allowing, usually, a form of keyword expansion that lets you embed revision metadata in nonbinary files.

There are many different free and commercial revision control systems, and we would like to strongly encourage you to use one. If you already have one, use it. If you don’t, we’ll briefly cover three of the most common systems (CVS, Subversion, and RCS), all of which either come with or are available for every major modern operating system.

Before using a revision control system, you must first decide:

  • Which system or product to use

  • The location of the central repository, if applicable

  • The structure of the projects or directories in the repository

  • The update, commit, tag, and branch polices

This only scratches the surface; see O’Reilly’s Essential CVS by Jennifer Vesperman and Version Control with Subversion by Ben Collins-Sussman et al. for more in-depth introductions to revision control and complete details on their respective systems. Both have excellent treatments of the general concepts, although the Subversion book covers repository structure in more detail due to its more fluid nature.

Both also cover revision control policy. If your company has change control or related policies, use them. If not, we recommend you commit and update early and often. If you are working as a team, we strongly recommend reading one or both of the books and carefully planning out a strategy. It will save vast amounts of time in the long run.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.245.196