TFS Code Regview

http://help.teamprise.com/3.2/index.jsp?topic=/com.teamprise.help/plugindoc/ba_shelveset.html

 

Shelving and Unshelving Pending Changes

 

Shelving and Unshelving Pending Changes

The Shelve/Unshelve task allows you to set aside pending changes in your TFS workspace if you want to work on something else for awhile, or if you want another coder to review your changes before you commit them, or if you want to pass off files you've been working on to another team member. When you create a shelveset TFS saves the items along with any associated Work Items or Check-in Notes to a separate repository, though not the source control repository itself.

Note: It's a good idea to make sure your workspace is up-to-date and that you have resolved any conflicts before creating a new shelveset.

Shelving a set of pending changes

To shelve a set of pending changes in your TFS workspace:

  1. In the Pending Changes view, click the down arrow icon and select Shelve.

  2. In the Shelve - Source Files dialog box, type a name for your shelveset, any comments to help you remember the set, and, if necessary, deselect any file(s) you do not want to include in the shelveset. You can also associate a Work Item with your shelveset. For more information, see Associating Work Items with Changesets and Shelvesets.

    If you want the pending changes to persist in your local workspace after you create a shelveset, check the check box Preserve pending changes locally. If you wish to vacate all pending changes in your workspace after you create a shelveset, uncheck the check box so pending changes will be undone in your local workspace. This means, local files will revert to the previously checked-in version. (Remember, your shelveset preserves your pending changes on selected files and you can unshelve them to your workspace at anytime.)

    When you are ready to save your shelveset, click Shelve.

Finding and Unshelving a set of pending changes

When you unshelve a shelveset, the system restores the files to your workspace as pending changes as long as you do not have the same files currently checked out. To Unshelve a set of pending changes to your TFS workspace:

  1. In the Pending Changes view, select the down arrow icon and click Unshelve.

  2. In the Unshelve dialog type the name of any team member with a TFS workspace and click Find to retrieve a list of that team member's shelvesets. In the example below we are retrieving one of our own shelvesets, and selecting the one we created above. Click Unshelve.

    Files in your workspace are made writable and replaced by the shelveset files (even if they are not checked out for editing). They appear in the Pending Changes - Source Files view as pending changes. If you want to commit these to the server you must check them in.

    Note: TFS does not allow you to resolve conflicts with a Merge operation on shelvesets. If you attempt to unshelve a set of pending changes into a workspace with edits pending, you will receive an error message and the Unshelve operation will be aborted. You must either undo, shelve, or check in the changes pending in your workspace before you can unshelve the shelveset.

Viewing Shelveset Details

To view details of a saved shelveset:

  1. In the Unshelve dialog, after you have completed your search (Steps 1 -2 above), right-click a shelveset from the list and select Details.

  2. In the Shelveset Details dialog, right-click a file and select from the popup menu. By selecting View, the shelved file opens in your Eclipse editor window where you can examine it before unshelving it. You also have the option to use the compare editor. For more information on this option, see Comparing versions .

Deleting a Shelveset from the server

To delete a sShelveset, locate the shelveset in the Unshelve dialog. Right-click the name and select Delete

你可能感兴趣的:(code)