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条回答
倾城 Initia
2楼-- · 2019-03-14 06:47

Here's a simple hack that works:

  1. Click on 'Unshelve'
  2. Select proper shelveset
  3. Click on the 'Details' button
  4. Right click on the file you wish to compare
  5. Click on 'View'
  6. This opens up in your text editor, save it to your desktop or wherever you like.
  7. Open your file diff program and compare the saved version to your local version.

In a nutshell, save a copy of the shelved version you retrieve from the server and just do a manual compare using your diff tool.

查看更多
ゆ 、 Hurt°
3楼-- · 2019-03-14 06:48

I have been looking for a way to do this for quite some time. I wonder how hard it would be to create a vs.net plugin to do this for you.

查看更多
趁早两清
4楼-- · 2019-03-14 06:49

Although this isn't the ideal way to do it, depending on your comparison tool you may be able to tell it to compare the shelved version to a local version (workspace). I use Beyond Compare, and this allows you to open a file to compare to. So from the shelveset I do a compare to Latest, and then replace the 'latest' with my local workspace version.

Unfortunately I've just checked the built in comparison tool and it doesn't provide this option.

查看更多
登录 后发表回答