{"id":10295,"date":"2005-11-16T12:16:56","date_gmt":"2005-11-16T17:16:56","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/buckh\/?p=10295"},"modified":"2019-05-06T12:17:53","modified_gmt":"2019-05-06T16:17:53","slug":"power-toy-tfpt-exe","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/buckh\/power-toy-tfpt-exe\/","title":{"rendered":"Power Toy: tfpt.exe"},"content":{"rendered":"<p><strong>[UPDATE 8\/9\/2007]<\/strong>&nbsp; I fixed the&nbsp;broken link to the power&nbsp;tools page.&nbsp;<\/p>\n<p><strong>[UPDATE 9\/8\/2006]<\/strong>&nbsp; TFPT is now available in its own&nbsp;small download: <a href=\"http:\/\/go.microsoft.com\/?linkid=5422499\">http:\/\/go.microsoft.com\/?linkid=5422499<\/a>!&nbsp; You no longer need to download the VS SDK.&nbsp; You can find more information about the September &#8217;06 release&nbsp;<a href=\"http:\/\/blogs.msdn.com\/buckh\/archive\/2006\/09\/07\/tfs_power_toys_tfpt.aspx\" mce_href=\"http:\/\/blogs.msdn.com\/buckh\/archive\/2006\/09\/07\/tfs_power_toys_tfpt.aspx\">here<\/a>.<\/p>\n<p>Back at the start of October, I wrote about the <a href=\"http:\/\/blogs.msdn.com\/buckh\/archive\/2005\/10\/1.aspx\" mce_href=\"http:\/\/blogs.msdn.com\/buckh\/archive\/2005\/10\/1.aspx\">tfpt.exe power toy<\/a>.&nbsp; The beta 3 version has been released with the <a href=\"https:\/\/affiliate.vsipmembers.com\/\" mce_href=\"https:\/\/affiliate.vsipmembers.com\/\">October SDK release<\/a>.&nbsp; In the future, we plan to have a better vehicle for delivering it.<\/p>\n<p>Here&#8217;s the documentation, minus the screenshots, in case you are trying to decide whether to download the SDK.&nbsp;&nbsp;The documentation is included in the SDK release as a Word document, including screenshots of the various dialogs (yes, most commands have a GUI, but you can still use the commands from scripts by specifying the \/noprompt option).<\/p>\n<p><strong>Review<\/strong>&nbsp; The only command not documented is the review command, which is very handy for doing code reviews.&nbsp; When you run &#8220;tfpt review&#8221; you get a dialog with a list of your pending changes that you can check off as you diff or view each one.<\/p>\n<p>I hope you find these useful.&nbsp; Please leave a comment, and let us know what you think.<\/p>\n<blockquote style=\"MARGIN-RIGHT: 0px\" dir=\"ltr\">\n<div class=\"Section1\">\n<p style=\"TEXT-ALIGN: center\" class=\"MsoNormal\" align=\"center\"><span style=\"FONT-FAMILY: Verdana; FONT-SIZE: 28pt; mso-bidi-font-family: Arial\">Team Foundation <span class=\"SpellE\">PowerToys<\/span><?xml:namespace prefix = o ns = \"urn:schemas-microsoft-com:office:office\" \/><\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\"><span style=\"FONT-SIZE: 18pt\">Introduction<\/p>\n<p><\/span><\/b><\/p>\n<p class=\"MsoNormal\">The Team Foundation <span class=\"SpellE\">PowerToys<\/span> (TFPT) application provides extra functionality for use with the Team Foundation version control system. The Team Foundation <span class=\"SpellE\">PowerToys<\/span> application is not supported by Microsoft.<\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\">Five separate operations are supported by the TFPT application: <span class=\"GramE\">unshelve,<\/span> rollback, online, <span class=\"SpellE\">getcs<\/span>, and <span class=\"SpellE\">uu<\/span>. They are all invoked at the command line using the tfpt.exe application. Some of the TFPT commands have graphical interfaces.<\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\"><span style=\"FONT-SIZE: 18pt\">Unshelve (Unshelve + Merge)<\/p>\n<p><\/span><\/b><\/p>\n<p class=\"MsoNormal\">The unshelve operation supported by tf.exe does not allow shelved changes and local changes to be merged together. <span class=\"SpellE\">TFPT&rsquo;s<\/span> more advanced unshelve operation allows this to occur under certain circumstances.<\/p>\n<p class=\"MsoNormal\">If an item in the local workspace has a pending change that is an edit, and the user uses TFPT to unshelve a change from a shelveset, and that shelved change is also an edit, then the changes can be merged with a three-way merge.<\/p>\n<p class=\"MsoNormal\">In all other cases where changes exist both in the local workspace and in the shelveset, the user can choose between the local and shelved changes, but no combination of the changes can be made. To invoke the TFPT unshelve tool, execute<\/p>\n<p class=\"MsoNormal\"><span style=\"FONT-SIZE: 11pt\"><\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span class=\"GramE\"><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">tfpt<\/span><\/span><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\"> unshelve<\/span><span style=\"FONT-SIZE: 11pt\"><\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span class=\"GramE\">at<\/span> the command line. This will invoke the graphical interface for the TFPT unshelve tool:<\/p>\n<p class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\">Running TFPT Unshelve on a Specified Shelveset<\/b><\/p>\n<p class=\"MsoNormal\">To skip this dialog, you can specify the shelveset name and owner on the command line, with <\/p>\n<p class=\"MsoNormal\"><span class=\"GramE\"><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">tfpt<\/span><\/span><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\"> unshelve <span class=\"SpellE\"><i style=\"mso-bidi-font-style: normal\">shelvesetname<\/i>;<i style=\"mso-bidi-font-style: normal\">shelvesetowner<\/i><\/span><\/span><i style=\"mso-bidi-font-style: normal\"><span style=\"FONT-SIZE: 11pt\"><\/p>\n<p><\/span><\/i><\/p>\n<p class=\"MsoNormal\">If you are the owner of the shelveset, then specifying the shelveset owner is optional.<\/p>\n<p class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\">Selecting Individual Items <span class=\"GramE\">Within<\/span> a Shelveset for Unshelving<\/b><\/p>\n<p class=\"MsoNormal\">If you specify a shelveset on the command line as in &ldquo;Running TFPT Unshelve on a Specified Shelveset,&rdquo; or if you select a shelveset in the window above and click Details, you are presented with the Shelveset Details window, where you can select individual changes within a shelveset to unshelve.<\/p>\n<p class=\"MsoNormal\">You can check and uncheck the boxes beside individual items to mark or unmark them for unshelving. Click the Unshelve button to proceed.<\/p>\n<p class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\">Unshelve Conflicts<\/b><\/p>\n<p class=\"MsoNormal\">When you press the Unshelve button, all changes in the shelveset for which there is no conflicting local change will be <span class=\"SpellE\">unshelved<\/span>. You can see the status of this unshelve process in the Command Prompt window from which you started the TFPT unshelve tool.<\/p>\n<p class=\"MsoNormal\">There may, however, be conflicts which must be resolved for <span class=\"GramE\">the unshelve<\/span> to proceed. If any conflicts are encountered, the conflicts window is displayed:<\/p>\n<p class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\">Edit-Edit Conflicts<\/p>\n<p><\/b><\/p>\n<p class=\"MsoNormal\">To resolve an edit-edit conflict, select the conflict in the list view and click the Resolve button. The Resolve Unshelve Conflict window appears.<\/p>\n<p class=\"MsoNormal\">For edit-edit conflicts, there are three possible conflict resolutions.&nbsp;<\/p>\n<ul style=\"MARGIN-TOP: 0in\" type=\"disc\">\n<li style=\"TEXT-ALIGN: justify; mso-list: l5 level1 lfo3; tab-stops: list .5in\" class=\"MsoNormal\">Taking the local change abandons the unshelve operation for this particular change (it would be as if the change had not been selected for unshelving). \n<\/li>\n<li style=\"TEXT-ALIGN: justify; mso-list: l5 level1 lfo3; tab-stops: list .5in\" class=\"MsoNormal\">Taking the shelved change first undoes the local change, and then unshelves the shelved change. This results in the local change being completely lost. \n<\/li>\n<li style=\"TEXT-ALIGN: justify; mso-list: l5 level1 lfo3; tab-stops: list .5in\" class=\"MsoNormal\">Clicking the Merge button first attempts to auto-merge the two changes together, and if it cannot do so without conflict, attempts to invoke a pre-configured third-party merge tool to merge the changes together. The local change is not lost by choosing to merge &ndash; if the merge fails, the local change remains. <\/li>\n<\/ul>\n<p class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\">The Auto-Merge All Button<\/p>\n<p><\/b><\/p>\n<p class=\"MsoNormal\">The Auto-Merge All button is enabled when there are edit-edit conflicts remaining that are unresolved. Clicking the button goes through the edit-edit conflicts and attempts to auto-merge the changes together. For each conflict, if the merge succeeds, then the conflict is resolved. If not, then the conflict is marked as &ldquo;Requires Manual Merge.&rdquo; In order to resolve conflicts marked as &ldquo;Requires Manual Merge,&rdquo; you must select the conflict and click the Resolve&hellip; button. Clicking the Merge button will then start the configured third-party merge tool. If no third-party merge tool is configured, then the conflict must be resolved by selecting to take the local change or take the shelved change.<\/p>\n<p class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\">Generic Conflicts<\/b><\/p>\n<p class=\"MsoNormal\">Any other conflict (a local delete with a shelved edit, for example) is a generic conflict that cannot be merged. <\/p>\n<p class=\"MsoNormal\">There is no merge option for generic conflicts. You must choose between keeping the local change and taking the shelved change.<\/p>\n<p class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\">Aborting the Unshelve Process<\/b><\/p>\n<p class=\"MsoNormal\">Because the unshelving process makes changes to the local workspace, and because the potential exists to discover a problem halfway through the unshelve process, the TFPT Unshelve application makes a backup of the local workspace before starting its execution if there are pending local changes. This backup is stored as a shelveset on the server. In the event of an abort, all local pending changes are undone and the backup shelveset is <span class=\"SpellE\">unshelved<\/span> to the local workspace. This restores the workspace to the state it was in before the unshelve application was run.<\/p>\n<p class=\"MsoNormal\">The backup shelveset is named by adding _backup and then a number to the name of the shelveset that was <span class=\"SpellE\">unshelved<\/span>. For example, if the shelveset <span class=\"SpellE\">TestSet<\/span> were <span class=\"SpellE\">unshelved<\/span>, the backup shelveset would be named TestSet_backup1. Up to 9 backup <span class=\"SpellE\">shelvesets<\/span> can exist for each shelveset.<\/p>\n<p class=\"MsoNormal\">With the backup shelveset, changes made during an unshelve operation can be undone after <span class=\"GramE\">the unshelve<\/span> is completed but before the changes are checked in, by undoing all changes in the workspace and then unshelving the backup shelveset:<\/p>\n<p class=\"MsoNormal\"><span class=\"SpellE\"><span class=\"GramE\"><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">tf<\/span><\/span><\/span><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\"> undo * \/r<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span class=\"SpellE\"><span class=\"GramE\"><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">tf<\/span><\/span><\/span><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\"> <span class=\"SpellE\">unshelve<\/span> TestSet_backup1<\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\"><span style=\"FONT-SIZE: 18pt\">Rollback<\/p>\n<p><\/span><\/b><\/p>\n<p class=\"MsoNormal\">Sometimes it may be necessary to undo a checkin of a changeset. This operation is directly not supported by Team Foundation, but with the TFPT rollback tool you can <span class=\"SpellE\">pend<\/span> changes which attempt to undo any changes made in a specified changeset.<\/p>\n<p class=\"MsoNormal\">Not all changes can be rolled back, but in most scenarios the TFPT rollback command works. In any event, the user is able to review the changes that TFPT <span class=\"SpellE\">pends<\/span> before checking them in.<\/p>\n<p class=\"MsoNormal\">To invoke the TFPT rollback tool, execute<\/p>\n<p class=\"MsoNormal\"><span class=\"GramE\"><span style=\"FONT-FAMILY: 'Courier New'\">tfpt<\/span><\/span><span style=\"FONT-FAMILY: 'Courier New'\"> rollback<\/span><\/p>\n<p class=\"MsoNormal\"><span class=\"GramE\">at<\/span> the command line. This will invoke the graphical user interface (GUI) for the TFPT rollback tool. Please note that there must not be any changes in the local workspace for the rollback tool to run. Additionally, a prompt will be displayed to request permission to execute a get operation to bring the local workspace up to the latest version.<\/p>\n<p class=\"MsoNormal\">The Find Changesets window is presented when the TFPT rollback tool is started. The changeset to be rolled back can be selected from the Find Changesets window.<\/p>\n<p class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\">Specifying the Changeset on the Command Line<\/p>\n<p><\/b><\/p>\n<p class=\"MsoNormal\">The Find Changesets window can be skipped by supplying the \/<span class=\"SpellE\">changeset<span class=\"GramE\">:<i style=\"mso-bidi-font-style: normal\">changesetnum<\/i><\/span><\/span> command line parameter, as in the following example:<\/p>\n<p class=\"MsoNormal\"><span class=\"GramE\"><span style=\"FONT-FAMILY: 'Courier New'\">tfpt<\/span><\/span><span style=\"FONT-FAMILY: 'Courier New'\"> rollback \/changeset:3<\/span><\/p>\n<p class=\"MsoNormal\">Once the changeset is selected, either by using the Find Changesets window or specifying a changeset using a command-line parameter, the Roll Back Changeset window is displayed.<\/p>\n<p class=\"MsoNormal\">Each change is listed with the type of change that will be counteracted by a rollback change.<\/p>\n<table style=\"BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-COLLAPSE: collapse; MARGIN-LEFT: 59.4pt; BORDER-TOP: medium none; BORDER-RIGHT: medium none; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 480; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext\" class=\"MsoTableGrid\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"mso-yfti-irow: 0; mso-yfti-firstrow: yes\">\n<td style=\"BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 2.25in; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\">To rollback a:<\/p>\n<p><\/b><\/p>\n<\/td>\n<td style=\"BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 2.5in; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt\" valign=\"top\" width=\"240\">\n<p class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\">The tool <span class=\"SpellE\">pends<\/span> a:<\/p>\n<p><\/b><\/p>\n<\/td>\n<\/tr>\n<tr style=\"mso-yfti-irow: 1\">\n<td style=\"BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 2.25in; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\">Add, Undelete, or Branch<\/p>\n<\/td>\n<td style=\"BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 2.5in; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt\" valign=\"top\" width=\"240\">\n<p class=\"MsoNormal\">Delete<\/p>\n<\/td>\n<\/tr>\n<tr style=\"mso-yfti-irow: 2\">\n<td style=\"BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 2.25in; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\">Rename<\/p>\n<\/td>\n<td style=\"BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 2.5in; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt\" valign=\"top\" width=\"240\">\n<p class=\"MsoNormal\">Rename<\/p>\n<\/td>\n<\/tr>\n<tr style=\"mso-yfti-irow: 3\">\n<td style=\"BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 2.25in; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\">Delete<\/p>\n<\/td>\n<td style=\"BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 2.5in; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt\" valign=\"top\" width=\"240\">\n<p class=\"MsoNormal\">Undelete<\/p>\n<\/td>\n<\/tr>\n<tr style=\"mso-yfti-irow: 4; mso-yfti-lastrow: yes\">\n<td style=\"BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 2.25in; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\">Edit<\/p>\n<\/td>\n<td style=\"BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 2.5in; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt\" valign=\"top\" width=\"240\">\n<p class=\"MsoNormal\">Edit<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"MsoNormal\"><span class=\"SpellE\">Unchecking<\/span> a change in the Roll Back Changeset window marks it as a change not to be rolled back. There are cases involving rolling back deletes which may result in unchecked items being rolled back. If this occurs, clear warnings to indicate this are displayed in the command prompt window. If this is unsatisfactory, undo the changes pended by the rollback tool.<\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\">When the changes to roll back have been checked appropriately, pressing the Roll Back button starts the rollback. If no failures or merge situations are encountered, then the changes should be pended and the user returned to the command prompt:<\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\">Merge scenarios can arise when a rollback is attempted on a particular edit change to an item that occurred in-between two other edit changes. There are two possible edit rollback scenarios:&nbsp;<\/p>\n<ol style=\"MARGIN-TOP: 0in\" type=\"1\">\n<li style=\"mso-list: l6 level1 lfo6; tab-stops: list .5in\" class=\"MsoNormal\">An edit is being rolled back on an item, and the edit to roll back is the latest change to the content of the item.\n<p>&nbsp;<\/p>\n<\/li>\n<\/ol>\n<p style=\"MARGIN-LEFT: 1in\" class=\"MsoNormal\">This is the most common case. Most rollbacks are performed on changesets that were just checked in. If the edit was just checked in, it is unlikely that another user has edited it in the intervening time.<\/p>\n<p style=\"MARGIN-LEFT: 1in\" class=\"MsoNormal\">To roll back this change, an edit is pended on the item, and the content of the item is reverted to the content from before the changeset to roll back.<\/p>\n<p>&nbsp;<\/p>\n<\/p>\n<ol style=\"MARGIN-TOP: 0in\" type=\"1\" start=\"2\">\n<li style=\"mso-list: l6 level1 lfo6; tab-stops: list .5in\" class=\"MsoNormal\">An edit is being rolled back on an item, and the edit to roll back is not the latest change to the content of the item.\n<p>&nbsp;<\/p>\n<\/li>\n<\/ol>\n<p style=\"MARGIN-LEFT: 1in\" class=\"MsoNormal\">This is a three-way merge scenario, with the version to roll back as the base, and the latest version and the previous version as branches. If there are no conflicts, then the changes from the change to roll back (and only the change to roll back) are extracted from the item, preserving the changes that came after the change to roll back.<\/p>\n<p>&nbsp;<\/p>\n<\/p>\n<p class=\"MsoNormal\">In the event of a merge scenario, the merge window is displayed:<\/p>\n<p class=\"MsoNormal\">To resolve a merge scenario, select the item and click the Merge button. An auto-merge will first be attempted, and if it fails, the third-party merge tool (if configured) will be invoked to resolve the merge. If no third-party merge tool is configured, and the auto-merge fails, then the item cannot be rolled back:<\/p>\n<p class=\"MsoNormal\">The Auto-Merge All button attempts an auto-merge on each of the items in the merge list, but does not attempt to invoke the third-party merge tool.<\/p>\n<p class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\">Failures<\/p>\n<p><\/b><\/p>\n<p class=\"MsoNormal\">Any changes which fail to roll back will also be displayed in the same window.<\/p>\n<p class=\"MsoNormal\"><a title=\"Online\" name=\"Online\"><\/a><b style=\"mso-bidi-font-weight: normal\"><span style=\"FONT-SIZE: 18pt\">Online<\/p>\n<p><\/span><\/b><\/p>\n<p class=\"MsoNormal\">With Team Foundation, a server connection is necessary to check files in or out, to delete files, to rename files, etc. The TFPT online tool makes it easier to work without a server connection for a period of time by providing functionality that informs the server about changes made in the local workspace.<\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\">Non-checked-out files in the local workspace are by default read-only. The user is expected to check out the file with the <span class=\"SpellE\"><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">tf<\/span><\/span><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\"> checkout<\/span> command before editing the file. When working in this <\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\">When working offline with the intent to sync up later by using the TFPT online tool, users must adhere to a strict workflow:<\/p>\n<p>&nbsp;<\/p>\n<\/p>\n<ul style=\"MARGIN-TOP: 0in\" type=\"disc\">\n<li style=\"TEXT-ALIGN: justify; mso-list: l0 level1 lfo10; tab-stops: list .5in\" class=\"MsoNormal\">Users without a server connection manually remove the read-only flag from files they want to edit. Non-checked-out files in the local workspace are by default read-only, and when a server connection is available the user must check out the file with the <span class=\"SpellE\"><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">tf<\/span><\/span><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\"> checkout<\/span> command before editing the file. When working offline, the DOS command &ldquo;<span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">attrib &ndash;r<\/span>&rdquo; should be used. \n<\/li>\n<li style=\"TEXT-ALIGN: justify; mso-list: l0 level1 lfo10; tab-stops: list .5in\" class=\"MsoNormal\">Users without a server connection add and delete files they want to add and delete. If not checked out, files selected for deletion will be read-only and must be marked as writable with &ldquo;<span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">attrib &ndash;r<\/span>&rdquo; before deleting. Files which are added are new and will not be read-only. \n<\/li>\n<li style=\"TEXT-ALIGN: justify; mso-list: l0 level1 lfo10; tab-stops: list .5in\" class=\"MsoNormal\">Users must not rename files while offline, as the TFPT online tool cannot distinguish a rename from a deletion at the old name paired with <span class=\"GramE\">an add<\/span> at the new name. \n<\/li>\n<li style=\"TEXT-ALIGN: justify; mso-list: l0 level1 lfo10; tab-stops: list .5in\" class=\"MsoNormal\">When connectivity is re-acquired, users run the TFPT online tool, which scans the directory structure and detects which files have been added, edited, and deleted. The TFPT online tool <span class=\"SpellE\">pends<\/span> changes on these files to inform the server what has happened.&nbsp;\n<p>&nbsp;<\/p>\n<\/li>\n<\/ul>\n<p class=\"MsoNormal\">To invoke the TFPT online tool, execute<\/p>\n<p>&nbsp;<\/p>\n<\/p>\n<p class=\"MsoNormal\"><span class=\"GramE\"><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">tfpt<\/span><\/span><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\"> online<\/span><span style=\"FONT-SIZE: 11pt\"><\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span class=\"GramE\">at<\/span> the command line. The online tool will begin to scan your workspace for writable files and will determine what changes should be pended on the server.<\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\">By default, the TFPT online tool does not detect deleted files in your local workspace, because to detect deleted files the tool must transfer significantly more data from the server. To enable the detection of deleted files, pass the <span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">\/deletes<\/span> command line option.<\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\">When the online tool has determined what changes to <span class=\"SpellE\">pend<\/span>, the <span class=\"GramE\">Online<\/span> window is displayed.<\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\">Individual changes may be deselected here if they are not desired. When the Pend Changes button is pressed, the changes are actually pended in the workspace. <\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\"><i style=\"mso-bidi-font-style: normal\">Important Note<b style=\"mso-bidi-font-weight: normal\">:<\/b><\/i> If a file is edited while offline (by marking the file writable and editing it), and the TFPT online tool <span class=\"SpellE\">pends<\/span> an edit change on it, a subsequent undo will result in the changes to the file being lost. It is therefore not a good idea to try pending a set of changes to go online, decide to discard them (by doing an undo), and then try again, as the changes will be lost in the undo. Instead, make liberal use of the <span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">\/preview<\/span> command line option (see below), and <span class=\"SpellE\">pend<\/span> changes only once.<\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\">Preview Mode<\/b><\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\">The Online window displayed above is a graphical preview of the changes that will be pended to bring the workspace online, but a command-line version of this functionality is also available. By passing the \/preview and \/<span class=\"SpellE\">noprompt<\/span> options on the command line, a textual representation of the changes that the TFPT online tool thinks should be pended can be displayed.<\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\"><span class=\"GramE\"><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">tfpt<\/span><\/span><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\"> online \/<span class=\"SpellE\">noprompt<\/span> \/preview<\/span><\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\">Inclusions<\/b><\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\">The TFPT online tool by default operates on every file in the workspace. Its focus can be more directed (and its speed improved) by including only certain files and folders in the set of items to inspect for changes. <span class=\"SpellE\">Filespecs<\/span> (such as *.<span class=\"GramE\">c,<\/span> or folder\/subfolder) may be passed on the command line to limit the scope of the operation, as in the following example:<\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\"><span class=\"GramE\"><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">tfpt<\/span><\/span><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\"> online *.c foldersubfolder<\/span><\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\">This command instructs the online tool to process all files with the .c extension in the current folder, as well as all files in the foldersubfolder folder. No recursion is specified. With the <span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">\/r<\/span> (or <span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">\/recursive<\/span>) option, all files matching *.c in the current folder and below, as well as all files in the foldersubfolder folder and below will be checked. To process only the current folder and below, use<\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\"><span class=\"GramE\"><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">tfpt<\/span><\/span><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\"> online . \/r<\/p>\n<p><\/span><\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\">Exclusions<\/b><\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\">Many build systems create log files and\/or object files in the same directory as source code which is checked in. It may become necessary to filter out these files to prevent changes from being pended on them. This can be achieved through the <span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">\/exclude<span class=\"GramE\">:filespec1,filespec2<\/span>,&hellip;<\/span> option.<\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\">With the \/exclude option, certain <span class=\"SpellE\">filemasks<\/span> may be filtered out, and any directory name specified will not be entered by the TFPT online tool. For example, there may be a need to filter out log files and any files in object directories named &ldquo;<span class=\"SpellE\"><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">obj<\/span><\/span>&rdquo;.<\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\"><span class=\"SpellE\"><span class=\"GramE\"><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">tfpt<\/span><\/span><\/span><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\"> online \/exclude:*.<span class=\"SpellE\">log,obj<\/span><\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\">This will skip any file matching *.log, and any file or directory named <span class=\"SpellE\"><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">obj<\/span><\/span>.<\/p>\n<p class=\"MsoNormal\"><span class=\"SpellE\"><b style=\"mso-bidi-font-weight: normal\"><span style=\"FONT-SIZE: 18pt\">GetCS<\/span><\/b><\/span><b style=\"mso-bidi-font-weight: normal\"><span style=\"FONT-SIZE: 18pt\"> (Get Changeset)<\/p>\n<p><\/span><\/b><\/p>\n<p class=\"MsoNormal\">The TFPT GetCS tool gets all the items listed in a changeset at that changeset version.<\/p>\n<p style=\"TEXT-ALIGN: justify\" class=\"MsoNormal\">This is useful in the event that a coworker has checked in a change which you need to have in your workspace, but you cannot bring your entire workspace up to the latest version. You can use the TFPT GetCS tool to get just the items affected by his changeset, without having to inspect the changeset, determine the files listed in it, and manually list those files to a tf.exe get command.<\/p>\n<p class=\"MsoNormal\">There is no graphical user interface (GUI) for the TFPT GetCS tool. To invoke the TFPT GetCS tool, execute<\/p>\n<p class=\"MsoNormal\"><span class=\"GramE\"><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">tfpt<\/span><\/span><span style=\"FONT-FAMILY: 'Courier New'; FONT-SIZE: 11pt\">&nbsp;getcs \/<span class=\"SpellE\">changeset:<i style=\"mso-bidi-font-style: normal\">changesetnum<\/i><\/span><i style=\"mso-bidi-font-style: normal\"><\/p>\n<p><\/i><\/span><\/p>\n<p class=\"MsoNormal\"><span style=\"FONT-FAMILY: 'Courier New'\"><\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><span class=\"GramE\">at<\/span> the command line, where <span class=\"SpellE\"><i style=\"mso-bidi-font-style: normal\">changesetnum<\/i><\/span> is the number of the changeset to get.<\/p>\n<p class=\"MsoNormal\"><span style=\"FONT-SIZE: 14pt\"><\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\"><b style=\"mso-bidi-font-weight: normal\"><span style=\"FONT-SIZE: 18pt\">UU (Undo Unchanged)<\/p>\n<p><\/span><\/b><\/p>\n<p class=\"MsoNormal\">The TFPT UU tool removes pending edits from files which have not actually been edited.<\/p>\n<p class=\"MsoNormal\">This is useful in the event that you check out fifteen files for edit, but only actually make changes to three of them. You can back out your edits on the other twelve files by running the TFPT UU tool, which compares hashes of the files in the local workspace to hashes the server has to determine whether or not the file has actually been edited.<\/p>\n<p class=\"MsoNormal\">There is no graphical user interface (GUI) for the TFPT UU tool. To inv<\/p>\n<\/div>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>[UPDATE 8\/9\/2007]&nbsp; I fixed the&nbsp;broken link to the power&nbsp;tools page.&nbsp; [UPDATE 9\/8\/2006]&nbsp; TFPT is now available in its own&nbsp;small download: http:\/\/go.microsoft.com\/?linkid=5422499!&nbsp; You no longer need to download the VS SDK.&nbsp; You can find more information about the September &#8217;06 release&nbsp;here. Back at the start of October, I wrote about the tfpt.exe power toy.&nbsp; The beta [&hellip;]<\/p>\n","protected":false},"author":94,"featured_media":10268,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-10295","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"acf":[],"blog_post_summary":"<p>[UPDATE 8\/9\/2007]&nbsp; I fixed the&nbsp;broken link to the power&nbsp;tools page.&nbsp; [UPDATE 9\/8\/2006]&nbsp; TFPT is now available in its own&nbsp;small download: http:\/\/go.microsoft.com\/?linkid=5422499!&nbsp; You no longer need to download the VS SDK.&nbsp; You can find more information about the September &#8217;06 release&nbsp;here. Back at the start of October, I wrote about the tfpt.exe power toy.&nbsp; The beta [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/10295","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=10295"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/10295\/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=10295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/categories?post=10295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/tags?post=10295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}