Shelve streams in Eclipse

Shelving enables you to store local changes in a topic stream in a repository and optionally remove the changes from a work area.

For details about shelving guidelines, see Shelve your personal changes.

Typical shelving scenario

You can use a topic stream to shelve your work. These steps describe a typical shelving scenario:

  1. Your team lead asks you to improve functionality in the next release of an application.

  2. You download the tip of the stream to a local work area and begin work. Over the course of the next few days you create new files and modify existing ones.

  3. Your manager asks you to interrupt your work and fix a very high priority bug that affects the same functional area. The fix requires you to modify some of the files that you recently changed. To avoid conflicts between the recent changes and the bug fix, and to use the same work area, you shelve your work to a topic stream and reset your work area to the latest repository content. You now have a clean work area that does not contain the changes you previously made.

  4. You fix the bug and deliver the changes to the stream.

  5. Your manager asks you to resume work on improving the functionality so you:

    • Merge the shelved content from the topic stream back into the work area.

    • Resolve any conflicts between the changes made for the bug fix and new feature.

Back to top

Shelve changes to a topic stream

In the Eclipse integration, you can shelve your changes from a work area into a topic stream.

To shelve your changes:

  1. In the Synchronize view, right-click the stream you want to shelve, and select Team > Shelve. The Shelve wizard opens.

  2. Enter a name for the new topic stream. The default is:

    <Username>_<ID of the parent stream>

  3. (Optional) Modify the default description of the topic stream.

  4. Enter a unique branch name. The default is:

    <Username>_<ID of the parent stream>

  5. After the shelving is complete, by default the work area is reset to the latest repository content, and the local changes are discarded. To avoid resetting the work area, clear the Reset work area changes after shelving option.

  6. (Optional) Add the new topic stream to your favorites, and click Next.

  7. On the Shelve Changes to Repository page, select the resources to deliver, and click Next.

  8. On the Relate Requests page, select change requests, and click Next.

  9. On the Item Attributes page, select attributes for the revisions your are delivering.

  10. Click Finish.

    If the Update wizard opens, you have the option to reset the work area. The stream to be used for the update is the same one that was used to shelve the changes. In the Advanced section, the following options are selected by default:

    • Reset work area changes to repository versions and paths.

    • Delete locally added files (such as artifacts added by a local build process).

    Complete the Update wizard. For details, see Update a workspace in Eclipse.

Back to top

Restore shelved changes

To restore shelved changes, you merge a topic stream back into a work area. The source stream is the shelved topic stream, and the target stream is the stream into which you are merging.

When restoring shelved changes, you can:

  • Select which content to restore.

  • Restore to a new, or clean, work area by creating a new workspace and adding stream content to it.

  • Restore to a work area associated with a different stream if, for example, the stream used to shelve a work area is locked.

Note: The process for restoring shelved changes is the same for merging streams.

To restore your shelved changes:

  1. Package Explorer: Right-click a stream or folder and select Team > Merge. The Merge wizard opens. Select Merge streams or their folders and click Next.

    To select the shelved topic stream, select the Find option, click Find, and use the Select Stream wizard to specify the stream. Or select the Browse option and select a stream from the Repository Projects tree.

    Click Next.

    Dimensions CM Explorer: Right-click the shelved topic stream and select Merge. The Merge wizard opens.

  2. The Merge Changes from This Stream box displays the ID of the shelved topic stream that is the source for this merge.

  3. A table lists all the Eclipse IDE projects currently in your workspace. These are the projects that you merge into. To change the scope of the merge:

    1. Click Select.

    2. Select a projects group from your workspace, and click Next.

    3. Select the workspace projects that you want to merge into, and click Finish.

  1. To interactively (manually) verify the merge results before applying them to the work area, select Perform an interactive merge.

  2. (Optional) Click Advanced.

  3. Select these options where applicable:

    • Apply the repository date and time to the files in the merge.

    • Automatically merge files whose content does not conflict.

    • Show a summary of the results of the operation (available only for non-interactive merges).

    • Enable logging. Enter the folder path where you want to save the log file, or click Browse and select a folder.

    Click Next.

  1. Select a version of the source stream.

  2. To run the merge, click Finish. The results of the merge are displayed in the Synchronize view. Use the view to compare revisions, resolve conflicts, and synchronize with the repository.

Back to top