Serious Team Foundation Server Source Control Benjamin Day Benjamin Day Consulting, Inc.

Slides:



Advertisements
Similar presentations
SharePoint Forms All you ever wanted to know about forms but were afraid to ask.
Advertisements

1. What is Subversion? Why do we need CM? Basic concepts Repositories Options Setup Clients Options Setup Operation Troubleshooting Slide 2.
Version Control System (Sub)Version Control (SVN).
David Notkin Autumn 2009 CSE303 Lecture 22 Subversion is an open source version control system. Social Implications Friday version control system.
Sy config. SY Non-Student machines –SYTS Team system –SY01 Sql Server Student machines –SY02 –SY03 –SY04 –SY05 –SY06 –SY07 –SY08.
Omaha Team System User Group Welcome!. TFS Command Line Tools & TFS Power Tools.
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
Microsoft Visual Source Safe 6.01 Microsoft Visual Source Safe (MVSS) Presented By: Rachel Espinoza.
1 Copyright © 2014 Tata Consultancy Services Limited Source Code Management using Rational Team Concert IBM Rational, Alliance & Technology Unit 2 July.
Damien Guard (BSc, MBCS) Guernsey Software Developer Forum Change management with Subversion.
Source Code Management Or Configuration Management: How I learned to Stop Worrying and Hate My Co-workers Less.
Source Control Repositories for Enabling Team Working Svetlin Nakov Telerik Corporation
T EAM F OUNDATION S ERVER IN D EVELOPMENT Kambiz Saremi.
Microsoft Developer’s Guide to Team Foundation Version Control
Team Foundation Server the answer to all project management problems? Richard Fennell Director.
Serious Team Foundation Server Customization Benjamin Day Benjamin Day Consulting, Inc Level: Advanced.
Visual Studio 2005 Team System: Enterprise Class Source Control & Work Item Tracking Ajay Sudan Microsoft Corporation
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
Win & Web App Installers with WiX
Doing Something Useful with Enterprise Library 3.0 Benjamin Day Level: Intermediate.
@benday #vslive Automated Build, Test & Deploy with TFS, ASP.NET, and SQL Server Benjamin
De-mystifying TFS Reporting Benjamin Day Level: Intermediate.
Developing Workflows with SharePoint Designer David Coe Application Development Consultant Microsoft Corporation.
Windows Azure Tour Benjamin Day Benjamin Day Consulting, Inc.
Version Control with Subversion Quick Reference of Subversion.
With Mercurial and Progress.   Introduction  What is version control ?  Why use version control ?  Centralised vs. Distributed  Why Mercurial ?
1 Lecture 19 Configuration Management Software Engineering.
Git – versioning and managing your software L. Grewe.
Version control Using Git Version control, using Git1.
…using Git/Tortoise Git
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
Copyright © 2015 – Curt Hill Version Control Systems Why use? What systems? What functions?
SENG 403 Tutorial 1 1SENG 403 – Winter Agenda Version Control Basics Subversion Basic actions in Subversion Some examples 2SENG 403 – Winter 2012.
Computer Science and Engineering The Ohio State University  Widely used, especially in the opensource community, to track all changes to a project and.
05 | Administer Version Control Steven Borg | Co-founder & Strategist, Northwest Cadence Anthony Borton | ALM Consultant, Enhance ALM.
Customizing and extending TFS Michael Juřek Software Architect Microsoft s.r.o.
Top Ten Tips for Team Foundation Server Martin Woodward Teamprise.
Visual SourceSafe Seamless Integration. 2 Agenda  Version Control  Architecture  Features  Integration  Configuration & Maintenance  Questions.
Refactoring and Synchronization with the StarTeam Plug-in for Eclipse  Jim Wogulis  Principal Architect, Borland Software Corporation.
Source Code Management Per Ahlberg Developer Evangelist Developer & Platform Evangelism Microsoft Sweden.
Intro to Datazen.
1 MSTE Visual SourceSafe For more information, see:
2136 Gallows Road, Suite F, Dunn Loring, VA Phone: Fax: Business Analyst Training 1 Module 5.2 Rational ClearCase.
WinCVS Training è Basic Concepts è Download & Setup è Importing a new module into CVS Repository è Getting new module from CVS è Getting Latest version.
Step-by-Step Migration and Adoption Mark Michaelis Architect, Author, and Trainer Eric Lee Microsoft Product Manager Visual Studio 2005 Team Foundation.
To Git or Not to Git for Enterprise Development Benjamin Edward Thomson
Visual Source Safe –A Quick Tour. CONTENTS What is VSS ? How to install VSS ? How does VSS track versions? VSS Concepts & Features Utilities available.
1 CSE 303 Lecture 19 Version control and Subversion ( svn ) slides created by Marty Stepp
TEAM FOUNDATION VERSION CONTROL AN OVERVIEW AND WALKTHROUGH By: Michael Mallar.
Connect with life Tejasvi Kumar Developer Technology Specialist | Microsoft India
Eliminate Team Build Headaches with Unit Tests, WiX and Virtualization Benjamin Day
YOUR LOGO Phase 2 International Providing critical business software solutions at affordable prices.
Managing Database objects in Visual Studio and Team Foundation Server Presented by Sean P SQL Saturday - Phoenix 2016.
Benjamin Day Get Good at DevOps: Feature Flag Deployments with ASP.NET, WebAPI, & JavaScript.
Win & Web App Installers with WiX Benjamin Day Level: Intermediate.
TFS Training TFS Training. Introduction to Team Foundation Server Team Foundation Server Team Foundation Server is a Microsoft product which provides.
Source Control Repositories for Enabling Team Working Doncho Minkov Telerik Corporation
NALINI S. NAUTIYAL SYSTEM SOFTWARE DIVISION Subversion.
1 Ivan Marsic Rutgers University LECTURE 2: Software Configuration Management.
DevOps with ASP.NET Core and Entity Framework Core
How to be a SharePoint Developer
Stress Free Deployments with Octopus Deploy
Version Control with Subversion
LECTURE 2: Software Configuration Management
Version control, using Git
Introduction to Team Foundation Server 2010
Version Control System
Source Code Management
LECTURE 3: Software Configuration Management
DAT381 Team Development with SQL Server 2005
Presentation transcript:

