开发者

Checking in Shelvesets

开发者 https://www.devze.com 2023-01-06 20:05 出处:网络
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 se开

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 se开发者_高级运维cond 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.


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.


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

Checking in Shelvesets

Checking in Shelvesets

Then map the latest code to the new workspace, then unshelve(download) the shelveset, resolve the conflict if necessary, then check in the code


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"


An easy way to do this is to define a new workspace and have the developer unshelve to that workspace. Then, all of the pending changes for that workspace correspond to the shelfset, and they can check in everything in the workspace.


The second developer can go to Team Explorer -> Builds and right click on the Build definition you are working with.

  1. Select “Queue New Build…”
  2. In the combobox “What do you want to build?”, select “Latest sources with shelveset”.
  3. If you go to the button “…” you can select any shelveset from anyone.
  4. Then check the box “Check in changes after successful build”.

A build runs with that shelveset, the shelveset is checked in when the build passes.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号