January 15, 2014

Unshelving to Another Stream

Streams
Traceability

During a Streams demo with a customer, many questions came up about unshelving into a different stream/branch. Our Shelving feature has been a part of our product since 2009.2, and the unshelving into a different branch feature was released in the 2013.1 version of the server.

When unshelving into a different branch, you need to consider the stream relationship. The key to dealing with unshelving into another branch is to not specify directionality for the actual unshelve, but rather specify to get the appropriate branchview to move the files, which is always generated by the child to parent relationship. Another key consideration is that there must be a direct relationship of the unshelved files example:

parent <-> child,

NOT parent <-->grandchild

NOT sibling <-->sibling

Here are a couple of examples to follow:

Unshelve files from a Parent stream to Child stream (main will always be the parent stream):

  1. Shelve file in main line (//project/main/...)
  2. Switch to work in //project/2.0-int/
  3. Unshleve in the child stream 2.0-int
    • Go to your pending changelists
    • Select the file(s) you want to unshelve
      • Select the Map unshelved files checkbox []
    • From the list, select your child stream you currently are in //project/2.0-int/

Unshelve from a Child stream to Parent stream:

  1. Shelve a file in the child stream e.g. (//project/dev-db/...)
  2. Switch to work in its parent (//project/2.0-int stream)
  3. Unshleve to the parent stream
    • Go to the pending changelist
    • Select the file(s) you want to unshelve
      • Select the Map unshelved files checkbox []
    • Select the child stream where you will unshelve from e.g. //project/dev-db…/

Remember you're specifying to get the appropriate branchview to move the files, and that's always generated by the child to parent.

Unshelving to a different branch is great when you’ve discovered you started working in the wrong stream. Test out unshelving and see the possibilities by grabbing the latest release and give it a try!