Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compare local file with shelf file

I have shelved my file, test.cpp and continued working on it. Now I would like to see what additional changes I've made to test.cpp since I made my shelf.

Let's say that after I checked out test.cpp, Bob checked into tfs an update to test.cpp.

Let's make some nomenclature to help:

  • source_version: the original version I checked out and started working from
  • latest_version: the test.cpp Bob checked into tfs, the latest version after I started working on test.cpp.
  • shelf_version: the test.cpp in my shelf, a modification of source_version, lacking Bob's addtions (i.e. not merged).
  • local_version: the test.cpp that I have on my local disk "local_version", that started from source_version, and has addtional work beyond shelf_version.

Using this set of labels my question reworded would be: How do I compare local_version with shelf_version.

My options:

In Pending Changes pane, I can

  • Compare with Workspace Version This is wrong, this compares local_version with source_version

  • Compare with Latest Version This is wrong, this compares local_version with latest_version

In 'Shelveset Details' pane view of the my shelf

  • Compare with Unmodified Version This is wrong, this appears to be the same as comparing shelf_version with source_version. Which is odd, this function is already handled in the next compare

  • Compare with Workspace Version This is wrong, this compares shelf_version with source_version.

  • Compare with Latest Version This is wrong, this compares shelf_version with latest_version.

Thanks

like image 686
payo Avatar asked Nov 15 '25 12:11

payo


1 Answers

It is really irritating that MS hasn't fix this yet. A workaround that I am currently using is an external diff app and doing the following:

  1. Open your external diff app.
  2. Go to your VS environment and go to the Team Explorer pane and bring up your Shelveset Details.
  3. Bring up the context menu on the file you want to compare (right click or menu key).
  4. Select Open. This'll DL the file to your local system as a temporary file.
  5. Bring up the context menu on the window tab right above the file contents which states the filename and select Copy Full Path.
  6. Go back to your external diff app and paste that file path as the first one you wish to diff.
  7. Go back to your VS environment and open your copy of the same file.
  8. Bring up the context menu on the window tab right above the file contents which states the filename and select Copy Full Path.
  9. Go back to your external diff app and paste that file path as the second one you wish to diff.
  10. Now diff the two files.

I know this is a lot of steps to do something that should be a simple (maybe 1 or 2 click) operation.

If you want MS to get off their ass and implement this feature, you might want to vote for this feature here.

like image 192
Adrian Avatar answered Nov 17 '25 10:11

Adrian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!