TFS build exceptions after "git tf checkin" with gated checkin

Nov 18, 2013 at 2:24 PM

after performing a gated checkin using this command:
git tf checkin -g="xxx"
I get the following exception from our TFS 2012 server during the gated check-in.
    No appropriate mapping exists for $/abc/.gitignore.
    Exception Message: TF400921: No shelvesets could be unshelved for this build. The build will not proceed. (type NoShelvesetException)
Exception Stack Trace:    at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
This is the first commit using git-tf and it only contains the .gitignore file.
Anybody got an idea?
But I'm afraid this got more to do with TFS itself than it has with git-tf ...

Nov 18, 2013 at 2:44 PM

This error means that in your build definition, in the source settings, you don't have that $/abc mapped so when the build tries to unshelve your change, it fails. You need to add a mapping for that server path $/abc in your gated build definition.

Please let me know if that did not fix your problem.

Nov 18, 2013 at 3:14 PM
Edited Nov 18, 2013 at 3:15 PM
You are correct, what you describe is indeed the issue.

Now just have to figure out what to do about it ...

Strangely, there are a lot of files(tools and stuff) outside the folder mapped in the build definition.
Although, I never had problems with the gated check in because of that before.
I guess normally TFS somehow figures out how to handle the commit based on the files changed. And if I force with git-tf it to use a certain gated check-in build definition it won't work correctly.
Since the build definitions are not under my control. My plan is to separately commit the .gitignore file without a gated check-in.
Nov 18, 2013 at 4:03 PM
TFS does not do anything different because at the end whether the changeset is created by tfs or git-tf, it is a changeset but probably you did not have any problems before with those files outside the mapping because you did not pend any change to them.