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
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
4 answers
You can use the scm workspace replace-component command to replace some or all components from a given snapshot.
It's not clear whether it supports replacing a single component from a given baseline though.
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.
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:
To load your repository workspace updated above on your local machine, use the following:
To logout,use
Hope this helps!
Thanks
Rahul
This is how we just replaced the workspace with a Baseline from the Stream. Here we did not use the Snapshot concept at all.
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
scm load -r myRepository "myTargetRepositoryWorkspace" -d C:\Temp\Path_1 --force
scm logout -r myRepository
Hope this helps!
Thanks
Rahul