Introduction to Version Control - PowerPoint PPT Presentation

1 / 22
About This Presentation
Title:

Introduction to Version Control

Description:

MS Word documents. Image documents. EA design documents. SE-2030. Dr. Mark L. Hornick ... Linux ... Linux (KDE) - http://kdesvn.alwins-world.de ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 23
Provided by: drmarkh
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Version Control


1
Introduction to Version Control
Based on material at http//svnbook.red-bean.com/
2
The stages of developing a software application
  • Requirements Analysis
  • High-level Design
  • Plan
  • Low-level Design
  • Implementation
  • Unit Test
  • Integration
  • System Test
  • Deploy
  • Maintain

3
In many cases, multiple projects run concurrently
  • New features are typically being added to the
    next version
  • While at the same time, defects need to be
    corrected in existing releases

4
On a single project, a team of software engineers
work together toward a release
  • All team members work on the same code and
    develop their respective parts
  • An engineer may be responsible for an entire
    class
  • Or just a few methods within a particular class

5
Files have to be shared among developers on a
team project
  • Shared files can be kept in some type of
    Repository where they can be accessed and worked
    on by multiple individuals

Harry and Sally get their own respective Working
Copies of the Master File in the Repository
Image http//svnbook.red-bean.com/
6
This can lead to big problems
Adds some method
Modifies some other method
Image http//svnbook.red-bean.com/
7
The problem to avoid
Harrys changes are still held locally
Image http//svnbook.red-bean.com/
8
Harrys changes are lost


Image http//svnbook.red-bean.com/
9
The Lock-Modify-Unlock solution
Microsoft Visual SourceSafe follows this model
Sally must wait until Harry releases the lock
Image http//svnbook.red-bean.com/
10
Lock-Modify-Unlock only allows a single user to
edit the file at a time
Image http//svnbook.red-bean.com/
11
Lock-Modify-Unlock has its own drawbacks
  • Harry has to remember to release his lock before
    Sally (or anyone else) can acquire the lock in
    order to edit
  • Sally has to wait for Harry to finish before
    editing
  • Harry might be adding some new methods
  • Sally just wants to add a few comments to an
    existing method

12
The Copy-Modify-Merge Solution
Image http//svnbook.red-bean.com/
13
The Repository recognizes conflicts
Harry is prevented from writing
Image http//svnbook.red-bean.com/
14
The Repository allows versions of the file to be
compared for differences
Image http//svnbook.red-bean.com/
15
The Repository keeps both users synchronized
Image http//svnbook.red-bean.com/
16
Copy-Modify-Merge is actually very easy to use
and manage
  • Users can work in parallel
  • Most of the time, concurrent changes dont
    overlap
  • People generally dont edit exactly the same code
    simultaneously
  • Amount of time spent resolving conflicts is
    nearly always less than the time that would be
    spent waiting for a lock to be released

17
Is Lock-Modify-Unlock ever needed?
  • When two or more people need to work on the same
    file, the simultaneous changes may not be
    mergable in all cases
  • MS Word documents
  • Image documents
  • EA design documents

18
The Repository can also manage and track
differences between parallel revisions of a
document
  • Typically, a software product will undergo
    revisions (2.0, 2.1, 3.0) while the original
    version continues to be maintained

Image http//svnbook.red-bean.com/
19
Subversion is an open-source version control
system that is available for many platforms
  • Windows
  • Mac
  • Linux
  • Many current open-source projects (like Eclipse)
    use Subversion to maintain source code control
  • http//subversion.tigris.org/

20
Subversion in SE2030
  • The Subversion Repository for SE2030 is installed
    on emerald.msoe.edu a Linux server accessible
    via the MSOE network
  • In order to access the Repository, you need a
    Subversion Client that can read and write files
    to and from the Repository on the server

21
The TortoiseSVN Subversion Client
  • TortoiseSVN is a SourceForge open-source client
    application for the Windows platform
  • There are similar client applications for Mac
    and Linux
  • Mac - http//scplugin.tigris.org/
  • Linux (KDE) - http//kdesvn.alwins-world.de/
  • Wikipedia comparison of various clients is at
    http//en.wikipedia.org/wiki/Comparison_of_Subvers
    ion_clients

For more info, see http//tortoisesvn.net/
22
Homework
  • Install TortoiseSVN on your PC needed for lab
    this week
  • http//emerald.msoe.edu/resources/doku.php?idcour
    sesse-2030installing_tortoisesvn
  • Read more about Version Control
  • http//emerald.msoe.edu/resources/doku.php?idcour
    sesse-2030version_control

Links are also on course web page
Write a Comment
User Comments (0)
About PowerShow.com