Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Changing a component baseline from command line scm

I'd like to be able to load a specific baselined component using command line tool SCM (LSCM)
In Eclipse RTC, using the GUI, changing the baseline of a component, you can right-click on it -> replace With -> Baseline...

Is there a way to change the baseline of a component using the command line scm tool ? (and load it..)

Thanks for your help

0 votes



4 answers

Permanent link
You can use the scm workspace replace-component command to replace some or all components from a given snapshot.

C:\RTC-2.0.0.2\jazz\scmtools\eclipse>scm help workspace replace-component

Help on workspace replace-components
Replace components from a workspace. Components not found in the target workspace are ignored.

Aliases: replace-component, replace-comp, rplc

Usage: scm workspace replace-components [options] <workspace> <replace-type> <replace> [components...]
workspace - Target workspace or stream (name, alias, or UUID)
replace-type - Type of the item to replace. One of: "workspace", "stream", or "snapshot"
replace - Item to replace (must be of type specified in replace-type), may be alias, UUID, or name
components - Components to replace from the workspace, stream or snapshot

Options:
--all - Indicates all components in the target workspace will be replaced.
-b [--baseline] arg - Indicates the given baseline name is used to replace components.
-o [--overwrite-uncommitted] - Run the accept even though there are uncommitted local changes. May cause an overwrite.
-P [--password] arg - Password for repository.
-r [--repository-uri] arg - URI specifying the location of repository.
-u [--username] arg - Username for repository.


It's not clear whether it supports replacing a single component from a given baseline though.

0 votes


Permanent link
If you want to cherry-pick a specific component to change, include it in the list of baselines (last argument).

e

0 votes


Permanent link
What if I'm not starting from a snapshot though, just a baseline? It doesn't seem like I can specify just a baseline via the <replace-type> and <replace> args.

0 votes


Permanent link
Hi

This is how we just replaced the workspace with a Baseline from the Stream. Here we did not use the Snapshot concept at all.


To replace your repository workspace with a BASELINE available in the source stream, use the following:

scm login -r https://JazzHost:9443/jazz/ -u myUser -P myPass -n myRepository

scm workspace replace-components --all --overwrite-uncommitted --baseline "myBaseline1" "myTargetRepositoryWorkspace" stream "mySourceStream" -r myRepository


To load your repository workspace updated above on your local machine, use the following:

scm load -r myRepository "myTargetRepositoryWorkspace" -d C:\Temp\Path_1 --force


To logout,use
scm logout -r myRepository


Hope this helps!
Thanks
Rahul

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Apr 01 '10, 6:02 a.m.

Question was seen: 9,207 times

Last updated: Apr 01 '10, 6:02 a.m.

Confirmation Cancel Confirm