PDA

View Full Version : Team Foundation checkin unmodified file - question/suggestion


jdavidi
12-20-2010, 12:09 PM
Greetings!

We're in the middle of migrating a bunch of our Vault-stored projects to TFS 2010, and I'm updating our corresponding Visual Build source control steps along with it.

One of our procedures involves the checkout, possible modification, and checkin of a file. Vault's checkin command is successful whether or not the file is modified, however with TFS, the checkin is throwing an Exit Code of 1, a "partial success" when we don't have local changes, per this article:

http://blogs.msdn.com/b/richardb/archive/2007/09/25/tf-checkin-exit-codes.aspx

I'm assuming Visual Build (7.7) is only allowing 0 as a successful exit code. Is there any current way around this using the Team Foundation action?

I'll probably make this command a Run Program action for now with allowed exit codes of 0 and 1, but if there's no current workaround, I think it'd be a great addition to the Team Foundation action's Checkin tab to allow the TFS checkin exit code 1 (ParticalSuccess) to be an optional success step condition.

Thanks much!

--jdavidi

kinook
12-20-2010, 12:22 PM
You can handle this by adding a vbld_StepDone script event like this to the Team Foundation steps:Sub vbld_StepDone()
If vbld_TempMacros()("RUNPROGRAM_EXITCODE") = 1 Then Step.BuildStatus = vbldStepStatSucceeded
End Subhttp://www.kinook.com/VisBuildPro/Manual/scriptevents.htm

We'll also add to our request list explicit support for this in the Team Foundation action.

jdavidi
12-20-2010, 12:26 PM
Awesome; works brilliantly. Thanks a mil!

kinook
02-22-2012, 02:37 PM
This is implemented in v8.0.