{"id":953,"date":"2010-06-07T20:18:00","date_gmt":"2010-06-07T20:18:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/buckh\/2010\/06\/07\/tfs-2010-version-control-upgrade-bug-in-handling-labels-merges\/"},"modified":"2010-06-07T20:18:00","modified_gmt":"2010-06-07T20:18:00","slug":"tfs-2010-version-control-upgrade-bug-in-handling-labels-merges","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/buckh\/tfs-2010-version-control-upgrade-bug-in-handling-labels-merges\/","title":{"rendered":"TFS 2010 version control upgrade bug in handling labels, merges"},"content":{"rendered":"<p><strong>UPDATE [6\/12\/2010]&nbsp; <\/strong>The patch is now available on MSDN Code Gallery <a href=\"http:\/\/code.msdn.microsoft.com\/KB2135068%20\">here<\/a>.&nbsp; You must install it after you complete the MSI setup portion (the files need to be on the machine and registered in Windows first) and before the upgrade wizard (it&rsquo;s the upgrade process, not setup that needs to be patched).<\/p>\n<ol>\n<li>Run the TFS 2010 installation and quit\/cancel once you get to the upgrade wizard (do not upgrade).<\/li>\n<li>Install the patch.<\/li>\n<li>Go to Start &ndash;&gt; All Programs &ndash;&gt; Microsoft Team Foundation Server 2010 &ndash;&gt; Team Foundation Administration Console and then launch the upgrade wizard again.<\/li>\n<li>Go through the upgrade process as usual.<\/li>\n<\/ol>\n<p>&#8212;<\/p>\n<p>We discovered a couple of bugs in version control when upgrading to TFS 2010.&nbsp; They affect labels and future merges, and whether or not you are affected depends on what renames you have done on files in labels and branches.&nbsp; We are currently testing a fix that we expect to release shortly.&nbsp; The fix, when released, must be installed <em>before<\/em> upgrading to TFS 2010.<\/p>\n<p>The issues are described in a <a href=\"http:\/\/support.microsoft.com\/kb\/2193796\">KB article<\/a>, which <a href=\"http:\/\/blogs.msdn.com\/b\/mitrik\/archive\/2010\/06\/04\/version-control-upgrade-kb-article-published.aspx\">Matt published<\/a> today.&nbsp; Here are the symptoms that manifest after an upgrade without the fix.<\/p>\n<ul>\n<li>Labels that were created before the upgrade are entirely empty.&nbsp; Labels could be also have incorrect contents. <\/li>\n<li>The merge wizard in Visual Studio does not display all valid merge targets for a given source path\/branch. <\/li>\n<li>During merging, merge candidates are shown for changes that were already merged prior to the upgrade. <\/li>\n<\/ul>\n<p>If you&rsquo;ve already upgraded to 2010 from a previous release, you&rsquo;ll need to decide whether there are labels that are critical for you.&nbsp; If there are, fixing the label problem after an upgrade without the fix will likely require access to the original version control database prior to the upgrade.&nbsp; You&rsquo;ll need to contact customer support to get help with fixing the affected labels (customer support will not charge for incidents related to this upgrade bug).<\/p>\n<p>The merge issue is simpler to recover from, and it&rsquo;s largely an annoyance.&nbsp; You can read the KB article to understand what must happen.&nbsp; The fix for the issue of merge targets not showing up in the merge wizard is to do a non-recursive baseless merge of the source to the target via the command line (e.g., tf merge \/baseless dirA dirB).&nbsp; Then the target will show.&nbsp; The children will end up being baselessly merged, which will be annoying and tedious, but you will be able to recover and move forward.<\/p>\n<p>The underlying cause of both problems is the handling of renames during the upgrade, as described by the KB article.&nbsp; In TFS 2010, we changed the schema of version control to change something called an item ID to effectively become a path ID. In both 2005 and 2008, every item added or branched in version control got a unique item ID forever.&nbsp; So no matter what name or path changed to, the item ID never changed.&nbsp; This allowed for completely tracking renames forever, no matter how complex.&nbsp; However, it came at the price of introducing the confusing concept of a deletion ID, since a path could have more than one item at a time if there were at least one deleted item, and the concept of a namespace conflict, which occurs when two different non-deleted items (each has a different item ID in 2005\/2008) tried to occupy the same path at the same time.&nbsp; If you&rsquo;ve ever had to resolve namespace conflicts in 2005 or 2008, particularly as a result of a merge, you know the pain I&rsquo;m talking about. It also resulted in significant complication of the SQL, resulting in lower performance and scalability than otherwise would have been possible.<\/p>\n<p>So, we changed the schema such that a path uniquely identifies an item, turning the item ID into a path ID.&nbsp; Matt talks about some of the implications of that in his post, <a href=\"http:\/\/blogs.msdn.com\/b\/mitrik\/archive\/2009\/05\/28\/changing-to-slot-mode-in-tfs-2010-version-control.aspx\">Changing to Slot Mode in TFS 2010 Version Control<\/a>.&nbsp; Having used the server with the schema change for more than a year now internally, the change produced a faster, more scalable version control server, and the elimination of things like namespace conflicts has made merging less painful.<\/p>\n<div class=\"wlWriterSmartContent\" id=\"scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6009671b-9cdf-441b-83ef-dcf7f07eecbd\" style=\"padding-bottom: 0px;margin: 0px;padding-left: 0px;padding-right: 0px;float: none;padding-top: 0px\">Technorati Tags: <a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/tfs+2010\">tfs 2010<\/a>,<a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/team+foundation+server+2010\">team foundation server 2010<\/a>,<a rel=\"tag\" href=\"http:\/\/technorati.com\/tags\/version+control\">version control<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>UPDATE [6\/12\/2010]&nbsp; The patch is now available on MSDN Code Gallery here.&nbsp; You must install it after you complete the MSI setup portion (the files need to be on the machine and registered in Windows first) and before the upgrade wizard (it&rsquo;s the upgrade process, not setup that needs to be patched). Run the TFS [&hellip;]<\/p>\n","protected":false},"author":94,"featured_media":10268,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[8,11],"class_list":["post-953","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-team-foundation","tag-tfs-2010"],"acf":[],"blog_post_summary":"<p>UPDATE [6\/12\/2010]&nbsp; The patch is now available on MSDN Code Gallery here.&nbsp; You must install it after you complete the MSI setup portion (the files need to be on the machine and registered in Windows first) and before the upgrade wizard (it&rsquo;s the upgrade process, not setup that needs to be patched). Run the TFS [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/953","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/users\/94"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/comments?post=953"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/953\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media\/10268"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media?parent=953"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/categories?post=953"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/tags?post=953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}