Since they have supposedly integrated most of the Power Tools functionality into VS2017, the new command \"tf unshelve\" does not work the same as the old command \"tfpt unshelv
Here's how I do it when I know the branch files can be overwritten directly by the shelf-set. If you need to merge, then use win-merge with directory compare to stitch things back together.
It's a shame that this hasn't been put into VS as a native feature yet, but when you consider the complexity of un-shelving into a code merge, and preserving history, etc, the task becomes complex. Good luck!
Another WORKAROUND...
This keeps changes from changeset 2 and rolls back the original branch.
This process may not work for every company and their policies but it does work. I don't like it but sometimes it is necessary.
Until now (Feb 2020) TSPT is not available in Visual Studio.
The workaround i found is to create a new Branch and use a tool like WinMerge (http://winmerge.org) to compare and merge changes from Main to the new Branch then when it's all right undo the changes on the main branch.
I absolutely agree this is a greatly missed feature in 2017 and up. After too many times of doing this manually, I decided to add it to my (free) Visual Studio Extension called 'MultiMerge'. You can now right-click a shelveset and choose your target branch. There's a VS2017 version and VS2019. Or you can simply choose this extension using Tools and Extentions menu in Visual Studio.
Feel free to rate the extension, and let others find it more quickly:)
Multimerge extension (MultiMerge.2017, MultiMerge.2019) worked like a charm for me. (Or rather to the extent that TFVC tools as such cannot merge by reapplying a patch.)
No tfpt
for VS 2017 and VS 2019. The unshelve /migrate
command has not been incorporated into tf
neither. So nothing that works out of the box as yet. (Last checked on v16.7.5)
Unfortunately move Shelveset to Another Branch with the command "tftp unshelve
" or "tf unshelve
" is still not supported for now in VS 2017.
There's already a feedback submitted here to track that, just as Youhana Naseim [MSFT] mentioned below (source here) :
For VS 2017 we do not have a power tools release. We are constantly evaluating the features that are still missing in the product. The three most notable ones are:
TFS Windows Shell Extensions integration
Find by Status for server workspaces
Unshelve /migrate
So as a workaround, you can try below ways:
c:\projects>tf unshelve
2). c:\projects>tf rename 314.c ..\newdir\1254.c