Serious Team Foundation Server Source Control Benjamin Day Benjamin Day Consulting, Inc

About the speaker Owner, Benjamin Day Consulting, Inc. – –Web: –Blog: Trainer –Visual Studio Team System, Team Foundation Server Microsoft MVP for C# Microsoft VSTS/TFS Customer Advisory Council Leader of Beantown.NET INETA User Group

Agenda Source Control configuration options Branching / Merging Source Control via command line Custom Check-in Policies

What is Team Foundation Server? “Glue” that connects your team –What am I supposed to do? –What’s my progress? –What’s broken? Helps manage project artifacts –Source Control

Why is it good? Helps your team communicate Centralized place to manage your project Data is captured automatically Everyone looks at the same data Customizable Real version/source control

TFS Source Control Real, enterprise-quality source control Uses SQL Server 2005 as the repository Transactional, atomic 6

Why use source control? Minimize / eliminate lost work Reproducible builds & product state 7

TFS Source Control: Features Workspaces –Area on local disk where you edit files Check in / check out –Check out marks the beginning of your edits –Check in commits your changes to the repository –TFS allows shared check out Changesets –Group of changes that happen when you check in Shelving –Similar to check in –Changes get stored on the server –Not visible as part of the main project source tree Branching –Used to manage multiple versions of a product 8

Modifications & Check in’s All these operations are batched –Add, Delete –Moves, Renames –Modifications –Branches / Merges Batch is “sent” at check in Check in is atomic  Changeset 9

TFS Source Control: Support beyond VS2005 & VS2008 Team Foundation Server MSSCCI Provider –Available for download from microsoft.com Source control only Supports: –Visual Studio.NET 2003 –Visual C++ 6 SP6 –Visual Visual Basic 6 SP6 –Visual FoxPro 9 SP1 –Microsoft Access 2003 SP2 –SQL Server Management Studio –Sparx Systems Enterprise Architect 6.0 –Sybase PowerBuilder

Overview of Source Control Settings Demo Check out settings Check in policy settings Check in note settings

TFS does more than just check-in and check-out Branching and merging –Facilitates simultaneous development of multiple versions of an app

Best Practice: Repository Setup For Branching & Merging Do not add sources directly to the root of your Team Project source control tree –$/My Team Project/Trunk –$/My Team Project/Branch –$/My Team Project/MyApp1/Trunk –$/My Team Project/MyApp1/Branch Branch cannot be located under the branch origin –Error –Recursive

Demo Set up the repository Add some code

Best Practices /TFSGuide /TFSGuide Lots of great info Free Released Aug

What should go into source control? Solution files -- *.sln Project files -- *.csproj, *.vbproj Source Control Project Metadata (*.vspscc) –Project bindings –Source control configuration Application config files (*.config) Source files Binary dependency references 16

What should not go in source control? Solution user option files (*.suo) –Local user customizations Project user option files (*.user) –Local user customizations WebInfo files (*.webinfo) Build outputs –/bin/debug –/bin/release –/obj 17

Best Practice: Client-side vs Server-side Structure, Part 1 Directory structure should be the same –Client-side structure should match server Simplifies “Get Latest” Everyone has the same directory layout This doesn’t mean that everyone has to has to put their source in the same place on disk –The relative paths should match –Root path of source tree can be different 18

Best Practice: Client-side vs. Server-side Structure, Part 2 19

Best Practice: Repository Setup For Branching & Merging Do not add sources directly to the root of your Team Project source control tree –$/My Team Project/Main –$/My Team Project/Branch –$/My Team Project/MyApp1/Main –$/My Team Project/MyApp1/Branch Branch cannot be located under the branch origin –Error –Recursive Do this even if you don’t currently need branching!

Best Practice: Don’t Branch Don’t branch without a good reason Life only gets more complex with branching Favor Labels over Branches You can always branch from a Label later 21

