150 likes | 458 Views
Revision Control Systems. Carmen Serrano 4/8/08. Outline. What is Revision Control? Simple Examples Benefits Definitions Best Practices Version Control Systems Clients. What is Revision Control?.
E N D
Revision Control Systems Carmen Serrano 4/8/08
Outline • What is Revision Control? • Simple Examples • Benefits • Definitions • Best Practices • Version Control Systems • Clients
What is Revision Control? • “A combination of technologies and practices for tracking and controlling changes to a project’s files, in particular to source code, documentation, and web pages.” (Fogel)
Simple Examples • Manual versioning • MyAwesomeGame1.java, MyAwesomeGame2.java, MyAwesomeGame3.java… • Wikipedia • Multiple contributors per article • Edits to article become new version • Retain previous versions of article
Benefits • Productivity • Interdeveloper communications • Release management • Bug management • Code stability • Attribution and authorization of changes • Experimental development
Definitions • Repository – stores files under version control and information on changes. May be centralized or decentralized. • Checkout – obtaining a local copy from the repository. • Commit/check-in – a change to a local file is stored in the repository • Working copy – local copy of project (user’s private copy) • Update – incorporates changes in the repository into your working copy • Revision – a particular version of a file or set of files; also changeset, a set of changes committed as one
Definitions • Tag – label for a set of files; snapshot of project • Branch – a copy of the project undergoing separate development from the main branch or “trunk” • Merge – combining two changes in a file into a new revision; also combining branches • Conflict – when a change to the same part of a file is made by two users; must be resolved manually • Lock – prevents other users from changing a file • Two models: lock-modify-unlock, copy-modify-merge
Setting Up • Install on server (repository location) • Install on user machines • Optionally install GUI client • Set up repository and access
Best Practices • Version all editable information • Source code, documentation, textures • Don’t include generated files • Ex: executables • Some exceptions: • Exported textures and models • Executable of release • Dependent on project and developer/manager preferences
Daily Best Practices • Update before starting • Commit before leaving • Include informative comments in commit log messages (!) • Inform other programmers of commits (when appropriate)
Version Controls Systems • CVS (Concurrent Versioning System) • Created by Dick Grune in 1986 • Incredibly popular, especially in open-source world • Subversion • Started in 2000; released 1.0 in 2004 • Created to fix shortcomings in CVS (and replace it) • Visual SourceSafe & Team Foundation Server • By Microsoft • Integrates with Visual Studio
CVS vs. Subversion • CVS • Commonly used, well known • Subversion • Similar interface to CVS • Atomic commits • Repository flexibility • Reduced costs of branching and tagging • More efficient commits
GUI Clients • WinCVS • Very popular • TortoiseCVS • Windows shell integration • TortoiseSVN • Based on TortoiseCVS • Examples
References • Fogel, Karl. Producing Open Source Software: How to run a successful free software project • Nagel, William. Subversion Version Control. • Subversion Project Home. http://subversion.tigris.org/ • David, Jean-Luc, Gousset, Mickey, Gunvaldson, Erik. Professional Team Foundation Server.
Homework Questions • 1. What is a commit? • 2. What is one benefit of using a revision control system?