It's all about the answers!

Ask a question

Any SCM CLI command similar to Clear Case rebase one?


Jose Miguel Ordax Cassa (2.4k4126100) | asked Nov 11 '09, 9:38 a.m.
I am reading the docs of SCM CLI but I am not able to find any way to
replace/refresh the content of a stream with another component baseline
or stream snapshot... any hint?

Thanks in advance,

Chemi.

12 answers



permanent link
Andrew Hoo (1.0k1) | answered Nov 13 '09, 11:23 a.m.
JAZZ DEVELOPER
Try "scm workspace replace-components"

On Wed, 11 Nov 2009 09:24:10 -0500, Chemi <jmordax> wrote:

I am reading the docs of SCM CLI but I am not able to find any way to
replace/refresh the content of a stream with another component baseline
or stream snapshot... any hint?

Thanks in advance,

Chemi.


--

permanent link
Jose Miguel Ordax Cassa (2.4k4126100) | answered Nov 18 '09, 12:23 a.m.
On 13-Nov-09 5:09 PM, Andrew Hoo wrote:
Try "scm workspace replace-components"

On Wed, 11 Nov 2009 09:24:10 -0500, Chemi <jmordax> wrote:

I am reading the docs of SCM CLI but I am not able to find any way to
replace/refresh the content of a stream with another component
baseline or stream snapshot... any hint?

Thanks in advance,

Chemi.

Are workspace and stream interchangeable concepts in SCM CLI?

permanent link
Andrew Hoo (1.0k1) | answered Nov 18 '09, 12:23 p.m.
JAZZ DEVELOPER
Technically, streams and workspaces are often interchangeable, but
strictly speaking, no (due to casting reasons, and special semantics). For
the CLI, we try to doc when stream/workspaces can be used.


$ lscm help workspace replace-components
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 <workspace>
<replace> <replace>
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 arg - Indicates the given baseline name is
used to replace components.
-o - Run the accept even though there are
uncommitted local changes. May cause an overwrite.
-P arg - Password for repository.
-r arg - URI specifying the location of
repository.
-u arg - Username for repository.



As I reread this help, I see the args "replace-type" and "replace" are
confusing. They'd be better descripted as "source-type" and "source".

I just tried it out, what I did was "roll back" a baseline from 'bbb' to
'aaa':

adhoo@wsadhoo:~/jazzdev2/runtime-New_configuration/workspace/sdfsdfsdf$
lscm status -u TestJazzAdmin1 -P TestJazzAdmin1
Workspace: (1006) "New Workspace" <-> (1009) "theStream"
Component: (1007) "New Workspace Default Component"
Baseline: (1008) 3 "bbb"

adhoo@wsadhoo:~/jazzdev2/runtime-New_configuration/workspace/sdfsdfsdf$
lscm workspace replace-component -u TestJazzAdmin1 -P TestJazzAdmin1 -b
aaa 1009 workspace 1006 1007

adhoo@wsadhoo:~/jazzdev2/runtime-New_configuration/workspace/sdfsdfsdf$
lscm status -u TestJazzAdmin1 -P TestJazzAdmin1Workspace: (1006) "New
Workspace" <-> (1009) "theStream"
Component: (1007) "New Workspace Default Component"
Baseline: (1008) 3 "bbb"
Outgoing:
Baselines:
(1008) 3 "bbb"



On Wed, 18 Nov 2009 00:13:39 -0500, Chemi <jmordax> wrote:

On 13-Nov-09 5:09 PM, Andrew Hoo wrote:
Try "scm workspace replace-components"

On Wed, 11 Nov 2009 09:24:10 -0500, Chemi <jmordax> wrote:

I am reading the docs of SCM CLI but I am not able to find any way to
replace/refresh the content of a stream with another component
baseline or stream snapshot... any hint?

Thanks in advance,

Chemi.

Are workspace and stream interchangeable concepts in SCM CLI?

permanent link
Jose Miguel Ordax Cassa (2.4k4126100) | answered Nov 18 '09, 3:38 p.m.
On 18-Nov-09 6:13 PM, Andrew Hoo wrote:
Technically, streams and workspaces are often interchangeable, but
strictly speaking, no (due to casting reasons, and special semantics).
For the CLI, we try to doc when stream/workspaces can be used.


$ lscm help workspace replace-components
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 <workspace> <replace>
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 arg - Indicates the given baseline name is used to
replace components.
-o - Run the accept even though there are
uncommitted local changes. May cause an overwrite.
-P arg - Password for repository.
-r arg - URI specifying the location of repository.
-u arg - Username for repository.



As I reread this help, I see the args "replace-type" and "replace" are
confusing. They'd be better descripted as "source-type" and "source".

I just tried it out, what I did was "roll back" a baseline from 'bbb' to
'aaa':

adhoo@wsadhoo:~/jazzdev2/runtime-New_configuration/workspace/sdfsdfsdf$
lscm status -u TestJazzAdmin1 -P TestJazzAdmin1
Workspace: (1006) "New Workspace" <-> (1009) "theStream"
Component: (1007) "New Workspace Default Component"
Baseline: (1008) 3 "bbb"

