200 likes | 308 Views
Revision Control Software Engineering SS 2007. Agenda. Revision Control 1. Motivation 2. Overview 3. Tools 4. First Steps 5. Links Objectives - Use revision control system for collaboration. Revision Control. 1. Motivation 2. Overview 3. Tools 4. First Steps 5. Links. Motivation.
E N D
Software Engineering, lecture #: Topic 2 Agenda Revision Control 1. Motivation 2. Overview 3. Tools 4. First Steps 5. Links Objectives - Use revision control system for collaboration
Software Engineering, lecture #: Topic 3 Revision Control 1. Motivation 2. Overview 3. Tools 4. First Steps 5. Links
Software Engineering, lecture #: Topic 4 Motivation Usually several developers work on code Common problems: Who owns master version How to collect current version How to keep code changes consistent How to roll back bad code changes Which file versions form Release Candidate 3
Software Engineering, lecture #: Topic 5 Revision Control Main purpose Coordinate work from different contributors Other benefits Track changes Access older versions Name specific set of versions Split work into different versions
Software Engineering, lecture #: Topic 6 Revision Control 1. Motivation 2. Overview 3. Tools 4. First Steps 5. Links
Software Engineering, lecture #: Topic 7 Different flavours • File locking Only one user can modify a file at any time No conflicts, but dead-locks between contributors Example: ClearCase • Version merging All users can modify all files simultaneously Conflicts need to be resolved (merging) Examples: CVS, subversion
Software Engineering, lecture #: Topic 8 File locations Repository Directory or data base on server Contains all file versions and information on versions Never manipulated manually Working copy Copy of (part of) repository on local disk Used to change and add files
Software Engineering, lecture #: Topic 9 Important operations Check-Out Copy all files from repository to local disk Commit (Check-In) Copy changes in working copy to repository Update Copy changes in repository to working copy Merge Resolve conflicts between working copy and repository Tag Name a revision (set of files with versions)
Software Engineering, lecture #: Topic 10 Branch & Merge • Branch Split off new version Used for maintenance releases (bugfix) HEAD: main version • Merge Add changes from one branch to another Tag branches after merging!
Software Engineering, lecture #: Topic 11 Revision Control 1. Motivation 2. Overview 3. Tools 4. First Steps 5. Links
Software Engineering, lecture #: Topic 12 CVS: Concurrent Versions System Repository in file system Requirements CVS client installed Write access on server (via shell or NFS) Front-ends CrossVC: Windows, Linux, Mac TortoiseCVS: plug-in for Windows explorer Eclipse: IDE with built-in CVS
Software Engineering, lecture #: Topic 13 Subversion Repository in data base “Next version” of CVS Requirements subversion client installed subversion server (standalone or Apache module) Front-ends CrossVC: Windows, Linux, Mac TortoiseSVN: plug-in for Windows explorer Subclipse: plug-in for Eclipse
Software Engineering, lecture #: Topic 14 Revision Control 1. Motivation 2. Overview 3. Tools 4. First Steps 5. Links
Software Engineering, lecture #: Topic 15 CVS/SVN: First Steps Create directory on server for repository CVS: cvs -d /home/me/cvs init SVN: open https://svn.vis.ethz.ch/, follow instructions Create local directory with initial files Move initial files to repository “Make new module” (TortoiseCVS) “Import” (CrossVC, TortoiseSVN) CVS/SVN demo with Tortoise and/or CrossVC
Software Engineering, lecture #: Topic 16 Good Practice Keep code in repository consistent! When feature implemented / bug fixed: Update Compile Run automated module tests Fix bugs Iterate until no bugs found Commit
Software Engineering, lecture #: Topic 17 Combining Tools • Use build tool to compile run automated tests • Always provide Bug Report ID in commit comment register requirements as issues/bugs
Software Engineering, lecture #: Topic 18 Revision Control 1. Motivation 2. Overview 3. Tools 4. First Steps 5. Links
Software Engineering, lecture #: Topic 19 Links CrossVC http://www.crossvc.com/ TortoiseCVS, TortoiseSVN http://www.tortoisecvs.org/ http://tortoisesvn.net/ Eclipse http://www.eclipse.org/ http://subclipse.tigris.org/
Software Engineering, lecture #: Topic 20 Repositories • CVS directory on nethz account accessible via samba (:local:) or secure shell (:ext:) • Subversion Subversion server provided by VIS https://svn.vis.ethz.ch