Reputation: 5654
I'm having some trouble with some team members accidentally checking in code across (usually unrelated) Team Projects. I could flog them for not being careful or try to find an easier way to bring this to their attention. We are running TFS 2010 & VS 2010.
Is there a TFS check-in policy to prevent check-ins across team projects?
Upvotes: 2
Views: 1673
Reputation: 76
I'm really disappointed by these responses. TFS is a tool to make developers work better and more efficiently. To blame a developer for being lazy or not paying attention seems like an absolute cope out. What if you hire a new employee that has limited knowledge and simply makes a mistake? Tools should allow us to assist and teach developers on appropriate methods.
Upvotes: 4
Reputation: 604
In TFS 2010 check-in policies aren't evaluated for check-ins across multiple projects, so a check-in policy can't do what you want.
However, there is code for a VS addin in the first comment of this bug-report which looks like it does what you want: http://social.msdn.microsoft.com/Forums/en-US/tfsversioncontrol/thread/a71ac2f0-dc9c-4c03-a6a3-ab59877c55d8/
Upvotes: 1
Reputation: 23157
They shouldn't have this problem if they either check in from the Solution Explorer or from a sub-folder (or individual team project) in the Source Code Explorer. It sounds like they're being lazy and simply right clicking on $/
and checking in.
That being said, I haven't seen any out-of-the-box policies for doing this. However, writing your own using the TFS API is very straightforward.
Jim Lamb's article is probably the best place to start:
Upvotes: 2