Team Foundation Server 2010 - Version Control

27
Team Foundation Server 2010 Version Control Steve Lange Developer Technology Specialist – Microsoft [email protected] |

description

General overview of the version control capabilities of Team Foundation Server 2010.

Transcript of Team Foundation Server 2010 - Version Control

Page 1: Team Foundation Server 2010 - Version Control

Team Foundation Server 2010

Version Control

Steve LangeDeveloper Technology Specialist – [email protected] | blogs.msdn.com/slange

Page 2: Team Foundation Server 2010 - Version Control

Agenda• What is Team Foundation Server?• Focus: Version Control

– Architecture– Key Concepts

• Changesets– Integrated Check-in– Check-in Policies

• Workspaces• Shelving

– Other Version Control Concepts• Labeling• Compare/Diff

– Annotation

• Branching & Merging

• General Misconceptions• Integration with Other TFS Components• Q&A

Page 3: Team Foundation Server 2010 - Version Control

Visual Studio 2010

Page 4: Team Foundation Server 2010 - Version Control

What is Team Foundation Server?

• Team Foundation Server– A unified project server

Tester

Developer

Architect

ProjectManager

BusinessAnalyst

Designer Database Profession

al

Page 5: Team Foundation Server 2010 - Version Control

Team Foundation Server At a Glance

Process Focused

Process TemplatesSharePointCustomizable

Version Control

Integrated Check-inCheck-in PoliciesShelving

Work Item Tracking

Manage workBugs, Tasks, Requirements, Stories, Risks, etc.Very Extensible

Build Automation

Continuous IntegrationScheduledAd Hoc

Reporting

Decision SupportTrack Project Progress

Team

Fou

ndati

on S

erve

r

Page 6: Team Foundation Server 2010 - Version Control

Architecture

Data Tier

DataWarehouse

VersionControlWork Items Team Build

SQL Server

Windows SharePoint Services Web Services

Application Tier

SQL Reporting Services

Client Interface

VisualStudio

Team ExplorerMS Project

MS Excel

TFS SDK

Command Line

BuildEnvironment

BuildProcess

Version ControlProxy

VersionControlProxy

Service

Page 7: Team Foundation Server 2010 - Version Control

Team Foundation Server Deployment

Dev Team (Local)Dev Team (Remote)

Business User

TCP/IPHTTP / S

Win 2003 ServerSQL Server 2005IIS 6.0

Team Foundation Server

Build Server

Version Control Proxy (Remote)Active Directory

Page 8: Team Foundation Server 2010 - Version Control

TFS Version Control: Key Concepts

• Changesets– Integrated Check-in– Check-in Policies

• Workspaces• Shelving

Page 9: Team Foundation Server 2010 - Version Control

Changesets

• Logical container of data related to check-in– File and branch information– Links to work items– Check-in notes– Comment– Policy compliance– Metadata (date, time, user)– Unit of atomic checkin

• Uniquely identified– Numeric identifier– Incremental

• Represents a point in time of source repository

Page 10: Team Foundation Server 2010 - Version Control

Integrated Check-in

Atomic• A changeset is guaranteed to have all changes from a check-in

Integrated• Check-in policy applied (but override-able)• Work Items associated• Builds associated with Work Items• Check-in notes• All related to changeset• Pending Check-in Window• Notification possibilities

Check-in Policy• Customizable, extensible

Page 11: Team Foundation Server 2010 - Version Control

Check-in Policies

• Requirements for Check-in• Overridable• Extensible Comments

Testing

Work Item Association

Code Analysis

Forbidden Files

Page 12: Team Foundation Server 2010 - Version Control

Map Server to Local

Per User, Per Workstation

Changes in Workspace create

“Pending Changes”

Also Used for Builds

Workspaces

Page 13: Team Foundation Server 2010 - Version Control

Shelving

Scenarios• Set aside pending changes without checkin– Optionally revert to

unmodified files– Restore shelved changes by

“unshelving”– Unshelve other user’s changes

• Power of task branching with less overhead

Developer

Switch Tasks

Backup Work-In-Progress

Checkpoint Work-In-Progress

Share Work-In-Progress

Perform a Code Review

Page 14: Team Foundation Server 2010 - Version Control

Other Version Control Concepts

• Labeling• Compare/Diff– Annotation

• Branching & Merging

Page 15: Team Foundation Server 2010 - Version Control

Labeling

• “Bookmarks” version control artifacts• Many uses– Mark Builds, Releases– Group Items– Label-based Branch or Merge

Page 16: Team Foundation Server 2010 - Version Control

Compare/Diff/Merge

Compare/DiffFiles

(instance or different)

Trees (folder

structures)Branches

Custom Diff Tools

Per workstation Per file type

AnnotateIntra-file historical

comparison

Page 17: Team Foundation Server 2010 - Version Control

Branching & Merging

Branch• A branch relationship is created in TFS to avoid duplication

of history and metadata• Path-space branching• Intelligent copies

Merge• Sync a branch into another• Cherry Picking changesets (include or omit)• Ability to show changes that have not been merged

Page 18: Team Foundation Server 2010 - Version Control

Visual Branching

• Branches are “First Class” citizens• Visualize branch relationships• Track change across branches

– History– Timeline– Richer Annotate

• Conflict resolution

Page 19: Team Foundation Server 2010 - Version Control

Understanding Parallel Development

Page 20: Team Foundation Server 2010 - Version Control

Common Misconceptions

• Team Projects can contain multiple solutions/projects, or whatever..

Team Project = VS Project or Solution

• “If you can save it..”

TFS is for .NET only

• Lots of plug-ins, web interface, CLI, etc..

You need Visual Studio

Page 21: Team Foundation Server 2010 - Version Control

Integration with Other TFS Components

TFS Version Control

Page 22: Team Foundation Server 2010 - Version Control

Integration with other TFS Components

Build

• Create various build scenarios

• Build reports show associated changeset

Work Item Tracking

• Easily associate code to work items

• Provides traceability

Process Guidance & Automation

• Influences version control structure

Portal & Reporting

• Automatically impacts velocity, code churn

Version Control

Page 23: Team Foundation Server 2010 - Version Control

Sample Reports

Page 24: Team Foundation Server 2010 - Version Control

Thank You!

Questions?

Page 25: Team Foundation Server 2010 - Version Control
Page 26: Team Foundation Server 2010 - Version Control

Contact Info

Eric Strait • Developer Solutions

Specialist• [email protected]• Based in Phoenix

Steve Lange• Developer Technology

Specialist• [email protected]• Based in Denver

Page 27: Team Foundation Server 2010 - Version Control

Links & Resources

• TFS Best Practices Guide• SOX Compliance & Team System• Requirements Management Whitepaper– Steve’s Blog on RM and TFS

• Brian Harry’s Blog (Microsoft TFS Adoption)• Team System “Widgets” (comprehensive

integrations & utilities list)• Videos: “How Do I?” | VSTSRocks.com• Online Training Options