adhoo@wsadhoo:~/jazzdev2/runtime-New_configuration/workspace/sdfsdfsdf$
lscm workspace replace-component -u TestJazzAdmin1 -P TestJazzAdmin1 -b
aaa 1009 workspace 1006 1007

adhoo@wsadhoo:~/jazzdev2/runtime-New_configuration/workspace/sdfsdfsdf$
lscm status -u TestJazzAdmin1 -P TestJazzAdmin1Workspace: (1006) "New
Workspace" <-> (1009) "theStream"
Component: (1007) "New Workspace Default Component"
Baseline: (1008) 3 "bbb"
Outgoing:
Baselines:
(1008) 3 "bbb"

Thanks... as I read the description and stream word didn't appeared I
thought it couldn't be used for my scenario. I will try it.

Thanks again,

Chemi.

permanent link
Andrew Hoo (1.0k1) | answered Nov 18 '09, 5:38 p.m.
JAZZ DEVELOPER
No problem. It is subtle in the help:

Usage: scm workspace replace-components <workspace>
<replace> <replace>
<b>workspace - Target workspace or stream (name, alias, or UUID)</b>

But for other cases, such as &lt;replace&gt; &lt;replace&gt; you'll notice you
have to be explicit when things are streams.


On Wed, 18 Nov 2009 15:33:26 -0500, Chemi &lt;jmordax&gt; wrote:

Usage: scm workspace replace-components &lt;workspace&gt; &lt;replace&gt;
workspace - Target workspace or stream (name, alias, or UUID)

permanent link
Jose Miguel Ordax Cassa (2.4k4126100) | answered Nov 25 '09, 2:23 a.m.
On 18-Nov-09 11:29 PM, Andrew Hoo wrote:
No problem. It is subtle in the help:

Usage: scm workspace replace-components &lt;workspace&gt; &lt;replace&gt;
b&gt;workspace - Target workspace or stream (name, alias, or UUID)&lt;/b

But for other cases, such as &lt;replace&gt; &lt;replace&gt; you'll notice you
have to be explicit when things are streams.

Hi Andrew, I come back to this topic and if I execute: &quot;scm help
workspace&quot; I don't get replace-components. Is it possible this is
something new in 2.0.0.2? I am using 2.0.0.1

BTW, after discovering snapshot promote concept... I think it is also
near to ClearCase Rebase concept. Right? But I am not able to find how
to promote a snapshot from SCM CLI. Any tip?


Thanks,

Chemi.

permanent link
Andrew Hoo (1.0k1) | answered Dec 03 '09, 9:23 a.m.
JAZZ DEVELOPER
Looks like you're right. replace-components is new to 2.0.0.2 (sorry if I
mislead you earlier). There is no promote snapshot command in 2.0.0.2
though. Feel free to open up an enhancement.

So if you can wait until 2.0.0.2, you'll have that and work item 100100
for &quot;create snapshot &lt;stream&gt;&quot; is fixed. And then if you are able to
always work directly on your target stream, you might not need the
&quot;promote snapshot&quot; functionality for now.

If I recall correctly, 'promote snapshot' in the RTC rich client doesn't
rebase the target stream (somebody correct me if I'm wrong), but it does
associate the snapshot with that stream for future lookup. I think in the
rich client, after running promote snapshot, you still need to do a
replace-components, or a deliver to get the baselines in the target stream.

With 2.0.0.1 here are some of your options:
- run &quot;create snapshot&quot; on a workspace (that has the same configuration as
your stream) instead of the target stream itself (due to 100100). That
will create your baselines and associate them with a snapshot. The
snapshot will be parented by the workspace but there's still no way to
reparent the snapshot to the stream using CLI commands. Then deliver the
baselines to the target stream.
- or run &quot;create baseline&quot; on each of the components in the target stream.
But then a snapshot isn't created for future reference.
- or grab the RC1 build of 2.0.0.2 from jazz.net. Only high priority
changes are going into 2.0.0.2 now, so the SCM CLI client should be the
same between now and the full release.

On Wed, 25 Nov 2009 02:18:02 -0500, Chemi &lt;jmordax&gt; wrote:

On 18-Nov-09 11:29 PM, Andrew Hoo wrote:
No problem. It is subtle in the help:

Usage: scm workspace replace-components &lt;workspace&gt; &lt;replace&gt;
b&gt;workspace - Target workspace or stream (name, alias, or UUID)&lt;/b

But for other cases, such as &lt;replace&gt; &lt;replace&gt; you'll notice you
have to be explicit when things are streams.

Hi Andrew, I come back to this topic and if I execute: &quot;scm help
workspace&quot; I don't get replace-components. Is it possible this is
something new in 2.0.0.2? I am using 2.0.0.1

BTW, after discovering snapshot promote concept... I think it is also
near to ClearCase Rebase concept. Right? But I am not able to find how
to promote a snapshot from SCM CLI. Any tip?


Thanks,

Chemi.



--

permanent link
Geoffrey Clemm (30.1k33035) | answered Dec 03 '09, 10:08 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Just to confirm, Andrew's statement about &quot;promote snapshot&quot; is correct
.... it just associates the snapshot with the stream (so it appears in
the list of &quot;snapshots for that stream&quot;), but has no effect on the
configuration of the stream.

Cheers,
Geoff

Andrew Hoo wrote:
Looks like you're right. replace-components is new to 2.0.0.2 (sorry if
I mislead you earlier). There is no promote snapshot command in 2.0.0.2
though. Feel free to open up an enhancement.

