tags:

views:

264

answers:

1

I would like to force the date of the check-in in TFS. Is there any way?

I got the following code, but could not find any way to pass a check-in date:

Dim tfsChangeSet = tfsVersionControl.Workspace.CheckIn(tfsPendingChanges,
                                                       user,
                                                       tfsComment,
                                                       tfsNote,
                                                       Nothing,
                                                       Nothing)
+2  A: 

This is not possible. Checkin Date is determined by the server. Best you can do is dynamically adjust the clock on the server machine, but that's highly unsupported. If you change it in such a way that TFS's internal assumptions are no longer valid, you might render the database unusable.

Richard Berg
Then why does the tf.exe command line tool allow a date to be specified as an argument to the checkin subcommand?
It does? C:\Users\rberg> tf checkin -?TF - Team Foundation Version Control ToolCopyright (c) Microsoft Corporation. All rights reserved.Commits pending changes in the current workspace to Team Foundation versioncontrol.tf checkin [/author:author name] [/comment:("comment"|@commentfile)] [/noprompt] [/notes:("Note Name"="note text"|@notefile)] [/override:(reason|@reasonfile)] [/recursive] [/saved] [/validate] [itemspec]
Richard Berg
Mistaken. I just came here to withdraw and you've already responded. Sorry.