I'd like to set-up a non-UCM clearcase (read only) view for debugging an issue reported on a old baseline which was delivered to customer.
How to view/retrieve/generate the config spec of the old baseline? so that I use this config spec to create a non-UCM clearcase view for debugging the issue.
The config spec is simple:
element * baseline_id
element * /main/0
element * /main/LATEST
(note that the /main/0 is important, especially in a multi-component vob, for the initial version of the component is registered in /main/0 when a new component is created)
What you need to find out is:
what is the baseline id? (which can differ from the baseline title).
See "Display Current Baseline with Cleartool".
You can for instance describe the stream to get the foundation baselines id:
cleartool descr -fmt "%[found_bls]CXp" stream:myStream#\myPVob
is the baseline a full or an incremental one? See "What is the difference between Full baseline and Incremental baseline in Clearcase UCM?".
If it is an incremental one, you need first to promote the baseline to a full one.
ct chbl -full -nc baseline:abaselinexxx.yyyy#\apvob
I think a much simple solution is to create a stream based on the baseline you have. That way you can even write into it without interfering nothing and even to save you changes in CC
It's very simple to create a stream based on a baseline, click the "advanced" option when creating stream as usual.
Enjoy,
Eli.
Related
I an new to ClearCase and started studying the ClearCase documentation.
UseCase : I have two branches - 'Branch_A' and 'Branch_B'.
I need to merge all my changes from 'Branch_A' to 'Branch_B'
I won't be able to use the ClearTeamExplorer, so only option is command line.
I read the documentation and its mentioned that cleartool findmerge command is the option for it.
But there is no direct example given for this.
Could someone please provide an command line example for this please?
Any help on this is appreciated.
Assuming a base ClearCase view/branch (no UCM views/Streams):
cleartool findmerge include a relevant example:
for the current directory subtree, compare versions visible in the current view against versions on another branch and perform any required merges.
cd /path/to/target/Branch_B/view
cleartool findmerge . –fversion /main/Branch_A/LATEST –merge –gmerge.
The idea is to be in the view set on the target branch, with a config spec ready to create new versions.
element * CHECKEDOUT
element * .../Branch_B/LATEST
element * /main/0 -mkbranch Branch_B
element * /main/LATEST -mkbranch Branch_B
The merge is done in the target view, on the target branch.
Now if you are using UCM, then the view done on a Stream has already the right config spec.
The idea remains the same: Execute the findmerge in the target view (after setting a dedicated activity, to record that merge)
In that case, check "How to merge changes from a specific UCM activity from one ClearCase stream to another"
You do not merge branches in UCM, you would merge UCM activities.
I have checked in some files in a branch but unfortunately I forgot the branch name but I remember my view name to which my branch is associated. I also checked my config spec but the branch which is written in the config spec is not the branch that I want.
Actually I created two branches in a view but one branch name I forgot and as I said in config spec also only one branch name is written. Is there any way where I can list all branches associated with a particular view?
No: only an UCM view has an associated branch (through its stream).
See "How to obtain UCM stream and baseline with cleartool?" or "How to get ClearCase stream name by a given view path?"
cleartool lsstream -fmt "%n" -cview
A non-UCM view would have any selection rules you want in its config spec.
You need to do a cleartool lsvtree /path/to/a/file (add --graph for the graphical view) in order to see its versions and the branches involved.
Is it possible to add a file in existing ClearCase baseline (Not the latest baseline) ?
Scenario :
There is a component , say CC_COMP having a number of baselines created over time. Consider below baselines in the component CC_COMP
BL_Latest
BL_New
BL_Older
BL_Oldest
There is a file FILE already present in BL_Lastest which is ONLY version in the VOB.
Now I want to add the same file FILE ( logically different but same in name ) in the baseline BL_Older.
How can I add that file in that older baseline?
No: a baseline is, by its very definition, immutable.
See for instance the article "The power of Unified Change Management"
These baselines are semantically rich objects that identify a "version" of a UCM component.
By using them, you can be certain that all files in that component are associated with the same version.
You can also be certain that the baseline will not change out from under you.
Once created, UCM baselines are immutable and can be used for defining higher-level configurations. An entire system, for example, can be assembled from a set of component baselines.
You need to:
create a substream to the stream where BL_Older was created
rebase or initialize that substream with the BL_Older baseline
add your file (using an UCM view associated with that stream)
make a new baseline BL_Older.1 for example.
I had some files in my view few days back and I need to recreate those files. Now I want to see which file changed from that period of time. Is it possible in clearcase to see the history of the view and to check what are the files that were changed from that period of time?
One solution is to make a snapshot view with time-based selection rules, with a config spec similar to:
element /myPath/... .../StreamName/{!created_since(16-Sep-2009)}
element /myPath/... /main/{!created_since(16-Sep-2009)}
element /myPath/... /main/LATEST
To quickly list all modified files since a certain daye, use a cleartool find command:
cleartool find <vobtag> -element "{created_since(target-data-time)}" -print
Not only can you compare it with your current view, and find what has changed, but you also can copy over the older files in your current view.
See also:
ClearCase : how to revert / get a snapshot view of a specific date/baseline?
Get all versions from a specific time - ClearCase UCM
Find files in Clearcase view newer than a specific date?
I'm using CC project explorer and when I right-click the stream I don't have possibility to choose the baseline. If I try to change the baseline on already existing snapshot CC says that I can't rebase on a baseline created in the same stream.
If I try to change the baseline on already existing snapshot CC says that I can't rebase on a baseline created in the some stream.
That is normal. It means some work (checkouts/checkins) have been done since the choice of the foundation baseline.
If you need to see (as in "just look, read-only access"), you can create another project with just one stream. On that empty stream, you will be able to select whatever baseline you need (as long as the associated component is non-modifiable, you will also be able to change that baseline).
Then you create your snapshot view referencing that new "consultation" stream.
The bottom line is that you cannot consult old baselines of a component on a stream where that same component is modifiable (and has been modified)
Another way to quickly consult the content of a Baseline is:
through dynamic view (because you skip the "update" -- loading of files -- entirely
more specifically a base dynamic view -- which does not reference any UCM stream.
in this dynamic view, you simply add a selection rule on your config spec:
element * MY_BASELINE_X.Y.Z
And here you go: instant access.
You will not be able to do any checkouts because ClearCase will detect those files are part of a UCM component.
But you will be able to:
explorer the files
edit the config spec and replace the baseline by any other baselines.
2 warnings:
use the complete name of the baseline, not its title
mount the correct vob (in a dynamic view, if no vob is mounted, you will not see one file!)