Welcome to MSDN Blogs Sign in | Join | Help

New Forum on MSDN

For a long time, we have had no home for questions related to migration offerings such as the VSS Converter, as well as general questions about our tools, partners, and service offerings.  We’ve recently added a new forum on MSDN to serve as the home for questions related to all of these things: Team Foundation Server - Migration and Integration

With the recent release of the TFS Integration Platform, we’re also leveraging this forum as the discussion forum for the platform and the CodePlex project.  This will help to drive all of the questions and discussions for the entire TFS migration space to a single location.

Something this forum is not intended to support are questions related to upgrading between TFS versions.  For those questions, the TFS General (http://social.msdn.microsoft.com/Forums/en-US/tfsgeneral/threads) or TFS Setup (http://social.msdn.microsoft.com/Forums/en-US/tfssetup/threads) forums are your best bets.

TFS Integration Platform Alpha Released on CodePlex

Today, we released the Alpha version of the TFS Integration Platform on CodePlex.  For all of the details, including the docs and source code, check out the project page: http://tfsintegration.codeplex.com

If you check out the project page, you’ll soon realize that this project has replaced the former TFS Migration and Synchronization Toolkit that was hosted on CodePlex.  We’ve actually reused the same project page, but have updated the URL and project information to reflect the changes that have been made.  Visiting the previous project URL (http://migrationsynctoolkit.codeplex.com) will redirect to the current project page.

The TFS Integration Platform is different from its predecessor project in many ways.  First, we listened to the feedback that the community had on the old project and used that to shape the new project.  Here are a few things we’ve changed this time around:

  • Improved quality and robustness.  This is a major area of improvement for this project, and one big change for us is that we’re actually dogfooding this platform in production.  We had a need to synchronize two servers internally (see Brian Harry’s blog post on the subject), and we’ve used this platform to build that synchronization tool.  The net result is that quality and robustness are a top priority for our team, as we have hundreds of people relying on our tools each day.
  • Increased transparency to the community.  In the past, we just dropped a few releases on the community, and didn’t follow up with the needs of the community.  This time around, we’re starting with an alpha release, which was built with insight from MVPs, and we plan to have very frequent updates of the code base on CodePlex (ideally multiple times per week).  The goal here is to shrink the feedback loop so that we can end up with the right platform.
  • Better documentation.  Along with the improvements to the code, we’ve worked hard with the VSTS Rangers to create detailed docs to help developers make sense of the platform.  Willy from the ranger’s team has been blogging about this effort for some time, so check out his blog post that summarizes everything that they’ve done to date.
  • Better serviceability.  In the past, we had nothing that resembled a binary release, let alone one that was serviceable.  This time around, we’re making an MSI available to install the platform binaries to make servicing of tools built on the platform much easier.

Another change that we’ve consciously made was to rebrand the project to the TFS Integration Platform.  We felt that the description “toolkit” wasn’t accurate compared to what other “toolkits” consisted of, and that our functionality was more in line with what a “platform” offers.  Changing from “migration and synchronization” to simply “integration” was about simplifying the message about the purpose, and helping to disambiguate from upgrade scenarios which are often confused with migration.  Overall, we hope this name change results in a clearer focus for this project.

So, if you’ve looked at the Migration Toolkit in the past, or have a need to integrate another system with TFS, check out the CodePlex homepage for the project and stay tuned for more updates!

New Branch and Merge Permissions

In a previous blog post about the new First Class Branches that we have added in TFS 2010, I mentioned the addition of two new permissions related to branching and merging.  In this post, I want to go into a bit more detail about these permissions, explaining what each enables, the motivation for adding each permission, and how users upgrading from TFS 2008 are impacted.

Manage Branch

The first of these new permissions is the Manage Branch permission.  Users that have this permission set to Allow for a given path can do the following:

  • Convert folders to branches (and branches back to folders)
  • Update metadata for a branch (i.e. owner, description)
  • Create additional child branches from the original branch
  • Change the relationships between branches with merge relationships (i.e. reparenting branches)

One very interesting point about this permission is that it is only relevant for folders that have been converted to Branches – it does not prevent users from branching ordinary folders for which this permission has been denied.

The primary motivation for adding this permission was to enable which users could create new branches.  In many organizations, there is a desire to establish a branching structure, and then have developers work in the branches the team has agreed they need.  Because the permission is path scoped, and branches can still be organized in folders, this still enables teams to group branches such that some branches can be further branched by users but other cannot. 

An example scenario around this permission would be to deny Contributors the ability to Manage Branch under $/TeamProj/Main and $/TeamProj/Releases, but grant the permission under $/TeamProj/FeatureBranches.  That way, users could create sub branches for their feature branches, but couldn’t branch off of release branches or Main.

Merge

The Merge permission is the second new permission we have added for version control.  Users that have this permission set to Allow for a given path can do the following:

  • Pend merge operations on branches, folders, and files under the specified path

Note that this Merge permission is only for the target path of a merge operation.  There is no permission to prevent a particular branch or folder from being merged to another path.  Unlike the Manage Branch permission, the Merge permission is not tied to branches – it has the same behavior for folders and branches under a given path.

The motivation for adding the Merge permission was similar to that of the Manage Branch permission.  In some teams, there is a desire to have certain developers handle the task of merging code between branches, while other developers will always work on one branch or another. 

Upgrading from 2008

Adding new permissions to the 2010 release presented the problem of how to assign these permissions on upgrade.  When we added these new permissions, we had one clear goal for the upgrade:

After upgrading, users should be able to continue using all features they had permissions to prior to the upgrade.

Following this guideline, users upgrading to 2010 will be granted the new permissions as follows:

For a given path, users that are granted the Pend Change (aka Edit) permission will be granted both the Manage Branch and Merge permission.  Likewise, users that have been denied the Pend Change permission will be denied the new permissions.

This effectively means that users that were granted Pend Change permission before upgrade would be able to branch and merge, and after upgrade they will still have the permissions to branch and merge. 

It is also important to note that during upgrade, folders with branch relationships to other folders are automatically converted to branches.  Due to an oversight, this created a problem during Beta 2…

Bug in TFS2010 Beta 2 Upgrade

Originally, we had planned to grant the Merge permission to users with the Pend Change permission, and Manage Branch would be granted to users with Admin Project Rights.  The thought here was that converting to branches and creating new branches was targeted more towards project leads than developers, and because the functionality was new, that users branching and merging folders wouldn’t be impacted.

Some time later, we decided we needed to automatically detect and convert folders to branches during the upgrade process.  When we implemented this and performed our upgrade testing, we didn’t realize that after upgrade users without Admin Project Rights couldn’t create new branches. 

The net result here is that for teams that have upgraded from 2008 to Beta 2, only users with Admin Project Rights will be granted the Manage Branch permission.  We have since fixed this bug so that users upgrading from 2008 to RC or RTM will have the permissions applied as described above.  Note that users upgrading from Beta 2 to RC/RTM will not have their permissions changed (we don’t want to overwrite any customizations that may have been made since upgrading to Beta 2).

Posted by mmitrik | 0 Comments

Using VSS Converter in TFS 2010 Beta 2

TFS 2010 Beta 2 has been out for a few days now, and I’ve heard of quite a few users hitting errors when trying to migrate their VSS databases to TFS using VSS Converter.  If you’ve hit the error message below, keep reading for a workaround that enables you to use VSS Converter from TFS 2010 Beta 2.

Symptom

TF60070: Unable to connect to the Team Foundation Server: 'http://TFSServer:8080/'. Please ensure that the Team Foundation Server exists and try again.

Workaround

With the addition of Team Project Collections in TFS 2010, the VSS Converter utility needed to have its connection string format updated to enable it to connect to TFS.  During Beta 2 development, we updated the tool so that it would accept the collection name as an input parameter.  The unfortunate part about this change is that we were not able to update the documentation for the sample migration setting file in time for Beta 2.  For the RTM release, we’ll be sure to have the walkthrough and other docs updated to include this new setting.

To workaround the issue, you’ll need to add a new attribute to the <TeamFoundationServer> node in the settings file.  Here is an example of what the setting would look like if you were migrating to the default collection:

<TeamFoundationServer name="myserver" port="8080" protocol="http" collection="tfs/DefaultCollection"></TeamFoundationServer>

If during the configuration of TFS, you specified a different path than "tfs" you need to prefix the collection name with that path component.  Likewise, if you're not using the DefaultCollection, or want to migrate to a named collection, insert that part of the name after the "/".  If you are not using any path component (i.e. an upgrade scenario), then you will want to specify only the collection name, omitting the "/".

Forward Compatibility Release for Team Explorer 2008

Today, as you have probably heard by now, was the public release of TFS 2010 Beta 2.  We’ve got a ton of improvements in this release, including some awesome styling changes for the branch visualization features that I’ve blogged about previously.  I have some screenshots coming in a future post where I’ll talk about the motivation behind the changes. 

Another release that went live today was the Forward Compatibility GDR for Team Explorer 2008.  This release includes a ton of important changes for TFS Version Control, as well as other feature areas in TFS.  In a previous post, I mentioned the changes that we made in TFS 2010 to the version control schema, and the impact on our client is one of the reasons we now require this GDR.  The good news is that with the patch, users with older clients will be able to have nearly the same experience with TFS 2010 as they currently do with TFS 2008. 

Find all of the information about the forward compat release, including the version control scenarios that are impacted, here.

Posted by mmitrik | 0 Comments
Filed under: , ,

Keyword Expansion Check-in Policy on CodePlex

One feature we often hear requests for in TFS version control is the ability to support keyword expansion in comment headers.  Many users of VSS and CVS are accustomed to using these comments as the way to track the revision history of a file.  While TFS provides the ability to track changeset comments, we don’t have any file level comments and the history command is not available while offline.  Since we do not yet have this feature in the product, we’re tracking it on our features backlog as something to include in a future release. 

Recently, I saw a blog post by Jochen Kalmbach where he was talking about a check-in policy he wrote to support the keyword expansion feature.  I asked if he would be willing to share it broadly, since there are definitely other customers that could benefit from this policy.  Jochen agreed, and is now sharing the project on CodePlex at http://logsubstpol.codeplex.com/

I encourage anyone that is interested in the keyword expansion feature to take a look at Jochen’s check-in policy.  I know he’s looking for feedback, so please let him know what you think!

Posted by mmitrik | 0 Comments

New Migration and Integration Solutions Page on MSDN

Today we launched a new page on MSDN that will serve as the central hub for all things related to conversion to and integration with TFS.  This new Migration and Integration Solutions page consolidates all of the offerings in this space, including the tools provided by Microsoft, tools developed by partners and the community, and partners offering services in this area.  We have also included some community related content to the page, linking to the blogs of people on the migration team, and have included a space to link to related projects on CodePlex.

We’re currently in development of multiple efforts in this space, so we plan to have more updates on this page soon.  Overall, our goal is for this site to serve as the one-stop-shop for converters and integration tools, and we hope to include links to all of the offerings build by partners and the community.  If you know of a tool that isn’t listed here, please let me know and I’ll work to get it included on the site.

Posted by mmitrik | 0 Comments
Filed under: , , ,

Bi-directional SVN to TFS Tool Available

One of our partners, Persistent Systems, just released a tool to migrate data from Subversion to TFS.  After migration, this tool also provides the ability to synchronize changes back to the SVN repository, allowing teams with heterogeneous ALM tooling to more easily share source code.  Below is some information from Persistent on the new tool they are offering.  You can learn more about this tool on the Persistent site.

TFS Migration tool for Subversion migrates version control data from Subversion (SVN) to Microsoft Visual Studio Team System 2008 Team Foundation Server (TFS) and also provides a two-way synchronization on the migrated data. The tool migrates the entire version history including branches and tags. Tags are migrated as labels in TFS. The tool also caters for the disparity between rename operations on both TFS and Subversion.

Posted by mmitrik | 1 Comments

Migration Tools Community

Something that I’m currently working on is trying to better understand the interest our partners and community members have in the migration/sync space.  There are already some people out there that have built tools on our existing Migration Toolkit, and I’m sure there are others I don’t know about that have tried (successfully or unsuccessfully).  If you are one of those people that have tried to build migration tools for TFS, I’d love to learn more about your goals in this space. 

Below are some questions that I have related to migration.  I welcome any and all feedback, so please feel free to respond to this post via email or by leaving a comment.

  • Where does your primary interest lie with respect to migration?  Some things I can think of (please feel free to elaborate or suggest other things I’ve missed):
    • Building migration tools
    • Building integration/synchronization tools
    • Extending/contributing to the platform
    • Utilizing migration/sync tools to help customers in service engagements
    • Customizing migration/sync tools in customer engagements
  • What, if any, business plans do you have in this space?
    • Development and sale of migration/sync tools
    • Migration services
    • Customization of migration/sync tools
  • Do you have any interest in contributing to open source development projects on the migration tools platform?
  • Any other thoughts around the migration/synchronization/integration space?

If you are interested in getting involved with our migration tools, please check out the VSTS Rangers site for information on joining the project to improve the TFS2TFS Project Copy tool and new version of our migration platform.  You can alternatively contact me if you’re interested in learning more or becoming involved.

Thanks for the help with this.  Your input is invaluable to helping our team better understand our community’s needs and wants in this space.

Branch Hierarchy Visualization

One of the new branch visualizations we’ve added allows users to see the hierarchical relationship between branches.  That is, the visualization shows the logical relationships between a family of related branches.  Typically, branches only have parent-child relationships that are established when a new branch is created.  Additionally, branches may have merge relationships, that are created after performing a baseless merge.  It is only the parent-child relationships that are shown in this visualization.Physical Branch Structure

Physical Branch Structure

Any time I’m demoing the new View Hierarchy feature, I like to show the folder structure as a point of comparison for the visualization.  In the picture to the left, notice that the Main and Dev branch are siblings in the physical structure – that is, they both reside directly under the Sandbox team project.  Two feature branches have been created under the FeatureBranches folder, but in this picture, their parent branch is not evident.  Keep this in mind when viewing the hierarchy further down this post.

It is also worth noting a few things about how branches can be organized in TFS 2010.  Branches can be organized in any folder structure, so long as they are not contained within another branch.  This is done to avoid nesting of branches, which if enabled makes merging extremely complex and confusing.  We also have a restriction that prevents folders which contain branches from being branched.  Using the example above, the FeatureBranches folder cannot be branched (attempting to do so will result in an error message pointing out that Feature1 is contained in FeatureBranches).

Logical Branch Structure

To see the logical branch hierarchy for the branches shown above, I selected the Main branch, and from the “Branching and Merging” context menu, I selected the “View Hierarchy” option.  The image below shows exactly what this branch hierarchy looks like. 

Logical Branch Hierarchy Notice that in this picture it is clearly shown that Main is the parent branch of Dev and V1.0 (i.e. Dev and V1.0 were branched from Main), and Dev is the parent of Feature1 and Feature3.  Although none of this information is shown in SCE, together they give the full picture of how branches are related and how they are organized.

Branch SelectionCustom Views

For this simple branching structure, I chose to show all of the ancestors and descendants of the branch I chose to visualize (note the combo box at the top).  In a larger branch hierarchy, I might have wanted to trim down the view a bit to show only those branches I’m interested at the time.  To do this, we have multiple features to enable custom views.

The quickest was to remove branches is to simply select them, and then press the delete key or click on the “X” in the upper right corner.  Adding branches can be done by clicking on the “+” in the upper right corner for a selected branch or pressing the insert key, which will bring up a box like the one shown on the left.

There is also a button on the toolbar that allows users to fully customize their branch view.  In this view, a tree representing the logical hierarchy is shown, and specific branches can be selected to be included in the visualization.  We also have a preview to help understand how many branches will be shown based on the current selection.  Note that if you select a branch, but not its parent, the parent will still be shown.  You also cannot deselect the branch that was originally chosen to be visualized.  To do that, you can select a branch in the hierarchy view, and choose the option to view it’s hierarchy from the toolbar or context menu.

Branch Selection Dialog

Besides just being a pretty picture, this visualization is very actionable.  You can save the visualization, copy it to the clipboard, drag & drop to perform merges, create branches, view branch properties, compare branches, and navigate to a branch’s location in SCE.  Making all of our visualizations and tools actionable is one of the themes we’ve had for version control in Dev 10, so you’ll see this in other future posts.

One final topic that I wanted to cover, since I’ve been asked about it many times in the past – what is that purple rectangle for around the Main branch?  In this visualization, it is intended to be a frame of reference.  It marks the branch which was selected originally when entering the experience.  It is also the branch which the “Show” combo box is referring to when you choose, “Ancestors” or “Children”.  I’m still looking for feedback from customers on whether this is helpful or just a distraction, and that will help us decide what we’ll do in RTM.  I can also say that we’ve worked with our user experience team on the colors and theme, and are planning to pick a more consistent set of colors and styles.  As these changes develop, I’ll post more here.

Posted by mmitrik | 0 Comments

First Class Branches

Introducing the concept of “first class branches” is a significant part of the 2010 release for version control.  Not only does it help to distinguish between folders and branches, but it enables our branch visualizations, and provides a platform on which to build other branch centric features in the future.  Since this improvement to branches is very central to several other features in 2010, I thought it was the logical place to start talking about version control features.

Its probably good to start by saying that we’re not reinventing the way that branching works in TFS.  Branches are still created in much the same way, our path spaced, early branching model hasn’t changed, and merging is fundamentally the same (see my post on slot mode).  What has changed is the presentation to the user, the representation of logical relationships, and the introduction of structured metadata.

Branches in the UI

Branches in SCE Now that branches are treated differently from other folders in the system, we have a new icon to visually distinguish them in the UI.  In Source Control Explorer, branches will continue behave just like folders, meaning that they are still containers of files and folders, and all of the same actions are present - they can be branched, merged, deleted, etc…

The context menu for branches also has some additional commands in 2010.  We’ve added a “Branching and Merging” sub-menu, which contains the advanced options for converting folders to branches (see Upgrade section below) and reparenting, and also provides the entry into the branch hierarchy visualization.

The properties view for branches is also different than that of ordinary folders or file, containing some metadata for the branch, relationship information, and permissions for the branch.

 

Creating New Branches

In TFS 2010, the creation of branches has been streamlined a bit from the process in 2008.  In 2008, creating a new branch was like every other action in the system – changes were pended on the client, and then checked in to the server.  Based on feedback from users, we’ve decided to bypass the step where changes are pended, and perform the branch creation entirely on the server.  With this approach, the round trip time for downloading a copy of each file on the branch and then uploading each file again has been eliminated. 

It is worth noting that the behavior for branching folders is unchanged for 2010, and the default behavior from the command line is to pend the branch locally (even when creating child branches).  The tf branch command also allows you to specify a “/noget” option which can give similar behavior for command line branching to the new default in the UI (this option actually existed in 2008).

Owners

One of the pieces of metadata that we’ve added to branches is the concept of an owner.  By default, the owner is the user that created the branch, and after a branch is created, this can be changed.  For this release, the owner field doesn’t have many restrictions besides being a valid user in the system.  The idea here is that this is the point of contact for the branch – pretty straightforward.

Relationships

The relationships between branches is probably one of the most interesting additions for version control in TFS 2010.  This has enabled us to create all of the great visualizations that we’ve talked about in the past, and that users have requested for quite some time.  

Branch RelationshipsWhat we’ve done is to create the logical relationships that exist between branches, and to keep this separate from the physical relationships that exist between branches (as shown in SCE).  Using these parent-child relationships and the merge data that we store in the VC database, we can build all of the cool visualizations we’ve added in this release. 

In the properties window for each branch, we show a simple view of the relationships for a given branch, including its immediate children and lineage to the root of the branch hierarchy. 

Permissions

To give finer control over who can merge into and create branches, we’ve added two new permissions related to branches – Merge and Manage branch.  The Merge permission determines just that – only users with the Merge permission for a given branch can pend merges on items on that branch.  The Manage Branch permission determines which users can update the metadata and relationships for a branch, and it also determines who can create new branches from a given branch.  There are a lot more details around the new permissions, so I’ll save that for a future post.

Upgrade

Since we’ve added this new concept of first class Branches in this release, and most existing TFS servers already have branches, there is a bit of work that needs done to enable existing servers to use these great features.  Our goal for RTM is to handle this automatically during the upgrade process, but in the interim the process is still very much a manual process. 

Hakan Eskici, one of the other program managers for TFS has been working on upgrading team projects to use new TFS 2010 features, and has posted several posts on the matter.  Check them out on his blog: http://blogs.msdn.com/hakane/

Enable Branch Visualization in Upgraded Team Projects (TFS 2010 Beta1)

Sample Script to Enable New Features in Upgraded Team Projects (TFS 2010 Beta1)

Posted by mmitrik | 1 Comments

What’s new in Version Control in TFS 2010?

Something I’ve been waiting to do is to blog about all of the great features we have added to version control in TFS 2010.  Now that the Beta 1 bits have been published, I’m planning a series of blog posts to cover each feature we’ve added to the product.  Brian Harry has started some of this on his blog, but he hasn’t gone into version control in detail.  I’m planning a series of posts to provide a very detailed look into what’s coming for 2010 so that folks that have downloaded the Beta can follow along, and those that haven’t can get a comprehensive look.

Here’s what my current line up looks like:

  • First class branches
  • New branch/merge permissions
  • Reparenting Branches
  • Visualizing Branch Hierarchies
  • History
  • Tracking Changesets
  • Labels
  • Resolving conflicts
  • Properties

I’m sure there will be more topics I’ll think of later, but that should keep me busy for a while.  If you have another topic you’re interested in learning more about, please let me know!

Posted by mmitrik | 2 Comments
Filed under: , ,

Changing to Slot Mode in TFS 2010 Version Control

In TFS 2010, one of the more significant changes that we made to our version control platform was how we identify items.  Previously, version control operated in what we called “item mode” and in TFS 2010 it operates in “slot mode”.  To better understand the motivation and impact of these changes, and what “item mode” and “slot mode” actually mean, I’ve decided to provide some background and detail into the changes we’ve made.

Item Mode Explained

In 2008, items are identified by an integer ItemID.  Each new item added to the system received a unique integer ID that is used to refer to that item.  Additionally, each item has a path, which end users of the system typically use to refer to items that they store on the server.  Using this combination of ItemIDs and paths to refer to items worked in many situations, and was a design choice that enabled the rename feature (i.e. renaming an item changed its path, but not its ID).  In many cases, we’ve referred to this as operating in “item mode”, that is, users act on items in the system.  Items are added, edited, and renamed, and they are the same item even with a new name and modified content.  The most evident place this is seen is in History, where history on, say, foo.cs will show changes made to the old name, bar.cs, because it is actually the same item.

The Switch to Slot Mode

While using ItemID and path worked in many cases, there are several situations that allow items to share a path but have differing ItemIDs.  Over time, these scenarios began to complicate our code, and there were even scenarios that we couldn’t solve with this approach.  This led us to change the design so that the ItemID and the path for an item are synonymous – that is, an ItemID is unique to a path.  Practically, this means that when an item is renamed, it effectively becomes a new item (because it has a new path). 

Unlike item mode, this concept of slot mode means that users operate on a namespace slot (i.e. $/Proj/foo.cs), not an item that exists at some path.  Again, it is easy to think about this from the perspective of History.  In the slot mode world, asking for history on foo.cs will only show you what has happened to files at that path.  In the previous example, you wouldn’t see edits from the item when it was named bar.cs.

There were at least two primary motivating factors behind our decision to make these changes: improving the robustness of Merge, and improving the performance of the system.  In some cases, merge can actually block a user trying to check-in changes, and they are forced to perform a second merge to get all of the changes.  While these cases aren’t extremely common, they are severe enough that we decided we needed to change the system to make it more robust.  Merge is one aspect of version control that is inherently complex, and the implementation of rename using ItemIDs further complicated the problem.  Using the path as the identifier allowed us to significantly reduce complexity of the system, leading to a system that is easier to maintain, and one that performs better than the previous implementation.

Where will I see changes when using the product?

While the primary motivation was to improve merge, there are a bunch of places in the system where behaviors are changing.  Here is a list of the most significant of those changes (§ indicates a change coming in Beta 2):

Merge Merges will always be performed in slot mode, or on the path.  That is, the content of an item at a path in the source branch will be merged over to an item with the same relative path in the target branch.  In cases where items are renamed in the source branch, the history for the item in the target branch will indicate where the content was merged from.

 
Rename Now implemented as a branch + delete behind the scenes (new name is branched from the old, then the old name is deleted).  This allows traceability in History, but allows us to get around the problems with merging renames (see Add, Rename, Add scenario).  We also added a new “source rename” bit to identify items that were deleted because they were renamed.

History History will default to slot mode, that is, renames won’t be followed automatically (§).  Because renames are branches behind the scenes, the history of an item before a rename will be followed exactly like a branch (§).  For items that have been renamed “out” to another name, the history will have an entry that shows the “source rename” change type.

Changeset Details Items that were renamed will show the “source rename” change type on the old name (§).  The new name will continue to show as a “rename”.

Source Control Explorer The option to show deleted items will show the old names of files and folders in addition to items that were simply deleted (§).

A Scenario: Add, Rename, Add

Since this is all pretty complex stuff, I think scenarios are the best way to show how the system is changing.  This “Add, Rename, Add” scenario, as we like to call it, is one example that a 2008 server would be blocked on that a 2010 server now handles with ease.  Here’s what it looks like:

  1. Add a file to $/Proj/Main/File1.cs
  2. Branch $/Proj/Main to $/Proj/Dev
  3. Rename the file on the Dev branch to $/Proj/Dev/File2.cs
  4. Add a second file to $/Proj/Dev/File1.cs  (Note that this file overlaps the old namespace slot of File2.cs)
  5. Merge $/Proj/Dev to $/Proj/Main

At this point, most users would expect the system to be able to correctly merge the two files back up to the Main branch, resulting in two files, File1.cs and File2.cs, that have contents that match the corresponding files in the Dev branch.  However, the problem is that in 2008, all file renames were treated as conflicts when merging, so the user would have needed to accept the merge of the rename before the new file could be added in its place.  Since the system can’t handle that, users were forced into merging over the rename first, and then merging over the add.  Needless to say, this is less than ideal, and it’s a simple case – imagine if we had conflicting edits on the Main branch!

With the new changes we’ve made, the rename of the file on the Dev branch causes a new item, File2.cs, to be branched over to Main, and the content from the new File1.cs goes into the File1.cs on the target branch.  The result is that the merge is pended successfully, no conflicts are created, and the merged can be checked in as one changeset.  After the check in to Main, viewing the History for File2.cs on Main will show a change type of “merge, branch”, with the merged change coming from File2.cs on Dev (where the file was renamed from File1.cs). 

image

The History on File1.cs on Main will show a change type of “merge, edit”, to reflect the change in the content that was merged from the Dev branch.  In this screenshot, notice that changeset 26 has a change type of “add, source rename”.  This is because in this example, I renamed File1.cs to File2.cs and added a new file named File1.cs in the same changeset.

image

Forward Compatibility for 2008 Clients

All of these platform changes in TFS 2010 have had a fairly large impact on the version control client.  While we always aim to preserve forward and backwards compatibility, these changes were substantial enough that the old clients accessing 2010 servers no longer provide an optimal experience.  John Nierenberg has already blogged about some of the compatibility issues on the WIT team blog, and in the future we’ll post future updates about our plans to address these issues.

Posted by mmitrik | 6 Comments
Filed under: , , ,

CSS Blog Post on Partial Merges

Ladislau Szomoru, a CSS Engineer for TFS, just posted a great blog post about partial merges on the CSS team’s blog.  Partial merges are fairly undocumented in most of the TFS documentation, and this blog post serves as a good supplement for anyone looking for details on partial merges as well as how and when merge candidates are shown.

Posted by mmitrik | 1 Comments
Filed under: , ,

How To: Unlock/Undo a File that is Locked/Checked out

As the number of TFS users grows inside MS, rarely does a day go by where I don’t get forwarded a question where someone is asking how to do something in Version Control.  In the past, I’d simply respond to the person that asked the question, and go on my way.  Recently I realized that I should start blogging the answers to these questions so that the entire community can benefit from the answers.  My previous post was one of these questions, as is this one.  From now on, I’ll start tagging any posts on how to do something as a “How To” post.  And now, on to the answer about undo/unlock…

 

How to: Unlock/Undo an File that is Locked/Checked out

Any user that wants to undo any pending change created by another user will need the UndoOther permission.  With this permission, any item (for which the permission is granted) can have its pending changes undone.  To undo a pending lock, the UnlockOther permission is needed in addition to the UndoOther permission.  Once these permissions are granted, a user can go to the command line and undo the change using the tf undo command:

tf undo /workspace:WorkspaceName;WorkspaceOwner $/PathToTheItemToUndo

What does it actually mean to undo another person’s change?  It means that the server’s record of the add, edit, rename, delete, etc, will be removed, and users will no longer see the pending changes in SCE.  One important fact to note is that this will not revert any local file contents that were modified as a part of the pending change.

Say for example, I checked out a file and edited the contents of that file, saving my changes locally.  This would pend an edit for that file, and any user with permissions to view that file would see my edit.  Now, if an administrator with UndoOther permission came along and performed an undo of my change on the file, that would make my pending edit disappear from the server, and users (including myself) would no longer see the file marked as having an edit. 

What does it mean for the owner of the pending change to have it undone by another user?  Using the previous example, if I went to the mapped location where the file was saved on disk, that file would still be saved with the edits that I made.  It would continue to be marked as writable, preventing it from being automatically overwritten if I performed a Get Latest.  To return the file to the state on the server, I’ll need to perform a force Get operation (since the server thinks mine is unmodified it won’t download with a normal Get).  If another user updates the file and checks it in, when I perform a Get, I’ll get a writable file conflict where I can overwrite my file, or merge the contents.

 

Details on the Undo Command: http://msdn.microsoft.com/en-us/library/c72skhw4.aspx

Details on TFS Permissions: http://msdn.microsoft.com/en-us/library/ms252587.aspx

Posted by mmitrik | 1 Comments
Filed under: , ,
More Posts Next page »
 
Page view tracker