0

Background

In our team we have peer code reviews. We review Work Items, that have any number of changesets associated with them.

Particularly when working on new code, we have a lot of instances where a changeset (#1) alters a file. Then later, on the same work item, another changeset (#2) alters the same file, overwriting some errors that arose from #1.

As a code reviewer, I go through these changesets chronologically. When I'm reviewing #1, I have no idea at the time that #2 reverses the bad code, and thus I will spend time writing comments that are ultimately redundant.

Question

Is there a feature or way in Visual Studio to do something along the lines of, seeing the final result of each file across all changesets for a work item?

Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
Jonesopolis
  • 25,034
  • 12
  • 68
  • 112
  • Obvious question: Why dont you simply review the last change only? I know there might be unreviewed WorkItems in between, but cant you just ignore them? And if this case happens quite often, you should talk a serious word with your coworkers. – lokusking Aug 19 '16 at 16:23
  • That would work in theory. They problem is if there's 25+ files across all changesets and 15+ changesets, it takes equally as much time to verify you are checking all files in their finalized form – Jonesopolis Aug 19 '16 at 16:56
  • Have a look [here](http://stackoverflow.com/questions/12974820/code-review-of-multiple-check-ins-in-tfs-2012). Best practice might be, **First** review, **second** Check-In – lokusking Aug 19 '16 at 17:02

1 Answers1

0

There is no way such as a query in GUI or tf command to achieve this. You may need to use the compare for each file in the work item. Find the file in source control, use the Changeset type to compare, select the first changeset and the last changeset in work item. It would lists the total changes of this file during the work item.

enter image description here

Another more appropriate approach is using TFS API to list all the differences between the first and the last changeset of the file during all workitems so you can view the sum of differences in the file.

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62