How tor rebase only one component in stream using CLEARTOOL? - clearcase

Using ClerCase ver. 8
I would like to rebase only component GUI to a previous baseline, i.e. '8.107.22.168.2726' using cleartool. Please advise.

If the DUATB1_latest stream is an integration stream, that is: the main stream of an UCM project, you should be able to chose whatever baseline you want from the GUI component in order to change the baseline.
Use an UCM dynamic view associated to that stream, and cleartool rebase
cd /path/to/dynamic/view
cleartool rebase -bas 8.107.22.168.2726
cleartool rebase -complete
If that stream is a substream however, you cannot change its baseline (unless it comes directly from the parent stream): you would need to deliver that baseline (from its original stream to your current stream). That would not change the foundation baseline but at least it would merge that older baseline into your stream.

Related

How to list all modified files in actual view?

Is there a way to list all files modified since last deliver with clearcase ?
I'm using clearcase like this :
ct setview <myStreamName>
Then I work on files. But before deliver to integration stream, I want to check all modified file. Is there a way to list all file with pending changes and compare them with working revision ?
Edit :
<myStreamName> is a child stream with activities, created from integration stream.
Actually, that isn't quite right. The simplest way to see your pending changes is to run cleartool deliver -preview -long while set in your development view.
This will list all the undelivered activities and the versions on those activities, regardless of the component.
You can use diffbl, more or less, but you then have to delve into the mysteries of deliverbl baselines (created on every deliver operation listing the activities delivered in that deliver.) and use those baselines as a filter on the activities... This then gets more complicated because you can deliver the same activity multiple times if you delivered it, did more work on it, and then haven't delivered the additional work.
Just use deliver -preview -long...
setview will mask your current view, since you access your files directly through /vobs/yourVobs/.../yourfiles (as shown here).
If you are doing a deliver, that means you are using UCM and have set a baseline from your current view, on your current stream (that you are about to deliver to an integration stream).
If that is the case, do a diff between two baselines: (cleartool diffbl -ver baseline1#\apvob baseline2#\apvob)
the latest one of the integration stream.
the one you have set
For the first element, use a ct lsbl -comp C -stream S to get the latest baseline.
This assumes you are delivering one component.
I also mention deliver -preview in "ClearCase Inter project delivery": it needs an UCM view on the target UCM stream to operate.
See also "I need a list of all the component of a certain stream that still needs delivery to default".
The error message:
Error: Target stream "myStream" requires child development streams
to rebase to recommended baselines before performing deliver operation.
means the deliver policy "Require development stream to be based on the project's recommended baseline(s) prior to delivery)" is in place.
See "How to force rebase before each delivery?"
Try and change that policy, or, as enforced, rebase first.
Then do a deliver -preview.

How to copy contents of a baseline in Clearcase UCM?

I want to copy the contents of the integration stream at a certain baseline to a directory outside CC using command line, ie. I want to "export" a baselined version to use a Subversion term. I think the way to do this is to set the view to show the contents of the baseline and perform the copy - or is my thinking wrong for Clearcase? I'm more of a SVN/Git user :)
How can I set a baseline for a snapshot view of an integration stream on command line?
I'm using Clearcase UCM in Windows environment.
If the baseline has been created on that integration stream, you can:
create a child stream (immediately below that integration stream)
rebase it with any of the baselines created on the parent (integration) stream: chose the one you are after
create an UCM snapshot view on that child stream
The content of that snapshot view will be the one of the baseline you wanted to select.

Is it possible to create a development stream with specific moules from baseline in clearcase?

Is it possible to create a development stream with specific modules from baseline in clearcase ?
Scenario:
Integration stream baseline contains around 20 modules, out of them we wanted to have only 4 modules as part of new development stream. Is it possible to create development stream with specific modules from a baseline?
Yes it is: when you create a stream, it is empty by default.
If you are using the GUI (UCM project explorer), the new dev stream might have components if there are recommended baselines on the integration stream (in which case you can remove the extra components)
But if you are using the CLI (that is 'cleartool', the command line interface), you will create an empty stream, and you will rebase it with only the four baselines of the four components you want.
Use cleartool mkstream:
cleartool mkstream -in YourIntStream#\yourPVob YourDevStream#\yourPVob
You can see example of stream (and view creation and rebase) in this answer.
But once the stream is created (and empty), you can rebase it through the GUI.
If it has components (because of recommended baselines), you also can remove the extra components through the GUI.

ClearCase; How to make a baseline with cleartool

I am currently using ClearCase over a remote network and it is painfully slow. It takes forever just to browse to the stream that I want to make a baseline of. Is there a quick, easy, and safe way to make a baseline from the cleartool interface of a specific stream?
Thanks,
Ian
The basic command, from cleartool man mkbl:
cleartool mkbl -view anUCMView aBaselineName
You need a view associated to your target Stream to apply the baseline.
I recommend using the -full option, in order to create a full baseline (rather than an incremental one by default).
Using a snapshot or a dynamic view for mkbl shouldn't make a difference, but I like working in a snapshot view, and setting my baselines in a dynamic view (in which I am sure I don't have any pending checkouts).
See:
"What is the difference between Full baseline and Incremental baseline in Clearcase UCM?".
"How to apply baseline only to a particular component?" if you need to limit it to one component.
Note: this is for a full ClearCase installation, not CCRC (ClearCase Remote Client).

ClearCase: Creating baseline in snapshot view

with ClearCase UCM I can create a baseline in a snapshot view directory. When not all files are up-to-date, which version of a file is included in the baseline?
Example: version 3 of foo.txt is located in the snapshot view directory and there already exists a version 4 of this file. Which version of the file is referenced by the baseline?
Does this depends on the version of ClearCase (I am using ClearCase 7.1)? Do I have to consider something?
Background of the question: for a continuous integration build I want to use a snapshot view. When during creating or updating the snapshot view an other user checks in a file to the same stream this new version may or may not be part of the snapshot. At least I want be to be able to identify which files in my snapshot directory have been used by the build.
About Baselines: A mkbl depends on the selection mechanism (the config spec)
of the local access mechanism (snapshot or dynamic view) providing said selection mechanism.
For each element in the component, the baseline records the version of that element selected by the stream's configuration at the time mkbl is executed.
So the -view parameter is only there to reference the Stream (and its associated config spec):
-vie/w view-tag
Specifies the view from which to create baselines. Baselines are created in the stream that the view is attached to.
For example, if you are working in coyne_dev_view, but want to create a baseline from the configuration specified by the view coyne_integration_view, use -view coyne_integration_view.
This option creates a baseline in the project's integration stream that includes all the checked-in versions contained in coyne_integration_view.
If you do not specify view-tag, the current view is used.
In your case, if your UCM view is supposed to select v4, but is currently selecting v3 because that snapshot view hasn't been updated yet, the baseline should reference v3 (what is currently selected by the view).
So for your background question, best to perform a cleartool update before the mkbl.

Resources