1

I'm adding a snapshot of a stream to a repository workspace.

How do I load the snapshot components into the repository ?

Currently I just have the repository workspace with the snapshot, but the workspace should also contain the components of the snapshot.

To add the snapshot to a repository I use :

scm snapshot promote -r <repositry url> <repository workspace> <snapshot>

Perhaps I should be using a different scm command to add the components of a snapshot to the repository instead of the snapshot itself ?

I used the '<repository workspace name' & 'snapshot name'. I did not need to use their id's.

No error is returned and I can view the created snapshot : enter image description here

But the components for this snapshot are not added to the repository workspace.

I think ive solved this. Running the command (includes --stream parameter) :

scm create workspace -r <repository url> <repository workspace> --stream <stream name>

Creates the workspace & adds components to this newly created workspace. These components in the just created workspace have the same baseline as defined in the stream.

blue-sky
  • 51,962
  • 152
  • 427
  • 752
  • Do you see an error message? Or can you publish a screenshot? – VonC Nov 21 '12 at 12:29
  • @VonC please see question edit – blue-sky Nov 21 '12 at 13:31
  • Can you see the components in your repo workspace though? – VonC Nov 21 '12 at 13:36
  • @VonC no, their not there. Just the snapshot is added – blue-sky Nov 21 '12 at 13:38
  • @VonC can you review my question please, I think I have found the solution – blue-sky Nov 21 '12 at 13:57
  • Strange: if a snapshot is added to a repo workspace, then the components should be there: that is the *all idea* behind adding a snapshot to a workspace (repo or stream). Perhaps another scm command is required – VonC Nov 21 '12 at 13:58
  • I agree with your solution, but just to be sure: do you need both? promote and create workspace? If your stream already contained the right components, I believe only `create workspace ... --stream`is needed. I have edited my answer to reflect as much. – VonC Nov 21 '12 at 14:00
  • I should have pointed that out, I no longer need promote. Just 'create workspace' is required. – blue-sky Nov 21 '12 at 14:03
  • That is what I thought. I have edited my answer to reflect that. – VonC Nov 21 '12 at 14:03

1 Answers1

1

What you did was to create the snapshot on the stream (in order to link all the components)

When you add a snapshot to a repo workspace, you do a promote of the snapshot:

scm snapshot promote -r <repositry url> <repository workspace> <snapshot>

that you mention should work (not sure if you need the id of the repo workspace, and the id of the snapshot through)

Actually, Ralf Hohendorf commented that this command (scm snapshot promote) only moves the snapshot from a stream to the repository workspace.
The snapshot will not be used, only moved.


The idea though is to populate another empty stream, in order for a repo workspace to reflect the list of components.

If the components are already on the stream, then as the OP mentions, this is enough:

scm create workspace -r <repository url> <repository workspace> --stream <stream name>

No need to create or promote a snapshot in that case (since the stream already reflect the components you want).

You should see in the "Component" section of your workspace those components.
Note that you will still need to load that repo workspace in order to see the files on your disk.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250