Brief Introduction to Revision Control - PowerPoint PPT Presentation

About This Presentation
Title:

Brief Introduction to Revision Control

Description:

Bob's Version in His Sandbox. System consisting of files x, y and z is being developed. ... Local (Working) Copies in Sandbox. Check Out (Lock) Check In (Commit) ... – PowerPoint PPT presentation

Number of Views:49
Avg rating:3.0/5.0
Slides: 14
Provided by: plgUwa
Category:

less

Transcript and Presenter's Notes

Title: Brief Introduction to Revision Control


1
Brief Introduction to Revision Control
  • Ric Holt

2
Revision Control, also known asVersion Control
orSCM Source Control Management
Management of changes to documents, programs, and
other information stored as computer files. Each
changed file (or set of files) is called a
version or a revision. These are often numbered,
e.g., version 12.6.2. A release is made
available to users.
http//en.wikipedia.org/wiki/Revision_control
3
Software for SCM
  • (Related CMS Content Management System)
  • SCCS Source Code Control System
  • Obsolete as of 1995
  • Predecessor to RCS
  • RCS Revision Control System
  • By Walter Tichy, 1980s
  • Keeps track of evolving versions revision
    control
  • Single user
  • CVS Concurrent Versions System
  • By Dick Grune, 1980s
  • Based on RCS, but multi-user
  • Subversion free better CVS
  • GIT
  • By Linus Torvalds, 2005
  • Distributed revision control no central version
  • All branches are complete

4
Storing Successive Versions of a File
  • Each change to a file is stored as the diff
    from its previous version
  • Saves space, avoids full copy of each version
  • Less important now that file space is check

5
Delta Difference Between Files
  • Forward delta How to change file F to its next
    version (store file F, compute next versions)
  • Backward delta How to change file G to its
    previous (store file G, compute previous versions)

Forward Delta
File F
File G
Backward Delta
6
Kinds of Changes Add, Delete Replace
  • 1. using System
  • 2. using System.Collections.Generic
  • 3. using System.Text
  • 4.
  • 5. class Program
  • 6.
  • 7. static void Main(string args)
  • 8.
  • 9. Console.WriteLine(
  • 10. "Hello World")
  • 11. // comment
  • 12.
  • 13.
  • 1. using System
  • 2. using System.Collections.Generic
  • 3. using System.Text
  • 4. class Program
  • 5.
  • 6. static void Main(string args)
  • 7.
  • 8. Console.WriteLine(
  • 9. "Hello Version Control")
  • 10. // comment
  • 11. Console.ReadLine()
  • 12.
  • 13.

delete
replace
add
Example from http//www.itu.dk/courses/VOP/E2006/6
_Slides.pdf
7
Diff Unix tool, gives difference between two
files.
  • diff v1.txt v2.txt
  • 4d3
  • lt
  • 10c9
  • lt "Hello World")
  • ---
  • gt "Hello Version Control")
  • 11a11
  • gt Console.ReadLine()

Delete (d) line 4
Change (c) line 10
Add (a) line 11
8
Master Version Working (Sandbox) Versions
System consisting of files x, y and z is being
developed.
x
z
y
Master Version in Repository
x
x
z
z
y
y
Annes Version in Her Sandbox
Bobs Version in His Sandbox
Anne and Bob simultaneously change various files,
ideally different files.
9
Check In, Check Out, etc.
x
z
y
Check Out (Lock)
Master Copies in Repository
Check In (Commit)
x
z
y
Local (Working) Copies in Sandbox
10
CVS Operations
  • Check out - Lock set of files (get copies)
  • Commit (check in) - Use your checked out copies
    to update the repository
  • Update - Using central repository, get fresh
    copies
  • Add - Signal that a local file is to be added to
    repository (upon commit)

11
Branches Merges
  • A branch is a new stream of development, e.g.,
    Version 8.0 of a data base (new version of V7.0)
  • As bugs are found in V7.0, these need to be
    merged into V8.0 (and vice versa)
  • Merges can be very tricky and slow to carry out

12
Conflicts
  • Ideally, no two people try to update the same
    file at the same time.
  • If they do, and they changed different parts of
    the file, the changes are
  • MERGED
  • If they do, and they have changed the same parts
    of a file, there is a
  • CONFLICT
  • Generally conflicts are fixed manually.

13
GIT A Fast Version Control System
  • Invented by Linus Torvalds
  • GIT
  • Is distributed --- no master copy
  • Is controversial
  • Safeguards against corruption
  • Has fast merges
  • Scales up
  • Convenient tools still being built
Write a Comment
User Comments (0)
About PowerShow.com