Checking in Shelvesets
Solution 1
The other developer can open a Visual Studio Command Prompt and use the following command:
tf checkin /shelveset:shelvesetname;shelvesetowner
See Checkin Command on MSDN for more details.
Solution 2
I don't think check-in via TFS Command Line directly is a better way, it maybe conflict with the latest code on TFS.
I think the better way to check in shelveset if there are some another changes in you code, but you don't check in it, is create a new WorkSpace in your local computer
Then map the latest code to the new workspace, then unshelve(download) the shelveset, resolve the conflict if necessary, then check in the code
Solution 3
For those having issues with the error:"Items cannot be specified with the /shelveset option.", try putting the user name in parenthesis as follows:
tf checkin /shelveset:shelvesetname;"shelvesetowner"
cjs
Updated on February 09, 2020Comments
-
cjs over 4 years
I'm a developer and I've made some changes to a solution, which I have saved off to a shelveset. Another developer unshelves my changes and builds the solution on a server. Is there a way for the second developer to check in my shelveset? I know he/she can check in the individual files comprising the shelveset. However, I was thinking of a "checkin" command that took the name of a shelveset as a parameter, or if there was another way to check in those changes as a unit, with the shelveset name.
-
cjs almost 14 yearsThanks for the reply. However, it is possible that multiple developers will have shelved changes that need to be unshelved, built and checked in from the server. I figured that if one could check in by shelveset name, then the shelvesets on the server can be built, tested and checked in one at a time. Is this not possible?
-
Robaticus almost 14 yearsIt sounds like what you're talking about is similar in fashion to the Gated Checkin approach that you have in TFS 2010. In that setup, TFS will take a check-in, put it in a shelfset, then build based on that shelfset.
-
cjs almost 14 yearsI think I misspoke. When I mentioned building the shelveset on a server, I meant that it will be built in Visual Studio, which is installed on a server. That is, by server I did not mean "build agent". I'm looking at doing this in code but no luck yet.
-
Robaticus almost 14 yearsSo, basically you have a "buildmaster" that will get 1..n shelvesets into a workspace, perform a build, then selectively check in 1..n shelvesets? If you're looking at checking in all the shelvesets, he could do it from a clean workspace, then just check in all pending changes. If you're looking at selectively checking in the changesets, it will get a bit more difficult and you might have to go to either PowerShell or code.
-
ekkis almost 10 yearsI get the error: "Items cannot be specified with the /shelveset option." - what does that mean?
-
machinarium over 9 yearsAlso come across this error, do you have any resolutions later?
-
Elaskanator almost 6 yearsThis always deletes the shelveset. I don't see any options to the command to preserve it; must it always get deleted?!