Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of Computer Science Technische Universität Darmstadt
Dr. Michael Eichberg Fachgebiet Software Engineering Department of Computer Science Technische Universität Darmstadt Introduction to Software Engineering Computer Aided Software Engineering
Dr. Michael Eichberg Fachgebiet Software Engineering Department of Computer Science Technische Universität Darmstadt Introduction to Software Engineering Revision-control Systems
Making Sense of 4 Recommended Reading Source: Author: ACM Queue Bryan D Sullivan
All types of revision-control systems support a basic set of tasks. 5 Track the history of files This enables you to answer questions such as: Who did which changes? When was a change made? Why was a change made? Recreate project state...
All types of revision-control systems support a basic set of tasks. 6... People can work on independent sub-projects (usually referred to as branches) Branches are typically used to manage the maintenance of releases that are no longer actively developed RCS enables you to integrate changes made in a subproject back into the main project
Branches & Merging 7 BAT3XML
Typical issues related to branching and merging 8 The same section is modified in different ways Code in a branch depends on functionality that has changed in the other branch (Most likely, the project will break when merged.) Files are copied and / or renamed and someone wants to check in some changes w.r.t. the old file How branches and merges are handled differs significantly between different types of revision-control systems.
We can distinguish between two basic types of revision-control systems: centralized and distributed. 9 Centralized CVS Subversion (SVN) Perforce Distributed Git Mercurial
Both types of revision-control systems have different trade-offs. Centralized Distributed 10 Client-server model; a single server hosts a project s metadata commits are server based no explicit support for branches; branches are handled by convention better suited for binary data enable fine-grained rights management Operate in a peer-to-peer manner each copy (repository) contains all of a project s history and metadata a working copy contains a snapshot of the project s files commits are local until they are shared fetching remote changes and merging them with the local copy is decoupled
Git s / Mercurial s bisect command facilitates finding bugs. 11 does not contain the specific bug 1. checkout by bisect Question: Does this version contain the bug? No, use revision (L+X)/2 2. checkout by bisect Question: Does this version contain the bug? Yes, revision that introduced the bug is found contains a specific bug Revision A L X Time