Microsoft Developer’s Guide to Team Foundation Version Control

Slides:



Advertisements
Similar presentations
Eralp Erat Senior Software Developer MCP,MCAD.NET,MCSD.NET.
Advertisements

Visual Studio Team System (VSTS). Richard Hundhausen Author of software development books Microsoft Regional Director Microsoft MVP (VSTS) MCT, MCSD,
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.
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.
Source Control Repositories for Enabling Team Working Svetlin Nakov Telerik Corporation
Enabling Better Software through Better Testing Jason Anderson, Microsoft
Team Foundation Server Lothar Wieske Lifecycle Management Technology Specialist Microsoft Deutschland GmbH.
Software Development using SCRUM for Visual Team System Sascha P. Corti Developer Evangelist Microsoft Switzerland GmbH
Using Microsoft SharePoint to Develop Workflow and Business Process Automation Ted Perrotte National Practice Manager, Quilogy, Microsoft Office SharePoint.
Source Control with Team Foundation Server Martin Woodward Teamprise.
Team Foundation Server the answer to all project management problems? Richard Fennell Director.
03a | Manage Team Foundation Server Steven Borg | Co-founder & Strategist, Northwest Cadence Anthony Borton | ALM Consultant, Enhance ALM.
Introduction to SharePoint Development with VS2010 Paul Yuknewicz Lead Program Manager
Visual Studio 2005 Team System: Enterprise Class Source Control & Work Item Tracking Ajay Sudan Microsoft Corporation
Serious Team Foundation Server Source Control Benjamin Day Benjamin Day Consulting, Inc.
Developing Workflows with SharePoint Designer David Coe Application Development Consultant Microsoft Corporation.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
Tejasvi Kumar Technology Specialist – VSTS Microsoft Corporation
Lecture Set 2 Part B – Configuring Visual Studio; Configuration Options and The Help System (scan quickly for future reference)
Version control Using Git Version control, using Git1.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
Information Systems and Network Engineering Laboratory II DR. KEN COSH WEEK 1.
DEV 303 Visual Studio "Whidbey" Enterprise Tools: Source Control and Work Item Tracking Brian Harry Product Unit Manager Microsoft Visual Studio.
Version Control Systems with Subversion (SVN) and Tortoise.
SENG 403 Tutorial 1 1SENG 403 – Winter Agenda Version Control Basics Subversion Basic actions in Subversion Some examples 2SENG 403 – Winter 2012.
CVS – concurrent versions system Network Management Workshop intERlab at AIT Thailand March 11-15, 2008.
TFS 2010 What’s new and interesting. Key Items Agile Planning Tools – Slides #3-#6 Improved parallel development - Slides #7-#8 Continuous Integration.
1 Software Configuration Management (SCM) and Software Reuse Presented By: Edmund Leng (HT052446J) Choo Zhi Min (HT052430X)
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.
Office Business Applications Workshop Defining Business Process and Workflows.
Visual Studio Team System Frank PrengelLothar Wieske TechnologieberaterLifecycle Management Technology Specialist Microsoft Deutschland GmbH.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College
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.
1 MSTE Visual SourceSafe For more information, see:
BODY From Source Code Management to Daily Build Soren Klemmensen, Kamil Sacek & Luc van Vugt
Behind the Scenes of Visual Studio 2005 Team Foundation Server Doug Neumann TLN301 Program Manager Microsoft Corporation.
Team Foundation Server 2010 Introductory presentation.
Microsoft Visual Studio 2005 Tools for the Office System: Building Office Solutions Using Visual Studio 2005 Tools for Office Andrew Coates Developer Evangelist.
Neil Kidd Developer Tools Technical Specialist Microsoft UK.
Step-by-Step Migration and Adoption Mark Michaelis Architect, Author, and Trainer Eric Lee Microsoft Product Manager Visual Studio 2005 Team Foundation.
Visual Source Safe –A Quick Tour. CONTENTS What is VSS ? How to install VSS ? How does VSS track versions? VSS Concepts & Features Utilities available.
DEV466 Microsoft Visual Studio 2005 Team System: Enterprise-Class Source Control Doug Neumann Program Manager Visual Studio Microsoft Corporation.
TEAM FOUNDATION VERSION CONTROL AN OVERVIEW AND WALKTHROUGH By: Michael Mallar.
Connect with life Tejasvi Kumar Developer Technology Specialist | Microsoft India
Integrating with and Extending Visual Studio. Objectives.
Integrating and Extending Workflow 8 AA301 Carl Sykes Ed Heaney.
YOUR LOGO Phase 2 International Providing critical business software solutions at affordable prices.
Information Systems and Network Engineering Laboratory I DR. KEN COSH WEEK 1.
De Rigueur - Adding Process to Your Business Analytics Environment Diane Hatcher, SAS Institute Inc, Cary, NC Falko Schulz, SAS Institute Australia., Brisbane,
TFS Training TFS Training. Introduction to Team Foundation Server Team Foundation Server Team Foundation Server is a Microsoft product which provides.
Redmond Protocols Plugfest 2016 Jinghui Zhang Office Interoperability Test Tools (Test Suites and Open Source Projects) Software Engineer Microsoft Corporation.
Version control, using Git
Tech·Ed North America /7/2018 2:58 PM
Concurrent Version Control
Team Foundation Server Overview
Introduction to Team Foundation Server 2010
Source Code Management
Microsoft Ignite NZ October 2016 SKYCITY, Auckland.
DAT381 Team Development with SQL Server 2005
Introduction to VSTS Database Professional
Office 365 Development July 2014.
Mark Quirk Head of Technology Developer & Platform Group
MS Confidential : SharePoint 2010 Developer Workshop (Beta1)
Presentation transcript:

