Reputation: 53826
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 :
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.
Upvotes: 1
Views: 1684
Reputation: 1325137
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.
Upvotes: 1