TFS: comparing shelveset files with local version

2019-03-14 06:19发布

When viewing files in a shelveset, I would like the option of comparing the files to my current local version. Unfortunately, the only options available are "With Unmodified", "With Workspace" (I guess this one would be the answer, if it wasn't disabled) and "With Latest".

Any ideas?

标签: tfs tfs2008
9条回答
姐就是有狂的资本
2楼-- · 2019-03-14 06:23

This is a little laborious but it does the job:

  1. Right click any file in Solution Explorer and select 'Unshelve Pending Changes...' from the context menu.

  2. Double click the relevant shelveset in the Unshelve dialog.

  3. Double click the file that you want to compare. This will open the sheleveset version of the file in notepad.

  4. Save the file somewhere on your local machine.

  5. Close all the dialogs.

  6. Right click the local workspace version of your file in Solution Explorer and select 'Compare' from the context menu.

  7. Change the target path to that of the file that you saved earlier and click OK.

查看更多
beautiful°
3楼-- · 2019-03-14 06:26

Export Shelveset to a local folder using Team Foundation Sidekicks and use file comparison tool to compare with local version.

查看更多
冷血范
4楼-- · 2019-03-14 06:32

In TFS, create a new (temporary) workspace, and map it onto a new local folder. get latest version into the new workspace, then unshleve the sheleveset into the new workspace. This gives you a temporary local copy of the source with the sheleveset applied. Then change back to the orignal workspace, click on file => source control => compare. Then enter the local folder paths of the original workspace and the new temprary workspace, to compare your original local version with the lcoal shelevest version.

查看更多
劫难
5楼-- · 2019-03-14 06:33

In VS2015 Update 3:

  1. Go to Pending Changes > Actions > Find Shelvesets
  2. Select the Shelveset you want to compare to, right click and choose View Shelveset Details
  3. Right Click on the file, choose Open
  4. Right Click on the tab, choose Copy Full Path
  5. In Solution Explorer, right click file, choose Compare...
  6. Paste the full path into Source Path and click OK
查看更多
Lonely孤独者°
6楼-- · 2019-03-14 06:35

I don't think that it is possible to compare a shelved version with a local version in Visual Studio, however I'll be very happily corrected on the matter.

查看更多
神经病院院长
7楼-- · 2019-03-14 06:37

Up to How can I easily diff/compare 2 shelvesets in TFS?

Use VS2013 ShelvesetComparer or VS2012 ShelvesetComparer, shelve local version into another shelveset, then compare between two shelvesets...

Though this will make another unneeded shelveset, and you can't edit local in file compare editor.

查看更多
登录 后发表回答