26.04.2015 Views

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

When and how can I override a check-in policy?<br />

You can override a check-in policy by selecting the Override policy failure and<br />

continue check-in checkbox. Any team member who has permission to check in files can<br />

override a check-in policy.<br />

If you want to detect when a member of your team overrides check-in policy, you can use<br />

the <strong>Team</strong> <strong>Foundation</strong> Eventing Service to hook check-in events.<br />

Additional Resources<br />

• To learn more about overriding a check-in policy, see “How to: Override a Check-in<br />

Policy” at http://msdn2.microsoft.com/en-us/library/ms245460(VS.80).aspx<br />

• To learn more about the <strong>Team</strong> <strong>Foundation</strong> Eventing Service, see “Eventing Service”<br />

at http://msdn2.microsoft.com/en-us/library/bb130154(vs.80).aspx<br />

How do I enforce a policy?<br />

<strong>Team</strong> <strong>Foundation</strong> Version Control will not prevent someone from overriding a policy.<br />

However, you can use the following steps to detect if a policy has been overridden:<br />

• Use the <strong>Team</strong> <strong>Foundation</strong> Eventing Service (from the <strong>Team</strong> <strong>Foundation</strong> Core<br />

Services API) for hooking into check-in events.<br />

• Write a Notify method that parses the details of the changeset, and then react to it if<br />

an override has occurred.<br />

Alternatively, you can manually scan changeset history to discover policy overrides.<br />

Additional Resources<br />

• To learn how to receive an e-mail notification when a policy has been violated, see<br />

http://blogs.infosupport.com/marcelv/archive/2005/10/18/1635.aspx<br />

How do I use a check-in verification system?<br />

You can use <strong>Team</strong> <strong>Foundation</strong> Version Control check-in policies as a check-in<br />

verification system. <strong>Team</strong> <strong>Foundation</strong> <strong>Server</strong> ships <strong>with</strong> check-in policies to ensure that<br />

the following is true before a check-in can be committed:<br />

• A work item is associated <strong>with</strong> the change.<br />

• Unit tests have all passed.<br />

• Static analysis has run cleanly.<br />

You can create your own check-in requirements by creating new policy plug-ins. Your<br />

plug-in can ensure that code matches your team’s coding standards, has run build<br />

verification tests, or any other requirement that is critical to your team’s needs.<br />

Additional Resources<br />

• To learn more about creating and customizing check-in policies, see “Walkthrough:<br />

Customizing Check-in Policies and Notes” at http://msdn2.microsoft.com/enus/library/ms181281(VS.80).aspx

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!