Version Control - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Version Control

Description:

Version Control. Using the Subversion Version Control System in Development Projects ... Features not in Subversion. No file locking (may be in later release) ... – PowerPoint PPT presentation

Number of Views:64
Avg rating:3.0/5.0
Slides: 12
Provided by: cyndi8
Category:

less

Transcript and Presenter's Notes

Title: Version Control


1
Version Control
  • Using the Subversion Version Control System in
    Development Projects
  • William Nagel

2
Sample Disorganized Project
  • Hey, Jane, could you send me a copy of those
    changes you made last Tuesday?
  • Bob, this function doesnt work anymore. Did
    you change something?
  • Sorry, I cant seem to find those old classes.
    I guess youll just have to re-implement them.
  • OK, weve all been working hard for the last
    week. Now lets integrate everyones work
    together.

3
What is version control?
  • Basic functionality
  • keep track of changes made to files (allows
    roll-backs)
  • merge the contributions of multiple developers
  • Benefits
  • facilitates backups
  • increased productivity (vs manual version
    control)
  • encourages experimentation
  • helps to identify/fix conflicts
  • makes source readily available less duplicated
    effort

4
Additional benefits
  • Accountability
  • who wrote the code?
  • do we have the rights to it?
  • Support software engineering
  • hooks for peer reviews
  • Software branches
  • different versions of software need to be
    maintained, ensure bug fixes shared
  • Record Keeping
  • Commit logs may tie to issue tracking system or
    be used to enforce guidelines

5
More Benefits
  • Support Distribution of Work
  • Telecommuting, outsourcing, open-source projects
  • Use in conjunction with good communication
    habits via email etc.
  • Rapid Development (XP/Agile)
  • Supports frequent refactoring
  • Helps automate frequent system builds

6
Version Control Elements
  • Repository and Working Directory
  • Central repository. May be directory, database,
    distributed system. Developers do not work
    directly on files in repository.
  • Working directory. Accessible from development
    machine. Local modifications made here.
    Complete changes committed back to repository.

7
Version Control Elements
  • Revisions
  • Changes are stored in a revision. May be global
    or file-level.
  • File-level each change of each source file is
    tracked. Tends to get unwieldy.
  • Tags snapshot of repository at specific point.
  • Differences between two revisions called a
    changeset.

8
Version Control Elements
  • Logs
  • Need to know logical reasons for changes, not
    just what changes were made.
  • Info stored just in source code comments becomes
    too hard to find.

9
Version Control Elements
  • Tags
  • Can be placed at milestones
  • Branching
  • Parallel paths
  • Branches can be worked on independently

10
Version Control Elements
  • Locking vs Merging
  • Sometimes two developers need to modify one
    source at same time
  • Most modern VCSs support merging
  • File locking
  • developer locks, no one else can change, commit
    and unlock when done
  • enforces organized division of work, better if
    files cant easily be merged
  • may block development, real problem if forget to
    unlock!

11
Version Control Elements
  • Merging
  • Developers modify their own working copies
  • When commit, VCS checks for collisions
  • Will merge if possible
  • Will require committer to make changes by hand if
    cant resolve conflicts
  • Big advantage in systems where developers are
    likely to be working on parts of same file
  • Frequent collisions can be a problem, if
    communication between developers is poor
  • Either way
  • Best practice is to update working copy with
    changes from repository, test your changes before
    you try to commit!
Write a Comment
User Comments (0)
About PowerShow.com