Software Engineering Methodologies

SCM

Michael L. Collard, Ph.D.

Department of Computer Science, The University of Akron

Process Characteristics

  • Consistency
  • Repeatability
  • Easy access to correct artifacts
  • Easy sharing of correct artifacts
  • Necessary controls as part of the process

Process Issues

  • Multiple streams of development
  • Need to control and quantify additions to code
  • Need to control and quantify changes to code
  • How to control the process?

SCM

  • Software Configuration Management
  • Tracking and controlling changes to files used in software development
  • Used for build management
  • Also used for accounting and auditing of processes and products

SCM Distribution

  • Primary purpose is build management
  • E.g., product family
  • Accounting and auditing of releases

diff and patch

  • Distribute changes efficiently
  • Simplistic form of handling versions
  • diff utility creates patch file
  • patch utility applies the patch file to create a new version

Revision Control (Version Control)

  • Essential to the coordination of files among multiple developers
  • Maintains a history of changes
  • Management of branches and product families
  • Defines workflow
  • Most important tool (besides editor and compiler) for software development
  • Developers spend more time/energy/effort in version control than on any other aspect of the system

Managing Process

  • Process management for all modern software development is based on version control

Common Features

  • Versioning down to file level
  • Text or binary files
  • Text Files: Only lexical knowledge (file of characters)
  • Binary Files: Stays at the file level
  • No syntactic knowledge

Management Model: File Locking

  • Only one developer at a time has access to a file/resource
  • Lock-Modify-Unlock
  • One developer has the "token"; other developers have to wait
  • Library model
  • Advantages:
    • No merging problems
  • Disadvantages:
    • Prevents other developers from working
    • Prevents branching
    • Impractical in distributed development

Management Model: Version Merging

  • No restrictions on access
  • Developers can work simultaneously
  • Copy-Modify-Merge
  • Advantages:
    • No restrictions on working
  • Disadvantages:
    • Merging issues

Centralized Version Control

  • e.g., Subversion, ClearCase, Vault
  • One central repository with local working copies
  • Access controlled by the server
  • One sequence of version numbers
  • Traditional approach

Distributed Version Control

  • e.g. git, Bazaar, Darcs, Mercurial, Monotone, SVK
  • Peer-to-peer, no central repository, with a local repository
  • No one sequence of version "numbers"
  • Access controlled by the server when merged

Common Subversion Issues

  • Need access to the server to create a shared repository
  • No distinction between private and public changes
  • Merging is difficult
  • Branching has limitations and problems

git

  • Commits are identified by SHA1 IDs (160-bit numbers in hexadecimal)
  • URL only identifies the location of the repository. Always have branches and tags
  • The default branch is the "main" or "master"
  • Each commit has an author and a committer

SVN/git Command Comparison

SVN git
svn checkout url git clone url
svn update git pull
svnadmin create repo; svn import file://repo git init; git add .; git commit
svn status git status
svn revert path git checkout path
svn add file; svn rm file; svn mv file git add file; git rm file; git mv file
svn commit git commit -a

git File structure

  • Repository on a remote server
  • Repository in .git directory
  • working copy as repository
  • working copy as what is checked out

git Benefits

  • Records code, not changes
  • Local and remote repository
  • Tracks merged data
  • Staging changes into several patches