Reputation: 9324
In Tortoise HG or GIt, you can choose a file, and show its history. You can click on each commit, and in the below you get a quick view of the diff sets. This is a very fast way to review the history of a file.
As you click on the next revision the diffset shows up immediately.
My question is - how do you do this in TFS? I'm not very familiar with that system, but I would expect it to allow a very-busy developer to analyze code changes quickly.
Upvotes: 2
Views: 313
Reputation: 57952
In TFS, right click a file and View History (or Source Control > View History if you right click in some paces (such as in a source file or solution explorer))
This shows a list of changes to the file (dates and comments).
Double click a change to view that version of the file.
Right-click a change to compare it to the current version on your PC (just OK the dialog that appears), or a specific versions (by changing options in the dialog)
Ctrl-click to select two changes and then right click and Compare to compare the two selected versions.
It doesn't quite "automatically show the diff" but it's not too bad one you get used to it, and the overhead is minimal if you intend to spend anything more than a few seconds actually reading the diff.
You can also view changesets that have affected file(s) with folders using the same approach, either restricting your view of the changesets to a low level folder, or opening up the search by applying it to a root level folder in the folder hierarchy. When you view the history on multiple files in this way all changesets that overlap your selection are shown. Double clicking these will display the changeset details (including a list of the changed files, each of which can then be diffed against the previous, workspace or current version)
You can also configure the Diff tool to use in Tools > Options > Source Control > Visual Studio Team Foundation Server : Configure User Tools. So if you have a good 3rd party diff tool you can use it to show you the diffs, which can be much better than the built in diff visualisations.
Upvotes: 2