This project is read-only.

How to use shelving to share code with a team member

- J.D. Meier, Jason Taylor, Alex Mackman, Prashant Bansode

To shelve source code for sharing with a team member, perform a Get Latest operation to synchronize your workspace with the latest server version and then build your application to ensure that it compiles. Shelve the source using Source Control Explorer. The team member to whom you have handed off the code then needs to unshelve the code.

Shelving is useful when you have work in progress that is to be completed by another team member; in this case, you can shelve your changes to make a handoff easier. By synchronizing the latest code, you get an opportunity to incorporate changes to source files that have been made outside of your workspace.

To shelve folders and files from Source Control Explorer
  1. In Source Control Explorer, right-click and then select Shelve Pending Changes.
  2. In the Shelve - Source Files dialog box, in the Shelveset name box, type the shelveset name; for example, shelvetest.
  3. In the Comment box, type Testing my shelveset and then click Shelve.
The files and folders are copied to the source control server and are available for other team members to unshelve.

When the other team member unshelve a shelveset, TFS restores each shelved revision into the destination workspace as a pending change, as long as the revision does not conflict with a change that is already pending in the workspace.

To unshelve a set of pending changes
  1. In Visual Studio 2005 Team System, click File, point to Source Control, and then click Unshelve.
  2. In the Owner name box, type the shelveset creator’s name (for example, ADVENTUREWORKS\JuanGo or simply juango) and then click Find.
  3. In the Results pane, select the shelveset you want to unshelve into your http://msdn2.microsoft.com/en-us/library/ms181383%28VS.80%29.aspx, and then click Details.
  4. If you want to delete the shelveset from the TFS source control server, clear the Preserve shelveset on server option.
  5. (Optional) Clear the Restore work items and check-in notes option if you do not want to have the work items and check-in notes associated with the shelveset restored.
  6. When the Details dialog box appears, select the shelveset or shelveset items you want to unshelve into your workspace, and then click Unshelve.

Additional Resources

Last edited Jul 31, 2007 at 4:24 PM by prashantbansode, version 8

Comments

No comments yet.