This article describes a hotfix for Microsoft Team Foundation Server (TFS) 2010. This hotfix resolves the following issue and adds a new feature.
Issue 1
Consider the following scenario:
Note This issue does not occur if you perform a merge operation by using the tf.exe /conservative command.
Feature 1
This hotfix adds an object model that uses the following two APIs. You can use these APIs to write a custom migration tool to change the check-in date.
Issue 1
Consider the following scenario:
- You try to perform a merge operation between two branches in the Team Foundation Version Control in TFS 2010. For example, you merge the Main branch and the Development branch.
- Some changes are merged from the Main branch to the Development branch to create the last changeset in the Development branch.
- You change the contents of an item in the Main branch.
- You try to merge the same item from the Development branch to a version of the Main branch that is earlier than the latest version.
Note This issue does not occur if you perform a merge operation by using the tf.exe /conservative command.
Feature 1
This hotfix adds an object model that uses the following two APIs. You can use these APIs to write a custom migration tool to change the check-in date.
- VersionControlServer.ResetCheckinDates method
To call the VersionControlServer.ResetCheckinDates method, use the following syntax:public void ResetCheckinDates(DateTime lastCheckinDate)
The VersionControlServer.ResetCheckinDates method is used to reset the check-in date for all changesets in a team project collection. The lastCheckinDate parameter indicates the time that you expect to reset all existing check-in files on a TFS 2010 server.
Note The changesets reset at the specified time to the second.
To use the VersionControlServer.ResetCheckinDates method, you must meet the following conditions:- You must have AdminConfiguration permission to run the migration tool.
- The team project collection contains fewer than 10 changesets.
- The lastCheckinDate parameter is not earlier than the current time on the TFS 2010 server.
- WorkspaceCheckInParameters.CheckinDate property
This property specifies time for the check-in files that are being changed on the TFS 2010 server.
To use the WorkspaceCheckInParameters.CheckinDate property, you must meet the following conditions:- You must have the CheckinOther permission for all changes that are being checked in.
- You do not define a CheckinDate time that is earlier than the last check-in time on the team project collection or than the current time on the TFS 2010 server.
- The check-in date between two check-in changes is not less than 3 milliseconds. SQL Server has a precision of 3 milliseconds.