160 likes | 236 Vues
Subversion, an Open Source Version Control System. An Introduction.
E N D
Subversion, an Open Source Version Control System An Introduction
“We are always amazed when we read statistics about the number of software developers who do not use version control software in their work. When we think about the number of times that we’ve personally lost work because we carelessly deleted the wrong file or introduced a bug into the previously working code, and the number of times we’ve been saved from such a fate by version control, we truly can’t understand how someone would choose not to use the tools that are designed to prevent just such catastrophes.” Daniel Berlin and Garrett Rooney. Practical Subversion, Second Edition (Expert's Voice in Open Source). New York: Apress, 2006.
What is version control? • Maintains a history of all changes made to a projects software code and documentation. • When changed, who changed, and if done right, why? • Prevents overwriting of changes made to files. • Completed edits are immediately available to all team members.
Key Decision Points • Open source • Free and can be customized if necessary • More mature and feature rich than most commercial products • Widely used and supported • Integrated into many development tools • Flexible in its implementation • Works on Linux, Windows, Mac, and Solaris • It works for the needs of USIIS!
History of Subversion • CollabNet Inc. were reaching the limits of CVS capabilities and decided to create a replacement open source version control system. • In 2000, CollabNet Inc. asked Karl Fogel, the author of a well known book on CVS, and Jim Blandy, an Engineer at Red Hat Inc., to begin work. • Subversion was built from the ground up to keep what worked well in CVS and redo what did not. • Released version 1.0 February 23, 2004. • Still actively being developed, its current version is 1.6.
Improvements Over CVS • Can rename a file and delete directories • File metadata are versioned • Changes to the repository are atomic • More efficient repository design and network utilization • Binary files are well supported • Provides multiple options for sharing a repository over a network • Direct network drive access • Access over http/https using apache modules
The Subversion Repository • Subversion has the choice of two back ends that the repository can reside in. • Filesystem based (default) • Berkley DB Relational Database
Change Conflict Management • Locking • When a file is being edited, lock it so nobody else can make changes to it. • Non-Locking • When a file is being edited, allow others to make changes simultaneously, but manage those changes when merged back into the repository. • Subversion is non-locking • With optional locking
Repository Structure • No directory structure configuration restrictions • Industry standard • Trunk, Branches, Tags
branches project1 project2 tags project1 project2 trunk project1 project2 (works well when the projects are closely related) project1 branches tags trunk project2 branches tags trunk (works well when the projects are not closely related) Repository Structure Examples
Application Programming Interface (API’s) • Subversion provides a command line interface • From the beginning designed to make it easy for other tools to integrate • Many tools have already added Subversion integration • IDE’s • Netbeans, Eclipse, Jdeveloper, Visual Studio • Project Management Tools • Trac • Many new tools have been built to provide a GUI front end for Subversion • TortoiseSVN
Subversion Administration • Version numbers refer to the entire repository and all of the files it contains • Designed to have many users and one administrator • Non administration commands will not cause any information to be lost • Repository backups should be done • Whole repositories can be moved
Where to start? • Subversion • http://subversion.tigris.org/ • Subversion Online Book • http://www.open.collab.net/community/subversion/svnbook/ • Subversion Quick Reference Card • http://www.collab.net/community/subversion/articles/SvnQuickReferenceCard.html • Subversion Blog • http://blogs.open.collab.net/svn/ • TourtoiseSVN • http://tortoisesvn.tigris.org/