3

I'm attempting to automate the updating of a file in a stream using 'scm'

Here is how I think it should work :

  1. Login to the repository as current user (me)
  2. Create a new repository workspace which contains all of the components of a given Stream
  3. Load the components of the newly created workspace
  4. Update the file

I'm on point 2. Reading about the 'create workspace' doc on http://pic.dhe.ibm.com/infocenter/rtc/v1r0m0/index.jsp?topic=%2Fcom.ibm.team.scm.doc%2Ftopics%2Fc_scm_cli.html it does'nt mention how to create a new workspace which contains all of the components of a given stream. So how can I implement point 2 ?

Any comments on my methodolgy if can be improved upon also appreciated.

I've logged into the rtc repo via scm and this is the command I am using to try and create the snapshot from the stream

scm create snapshot -n test -d test "mystream"

But I receive an error :

Problem running 'create snapshot':
subcommand "snapshot" requires argument-based initialization, but does not provide a directory argument.

Is my command correct ?

blue-sky
  • 51,962
  • 152
  • 427
  • 752

1 Answers1

3

Your best option would be to create first a snapshot on the stream, and then to add that snapshot to your repository workspace.

See this thread:

scm create snapshot [options] <workspace/stream>

That would add all the component baselines in one command, by associating the snapshot to the new stream (see this thread)

scm snapshot promote
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • there does not seem to be an option to create a snapshot on a stream ? Looking at output from "scm help create snapshot" it seems I can just create a snapshot in a repository but I havent created a repositroy yet. – blue-sky Nov 20 '12 at 13:51
  • @user470184 no, you can use the name of a stream, not just the name of a repo workspace; – VonC Nov 20 '12 at 14:20
  • @user470184 I think you need to specify the id of the stream, not its name. If it doesn't recognize the id, it will default to requesting a repo workspace (hence the error message) – VonC Nov 20 '12 at 15:08
  • where can I access the ID of a stream ? – blue-sky Nov 20 '12 at 16:57
  • @user470184 good question. I am no longer at work, but I believe you can see it when listing the streams in the web interface. – VonC Nov 20 '12 at 19:08
  • when I search for the stream all I see is the name,owner,comment . Clicking into the stream just displays the stream component & name. Can you see its ID ? – blue-sky Nov 21 '12 at 09:37
  • 1
    @user470184 yes I can: look at the url, it ends with `&id=...`: here is your stream id. – VonC Nov 21 '12 at 09:57
  • thanks, I can now create a snapshot from the stream. So now I just need to create a new repository workspace, and add this new snapshot to this workspace and load the workspace ? – blue-sky Nov 21 '12 at 10:21
  • @user470184 yes, that is the idea. – VonC Nov 21 '12 at 10:31