How can I easily diff/compare 2 shelvesets in TFS? - tfs

Is there a way to compare 2 shelves in TFS without having to resort to unshelving both in separate workspaces and diffing the files?

I was looking for the same i.e. to compare the contents of two shelveets without needing to unshelve one of them. End up writing a Visual Studio extension for the functionality.
The extension is available for Visual studio 2013
http://visualstudiogallery.msdn.microsoft.com/1fa59764-efc6-457a-a5f3-81ca68e280e8
and for Visual studio 2012
http://visualstudiogallery.msdn.microsoft.com/33c521d4-73fc-48be-969d-fa68c511341f
Please feel free to use and give your feedback.

I don't have access to TFS currently, but if the file in the shelveset has a unique idenitifer (like say $/x/y/z/a.b.c;SH='ShelvesetName') you should be able to issue a command line tf dff command to compare each one.
Or
If you unshelve one and then use the command line TFS power tools to compare the other one with the review command
tfpt review /shelveset:shelvesetName;userName
The power tools are version specific and you can download the following versions:
TFS Power Tools 2015
TFS Power Tools 2013
TFS Power Tools 2012
TFS Power Tools 2010
TFS Power Tools 2008
TFS Power Tools 2005

In Visual Studio you can go to Team Explorer, Pending Changes, Actions - Find Shelvesets, then find your Shelveset, right click and View ShelveSet Details, you end up with a list of file, right click the one you're interested in and choose Compare with Workset.

Related

How can Remove other work-spaces from Visual studio TFS 2019?

However VS 2019 is the best IDE, sometimes we want to do somethings and we can not do it. for example, you work on a project and suddenly your PC is crashed and you have some class check out on TFS.
In new PC when you get source you see some sources check out with your user in another pc and you can not check-in or undo them in VS 2019. What can you do?
A tip for solving the problem with another work-space in TFS
Solution
The best way that I find without any writing commands is:
Install VS 2013 and after that get Power Tools for TFS vs 2013
After install power tools, when you get the source with vs 2013 and go to source control explorer, you can right-click on your project and go to find--->findByStatus
and click on find.
you see all files which are checked out by other workspaces and you can undo them
that's easy
Next step. close vs 2013 and open VS 2019 and get your sources and start again write code. (please write clean code :))
You can also use the Attrice TFS Sidekicks available here there are multiple versions for different Visual Studio but they all work against 2019. From the workspace sidekick you can list and remove old workspaces.
Also you can run from the TF.exe command line do remove old workspaces Microsoft doc available here

Are workspace templates as implemented in Powertools for TFS 2013 still available in TFS 2017?

In respect to the following question Is there a way to easily share Workspace settings (folder mappings) for Visual Studio Online / Team Foundation Server? and an entry I found regarding to this topic https://social.msdn.microsoft.com/Forums/vstudio/en-US/c9b16b30-4534-4781-a2e8-fb413a2df0af/power-tools-for-tfs-2017-with-vs-2017-rc?forum=tfsgeneral I wanted to ask if anyone knows how to achieve this very much needed functionality in TFS 2017?
Thanks.
Unfortunately we cannot create the workspace templates with VS 2017 for now.
According to release notes it says most of the previous Power Tools have been integrated into TFS 2017 that means no separate power tools for TFS 2017.
But the Team Utilities feature component is not integrated, that means these haven't shipped for Visual Studio 2017.
I have submitted a user voice here for you to suggest this feature, you can go and vote it up to achieve it in future.
Another similar thread for your reference: Team Members Team Utilities section in VS 2017

Visual Studio 2017 and TFS see what files are checked out and to who

In Visual Studio 2015 I could use the TFS Power Tools and then do a "Find by Status" to get a list of all checked out files and who has them checked out.
Does anyone know of a way to do this in Visual Studio 2017? I've read that they do not plan on releasing a TFS Power Tools 2017.
Thank you,
Actually, the "Find by Status" feature only works for Server workspace. If you're using Local workspace, it doesn't show anything.
As a workaround, maybe you could use the tf status command instead, it displays information about pending changes to files and folders.
Or you could use TFS API, here is an example: http://geekswithblogs.net/TarunArora/archive/2011/07/16/tfs-2010-sdk-get-list-of-user-workspaces-and-checked.aspx.

TeamCity Visual Studio plugin diff on double-click

I am using the TeamCity plugin for Visual Studio 2015, and the Local Changes window is great for submitting private builds, easily assigning a check-in to a TFS task etc.
However, as my company is currently using TFS source control, the unified diff pane does not work ('Unified Diff is not supported by TFS integration'), so I would like to easily diff each file by double-clicking it rather than having to right-click each one and select 'Diff against workspace'.
Does anyone know how/if this can be achieved?
Thanks!
Unfortunately, this can't be achieved. There is no such related settings with TeamCity Visual Studio plugin. You can try to use external diff viewer such as beyond compare, more details please refer Teamcity - which external diff viewer

TFS 2008 to Visual Studio Team Services Migration

I'm looking to upgrade our internal source control from the archaic TFS 2008 on prem, to the nice shiny VSTS (was Visual Studio Online) however it really doesn't simple a simple process. I tried using OpsHub but it looks like TFS 2010 is the earliest supported there.
I'd be happy just manually copying code but I don't know of a way to maintain branch relationships once those branches have been put in to VSTS.
Can anyone point me in the right direction for how to upgrade/move my code?
I'd be happy with an answer that explains how to maintain relationships when copying branches from one version to the other
You can try with this tool: TFS Integration Platform.

Resources