Signs you might need to branch Regular broken builds Features in parallel development that need to edit one another –Branch so that each feature can develop in isolation –Merge changes later Ask yourself if the productivity gained by the branch is balanced against the pain (anti- productivity) of merging changes back 22

SO…IF YOU REALLY MUST BRANCH… 23

Branching Scenarios No Branching –Everyone works from the same code Branch for Release –Stabilization in order to prepare for a release Branch for Maintenance –Maintenance of a previous build/release –Service pack development Branch for Feature –Branch from the Trunk to develop a new feature –Merge back into the Trunk when feature is done Branch for Team –Branches for a team working on a set of features 24

Branch For Release \Main\ –Source\ \Release 1\ –Source\ \Release 2\ –Source\ 25

Branch For Release: Process 26

Branch For Maintenance Similar to Branch For Release \Main\ –Source\ \Maintenance\ –Release 1\ Source\ –Release 2\ Source\ 27

Branch For Feature Branching for development isolation \Main\ –Source\ \Development\ –Feature 1\ Source\ –Feature 2\ Source\ –Feature 3\ Source\ 28

Branch For Teams \Main\ –Source\ \Development\ –Team 1\ Feature 1\ Source\ Feature 2\ Source \ –Team 2\ Feature 1\ Source\ Feature 2\ Source \ 29

Branching For Isolation: The Process 30

Branching Overkill Minimize the number of branches Avoid granular branches Watch out for branching problems –Missed deadlines because the merge is too difficult, long, intricate, etc –Releases take forever because fixes have to go through multiple layers of merge –You’re simply spending too much time doing merges 31

Branching & Merging You can specify 3 rd -party merge tools –Tools  Options  Source Control  Visual Studio Team Foundation  File Extensions…  Add…  Configure Tool Check out the Team System Widgets page 32

Demo Create a branch Merge changes Create/resolve a check-in conflict

BEYOND THE GUI

Source Control Bad news –Some features are command-line only Good news –There’s a lot you can do from the command-line –Scriptable

TF.exe Command-line interface to TFS source control 30+ sub commands –Kind of like “net” command in Windows Why would you want to use the command line version? 1.It’s cool 2.Some things aren’t available through the UI 3.Good for automated operations (builds, etc)

The Commands Add Branch / Branches Changeset Checkin / Checkout Configure Delete / Undelete Dir Get History Label / Labels / Unlabel Lock Merge / Merges Move Permission Properties Rename Resolve Shelve / Unshelve Status Undo View Workfold Workspace / Workspaces

Things you (probably) can’t do through the GUI Find files in TFS by name/wildcard –tf dir Get particular version of a file(s) by wildcard –tf get Find checked out / pending change files –tf status What will be changed by a “get latest”? –tf get /preview Baseless merges –tf merge /baseless Eliminating a changeset from a merge –tf merge /discard

tf get Gets file(s) from server to workspace Args –/version –/all – forces get all files –/overwrite – replace read-only files that aren’t checked out –/force – equivalent of /all + /overwrite –/preview – show what would happen but don’t do it –/recursive –/noprompt – no visual dialog boxes Example: get everything for this workspace for changeset #29 –tf get * /all /version:c29 /recursive /force

The /version option Date –/version:D10/11/2001 Changeset # –/version:C1234 Label –/version:Llabeltext Latest version –/version:T Workspace Name –/version:Wworkspacename

Team Foundation Server Power Tool Free download from Microsoft tfpt.exe Add “C:\Program Files\Microsoft Team Foundation Server Power Tools” to your PATH environment variable

TFPT Commands Annotate Bind DestroyWI DestroyWitd GetCS History Online Query Review Rollback TreeClean TweakUI Unshelve UU WorkItem Workspace

Source Control Security Team Explorer  Source Control Explorer  Folder  Properties… Permissions: –Read –Check Out –Check In –Label –Lock –Revise other users’ changes –Undo other users’ changes –Administer labels –Manipulate security settings –Check in other users’ changes

CUSTOMIZATION

Customizing Version Control Create a custom check-in policy Extend PolicyBase –Microsoft.TeamFoundation.VersionControl.Client.dll Mark class as [Serializable] PolicyBase.Evaluate() lets you examine –What’s being checked in –Associated work items –Check-in comments –Other check-in policies

Installing the Check-in Policy Compile Copy to the server Go to HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\ TeamFoundation\SourceControl\Checkin Policies Add new “string value” –Value name must be the same as the DLL name (minus “.dll”) –Data is the full path to the DLL

Policy Gotcha! Policies are evaluated on the client Policy DLL must be installed on every developer’s computer Server-side policy configs are stored using binary serialization –Everyone must have the same version of the policy DLL

Questions?

About the speaker Owner, Benjamin Day Consulting, Inc. – –Web: –Blog: Trainer –Visual Studio Team System, Team Foundation Server Microsoft MVP for C# Microsoft VSTS/TFS Customer Advisory Council Leader of Beantown.NET INETA User Group