So if you can wait until 2.0.0.2, you'll have that and work item 100100
for &quot;create snapshot &lt;stream&gt;&quot; is fixed. And then if you are able to
always work directly on your target stream, you might not need the
&quot;promote snapshot&quot; functionality for now.

If I recall correctly, 'promote snapshot' in the RTC rich client doesn't
rebase the target stream (somebody correct me if I'm wrong), but it does
associate the snapshot with that stream for future lookup. I think in
the rich client, after running promote snapshot, you still need to do a
replace-components, or a deliver to get the baselines in the target stream.

With 2.0.0.1 here are some of your options:
- run &quot;create snapshot&quot; on a workspace (that has the same configuration
as your stream) instead of the target stream itself (due to 100100).
That will create your baselines and associate them with a snapshot. The
snapshot will be parented by the workspace but there's still no way to
reparent the snapshot to the stream using CLI commands. Then deliver the
baselines to the target stream.
- or run &quot;create baseline&quot; on each of the components in the target
stream. But then a snapshot isn't created for future reference.
- or grab the RC1 build of 2.0.0.2 from jazz.net. Only high priority
changes are going into 2.0.0.2 now, so the SCM CLI client should be the
same between now and the full release.

On Wed, 25 Nov 2009 02:18:02 -0500, Chemi &lt;jmordax&gt; wrote:

On 18-Nov-09 11:29 PM, Andrew Hoo wrote:
No problem. It is subtle in the help:

Usage: scm workspace replace-components &lt;workspace&gt; &lt;replace&gt;
b&gt;workspace - Target workspace or stream (name, alias, or UUID)&lt;/b

But for other cases, such as &lt;replace&gt; &lt;replace&gt; you'll notice you
have to be explicit when things are streams.

Hi Andrew, I come back to this topic and if I execute: &quot;scm help
workspace&quot; I don't get replace-components. Is it possible this is
something new in 2.0.0.2? I am using 2.0.0.1

BTW, after discovering snapshot promote concept... I think it is also
near to ClearCase Rebase concept. Right? But I am not able to find how
to promote a snapshot from SCM CLI. Any tip?


Thanks,

Chemi.



permanent link
Jose Miguel Ordax Cassa (2.4k4126100) | answered Dec 03 '09, 4:53 p.m.
On 03-Dec-09 3:55 PM, Geoffrey Clemm wrote:
Just to confirm, Andrew's statement about &quot;promote snapshot&quot; is correct
... it just associates the snapshot with the stream (so it appears in
the list of &quot;snapshots for that stream&quot;), but has no effect on the
configuration of the stream.

Cheers,
Geoff

Thanks for all comments... currently I am fine just delivering the
baselines from one stream to other and creating a new snapshot in the
new stream. And as Andrew suggested, I have opened an enhancement to
support the snapshot promotion also from SCM CLI (100955). I think it
could be interesting in some scenarios...

But I would appreciate if you can give me a brief description about why
it could be interesting promote a snapshot if it doesn't carry with him
the contained baselines. Why is this interesting or useful? Reading the
docs I just find the description but not a scenario where this could be
useful.

Thanks again,

Chemi.

permanent link
Geoffrey Clemm (30.1k33035) | answered Dec 04 '09, 12:38 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The primary purpose for associating a snapshot with a stream is so that
the snapshot appears in the list of &quot;snapshots for that stream&quot; (that
you can get from the GUI).

Cheers,
Geoff

Chemi wrote:
On 03-Dec-09 3:55 PM, Geoffrey Clemm wrote:
Just to confirm, Andrew's statement about &quot;promote snapshot&quot; is correct
... it just associates the snapshot with the stream (so it appears in
the list of &quot;snapshots for that stream&quot;), but has no effect on the
configuration of the stream.

Cheers,
Geoff

Thanks for all comments... currently I am fine just delivering the
baselines from one stream to other and creating a new snapshot in the
new stream. And as Andrew suggested, I have opened an enhancement to
support the snapshot promotion also from SCM CLI (100955). I think it
could be interesting in some scenarios...

But I would appreciate if you can give me a brief description about why
it could be interesting promote a snapshot if it doesn't carry with him
the contained baselines. Why is this interesting or useful? Reading the
docs I just find the description but not a scenario where this could be
useful.

Thanks again,

Chemi.

Your answer


Register or 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.