160 likes | 280 Vues
Software revision control is essential for managing changes to documents, programs, and files. This overview covers key concepts and terminology including centralised and decentralised management approaches, as well as tools like CVS, SVN (Subversion), and Git. We explore operations like commit, merge, and checkout, highlighting the differences between each version control system. Whether you're handling baselines or resolving conflicts, understanding these systems enhances collaboration and efficient change management in software development.
E N D
Software Revision Control CSE301 Harry Erwin, PhD
Sources • Mostly Wikipedia and various web articles
Revision Control • Software Configuration Management • Management of changes to documents, programmes, and files. • The following are available on my Mac OS X web server: • CVS • SYN (Subversion) • Git
Approaches • Centralised management • Decentralised management
Terminology • Baseline—an approved revision • Branch or fork—splits a set of files under version control • Change, diff, or delta—a specific modification • Checkout—creates a local working copy • Commit or checkin—writing a set of changes back into a repository • Conflict—two incompatible changes • Export—checkout without the version-control metadata • Import—copying files into the repository for the first time • Merge—bringing two sets of changes into compatibility • Repository—the home of the files • Revision—also known as version of the repository • Working copy—local copy of files from the repository
Centralised Source Management • Two Alternative Approaches • Atomic operations—use a gray code approach to ensure the repository is left in a consistent state • File locking—locks files at checkout so only one user may make changes • Version merging—delicate, requires some means of identifying inconsistencies • Baselines, labels, and tags—used to describe a version of the files in the repository.
Distributed Source Management • Peer-to-peer approach. • Each developer has a bona-fide repository. • Changes coordinated by sharing patches. • Operations are fast, because there is no central server. • Each working copy is a remote backup.
CVS • Maintained but not developed. • Centralised • Atomic merge • Free
SVN • Apache Subversion • Actively developed • Centralised • Supports merge and lock • Free
Git • Actively developed • Distributed • Provides various 3-way merge strategies (two or more documents and one or more parent documents) • Free
CVS • Originally a collection of shell scripts (1986) • Client-server architecture • No atomic commit 8( • Only the latest version of a file can be changed. Developers have to manually update that version if it has changed since they started development on the file. • Maintaining the local copy is mostly automatic. User intervention for edit conflicts. • Final version May 2008.
Anonymous CVS • Users who want to have the latest version but are not actively developing, can checkout with a standard password. • Checkin requires a user ID and password.
SVN • Mostly compatible successor to CVS • Sponsored by CollabNet • Top-level Apache project on Feb 17, 2010 • Commits are atomic operations • More flexible than CVS • Access to repository: • file:///path • WebDAV/Delta-V (mod_dav_svn) • svn://host/path (port 3690) • svn+ssh://host/path
Git • Fast! • Distributed • Non-linear development • Initially by Linus Torvalds • Every Git working directory is a repository • Invented as an alternative to BitKeeper. • Inverts CVS (like UNIX inverts Multics) • Safeguards against corruption. • Uses 3-way merge in various forms.
Using Them • Go here: sshyouraccount@crowan-scat.sunderland.ac.uk • Use cvs, svn, or git by typing in the command. • Demo at this point…