Microsoft Developer’s Guide to Team Foundation Version Control Ed Hintz and Buck Hodges

Agenda Introduction Dogfood and Performance Statistics Feature overview Scenarios Visual Studio Command line SDK and Extensibility

What is VS Team Foundation? Integrated Platform for Collaborating on Software Development Projects. Work Item Tracking Version Control Reporting Build Automation Team Communications

Microsoft VSTS Dogfooding Version Control Version Control Users: 864 Number of Files/Folders: 1,507,247/178,953 Compressed File Size: 95.2 GB Workspaces: 1,770 Workspace File Versions: 48.9 Million Changesets: 32,573 Pending Changes: 57,278 Shelvesets: 2,458 Source: http://blogs.msdn.com/johnlawr/archive/2006/02/16/533362.aspx Latest: http://tfsserver:8080/VersionControl/v1.0/administration.asmx/QueryRepositoryInformation Copenhagen, Denmark 6 Users Fargo, ND 4 Users Redmond, WA 368 Users Research Triangle, NC 42 Users Hyderabad, India 14 Users

Source Control Feature Support Atomic Checkin Integrated with Visual Studio Work Item Integration Customizable Checkin Experience Checkin Policies Checkin Notes Shelving Delta File Storage Large File Support (>4GB)

Source Control Feature Support Distributed Team Support E-mail Checkin Notification Merge and Diff Tool Configurable (see http://blogs.msdn.com/jmanning/articles/535573.aspx for common tool settings) SDK and VS Extensibility MSSCCI Plugin as Powertoy – (VS2003, VB and VC6)

Visual Studio Demo

Architecture

Architecture Team Foundation Client Tier Version Control Proxy Build Machine Report Client Team Foundation App Tier App Tier Standby Server MDAC Team Foundation Data Tier

TFS Concepts: Workspace Local copy of files under SCC Isolates developer from other changes Maps repository paths to local paths Mappings can be scattered around local machine Allows for cloaked paths Server maintains inventory Tracks file versions and local paths

TFS Concepts: Changeset Set of committed modifications Add, rename, delete, etc. Atomically applied to repository Associated with work items at checkin Convenient unit for change management

Checkin - Under the Hood Visual Studio Work Item Tracking WorkItem 33231 Workspace Checkin Validate Policies 1 Checkin Policy Engine Unit Testing WI Association Static Analysis Custom Policy Artifact Link Commit Changes 2 Update Work Items 3 Change Set 727012 Change Set 727012 Change Set 727012 Change Set 727012 Change Set 727011 V2 Changeset 727012 V1 V3 V5 V4 V5 Check E-mail Notification 4 Events Raised for 3rd party sync purposes Version Control Integration Infrastructure

Getting started Create a workspace, set mappings For example, use /template to start with working folder mappings. tf workspace /template:WorkspaceName;username WS1 /s:http://tfsserver:8080 Configure diff and merge tools tf diff /configure Get the files from the server tf get Edit a file tf edit foo.cs Check in tf checkin

Command line dialogs We provide dialogs for commands involving complex input or data display (use /i to suppress) Changeset Checkin Difference (external diff viewer) Get (conflict resolution) History Resolve Shelve Unshelve View (associated editor) Workspace

Shelvesets Shelvesets are collections of pending changes, comments, and associated work items Scenarios Backup tf shelve /i MyWork Temporarily move changes to work on a different issue tf shelve /i MyWork /move Remote code reviews tf unshelve CoolStuff;joe Buddy builds or coordinate changes tf unshelve CoolStuff;joe

Shelvesets List shelvesets tf shelvesets tf shelvesets /owner:joe Delete a shelveset tf shelve /delete MyShelveset List the pending changes in a shelveset tf status /shelveset:MyWork;joe Diff the changes in a shelveset tf diff /shelveset:MyWork;joe

Notes To move your workspace, change your mappings (tf workspace) and then run get To handle changing computer names: tf workspaces /updateComputerName:oldName /s:http://tfsserver:8080 To handle changing user names: tf workspaces /updateUserName:oldUserName /s:http://tfsserver:8080 Renaming files Don’t overdo it, or your branch merges will be more tedious (for example, renames in both the source and target)

Performance Tweaks Use a version control caching proxy server in remote offices Command line Set the BypassProxyOnLocal registry entry (see http://blogs.msdn.com/buckh/archive/2005/12/12/503015.aspx for details) On my laptop today, ByPassProxyOnLocal saved 2 seconds (my IE settings are Automatically Detect) Visual Studio Change the registry setting not to automatically get missing files (see http://blogs.msdn.com/hippietim/archive/2006/03/14/551320.aspx for details)

Commands Command line reference: http://msdn2.microsoft.com/en-us/library/cc31bk2e(vs.80).aspx Command line command and option summary: http://blogs.msdn.com/buckh/articles/CommandLineSummary.aspx

Client API The Team Foundation Server client object model is a set of .NET 2.0 assemblies There are public APIs for version control, work item tracking, build, reporting, and more

How It Happens: Team Foundation Core Services Team Foundation Object Model Visual Studio IDE External tool (Partner or MS) Work Items Integration Interface Version Control Integration Interface Team Build Integration Interface Team Foundation Core Services Team Foundation Server Linking Service User Groups Notification Registration Common Structure

Version Control Client API The primary objects are TeamFoundationServer – this is the root object from which you obtain a service, such as version control or work item tracking VersionControlServer – this is the primary interface to the version control server for operations and queries that are not specific to a workspace Workspace – this object represents a workspace and is used to pend changes, check in changes, and perform queries specific to a workspace Workstation – this object represents the current computer and manages the workspace cache, which contains the list of local paths in each workspace

Code Sample TeamFoundationServer tfs = new TeamFoundationServer("http://tfsserver:8080"); // Get a reference to Version Control. VersionControlServer versionControl = (VersionControlServer) tfs.GetService(typeof(VersionControlServer));

Code Sample // Determine the server and workspace based on the local path mapping. WorkspaceInfo wsInfo = Workstation.Current.GetLocalWorkspaceInfo(Environment.CurrentDirectory); // Stop if we couldn't figure out the workspace. if (wsInfo == null) { Console.Error.WriteLine("Unable to determine the workspace."); Environment.Exit(1); } // Get a reference to our Team Foundation Server. TeamFoundationServer tfs = new TeamFoundationServer(wsInfo.ServerUri.AbsoluteUri); // Get a reference to the workspace. Workspace workspace = wsInfo.GetWorkspace(tfs); // Update this workspace. workspace.Get();

API Code Samples Basic Team Foundation Version Control client API example http://blogs.msdn.com/buckh/archive/2006/03/15/552288.aspx Displaying the labels on a file, including label comments http://blogs.msdn.com/buckh/archive/2005/10/25/484854.aspx Displaying the sizes and dates of files in the server http://blogs.msdn.com/buckh/archive/2005/10/26/485458.aspx Sample checkin policy: make sure the comment isn't empty http://blogs.msdn.com/jmanning/archive/2006/01/21/515858.aspx Show all pending changes on the Team Foundation server older than a given age http://blogs.msdn.com/jmanning/archive/2005/12/01/499033.aspx Scanning history for the changesets that had policy override - simple usage of QueryHistory http://blogs.msdn.com/jmanning/archive/2005/11/04/489193.aspx

VS Extensibility Allows customers to extend the functionality of TF SCC in Visual Studio via add-ins and packages Provides access to the following: Source Control Explorer selection and events Pending Changes selection and events Solution Explorer and SCC Explorer workspace History selection Changeset details dialog Shelveset details dialog

VS Extensibility All class names start with Microsoft.VisualStudio.TeamFoundation.VersionControl Use the VersionControlExt object to get to the others: vce = _applicationObject.GetObject("Microsoft.VisualStudio.TeamFoundation.VersionControl.VersionControlExt") as VersionControlExt;

VS Extensibility - VersionControlExt Method/Property Description Explorer Access the Source Control Explorer.  Useful for add-ins that need to scope an operation.  The class is VersionControlExplorerExt. FindChangeSet Find and display a specific changeset from your add-in History Access the History Toolwindow from your add-in.  The class is HistoryExt PendingChanges Access the collection of pending changes (as displayed in the Pending Changes Toolwindow) from your add-in.  The class is PendingChangesExt. SolutionWorkspace Get the Workspace object that contains the currently opened solution.  If there is no solution opened or the solution is not under version control this will be null. ViewChangeSetDetails Display detailed information about a changeset ViewShelveSetDetails Display detailed information about a shelveset  

VS Extensibility Demo How to Write a Team Foundation Version Control Add-in for Visual Studio http://blogs.msdn.com/edhintz/archive/2006/02/03/524312.aspx

Tfpt.exe: Team Foundation Power Toy Fills some of the gaps in v1 Some of the command names (getcs, uu) may change in the future Work item tracking commands will be available soon Executing queries Updating work items in bulk Downloading and uploading attachments Additional documentation: http://blogs.msdn.com/buckh/articles/tfpt_documentation.aspx Currently part of the Visual Studio 2005 SDK: http://msdn.microsoft.com/vstudio/extend

Annotate Downloads all versions of the specified file and shows information about when and who last changed each line in the file tfpt annotate example.cs

GetCS Gets only the changes in a particular changeset “tfpt getcs 123”

History Copies the functionality of the regular history command with the addition of /followBranches FollowBranches option results in the output including the history of the file’s branch ancestors Requires a single item argument (no wildcards or recursion) tfpt history /followBranches mycode.cs

Online Pends edits on writable files that do not have pending edits Optionally includes adds of files not in version control and deletes of files missing from disk Supports exclusion masks “tfpt online . /r”

Review Optimized for a code review rather than checking in or shelving

Rollback Used to roll back changes that have already been committed If you have existing pending changes in your workspace, use shelve /move to move them out while rolling back changes “tfpt rollback /changeset:3”

Unshelve Unshelve and merge changes with the changes currently in the workspace Creates a backup shelveset with your changes before unshelving

UU Undoes unchanged files, including adds, edits, and deletes By default, gets the latest files in your workspace (runs get) Specify a particular changeset with /changeset if you only want to check against a particular set of changes Designed to help with a Gauntlet workflow “tfpt uu /changeset:123”

Questions