How to find all changes that were made to a librar

2019-09-05 03:31发布

问题:

I'm using Visual Studio 2015 and TFS. One of the nice features of Visual Studio here is the fact that it lists the individual who made the most recent change and the number of references to that particular method above every method.

I have a particular library that's maintained primarily by me and one other developer. Occasionally, though, other people will make changes to it, and I've found that their modifications often contain errors.

Theoretically, when other people in the team make changes to the library they're supposed to add me or the other developer to the review, but a lot of people forget.

We've tried some of the obvious things (explaining to other people how the library works, refactoring where possible to make it more clear how to use and modify it, etc.), which has improved the situation somewhat but hasn't completely resolved it.

There were several instances in which I didn't realize that other people had made bad changes until I started getting exceptions in my own code. At this point, the best way I've come up with to check for this is to manually check through files to see if any "bad" changes were made, which is time-consuming and error-prone.

I do realize that TFS provides some degree of alerting and notifications, like below:

I can see how to set alerts for when I submit a checkin, a file is checked in to a particular path, or any checkin occurs in the team project. However, what I'm looking for is a lot more granular than what it seems to be offering. Is there a way to set an alert for a particular project (not path) where the checkin was by someone other than myself or this other developer? The closest I've been able to come up with is:

where the part I've crossed out in red is the name of the solution as a whole (the drop-down menu doesn't give me the option of specific projects within that). Also, the only option it gives me for "Committer" is Committer <> [Me]. The drop-down menu doesn't give me the option of Committer <> [Other Developer].

Any suggestions on how to handle this? Is there an easy way to be alerted to changes by other people in the way I'm asking here, and is there an easy way to find the changes in Visual Studio?

回答1:

You're pretty close.

It looks like you're trying to set a checkin alert for this condition:

And/Or  Field           Operator    Value
        Team project    =           Your Project
And     Committer       <>          [Me]
And     Committer       <>          Other Developer

(I hope that aligns correctly.)

You can type in whoever you want (whose name exists in the project) even though they're not in the drop-down list.