Do you know how the Gated Checkin process works?
Rules to Better Version Control With TFS (AKA Source Control)|4bf35020-bc22-41a4-9d20-184b9554104b
v2.0
Posted at
2/07/2013 12:41 AM by
Tiago Araujo
Rule Intro
Gated Checkins are great for verifying your project builds successfully before a checkin occurs, but the workflow and dialog messages can be difficult to follow. Sometimes it’s not clear what you need to do next as a developer.
Page Content
The process for a project with a Gated Checkin build is:
- The developer clicks
Check In
- Changes are not checked in, but are shelved and a build is queued
- The developer is notified when a build succeeds and prompted to “Reconcile” their workspace
Note: This relies on the
Build Notifications tool running, which may not be the case. If it’s not running, the developer has to manually reconcile their workspace before they can effectively continue working.
-
- Figure: The developer is notified if a gated check-in resulted in a commit
If you don't have the
Build Notifications tool running or you click
Ignore, you will have to manually reconcile. There are a few ways to do this.
You can click
Check In again. This will fail, but any files you’re trying to check in will be reconciled as a result. You should definitely not do this if you’ve made additional changes since checking in.
-
- Figure: Bad Example - Reconcile by clicking "Check In" again. This will fail, but any files you're trying to check in will be reconciled.
Alternatively, you can open the queued build and choose
Actions | Reconcile Workspace... to fix your workspace
-
- Figure: OK Example – Open the Build and choose Actions | Reconcile Workspace...
The best way is to click the link in the notification to open a specific build window with a
Reconcile Workspace link included.
Note: This notification will disappear if you close it or navigate away from the
Pending Changes window in
Team Explorer.
-
- Figure: Good Example #1 – Click the link in the notification after clicking Check In
-
- Figure: Good Example #2 – Click on the link in the notification to open the build, then click Reconcile Workspace when the build finishes
Read our suggestion to Microsoft on how toimprove the Gated Checkin workflow.
{CC2B35D3-AB58-48DA-85A6-04BBA80F019F}
Do you feel this rule needs an update?