Delete ClearCase development stream - clearcase

In ClearCase, I created my own development stream by going to 'Join Project' and selecting my ClearCase project. Now, when I right click on my development stream, I was expecting to see an option for 'Delete Stream' but I cannot see it.
Is there a way I can delete it, or can it only be done by a ClearCase administrator?

You should be able to delete your Stream, provided:
it is your Stream (you created it when joining the project)
it is empty (no attached view, no activity)
Make sure, however, to right click on it on the right side of the project explorer (not on the left side).
See "Using mainline projects and composite baselines to manage large-scale J2EE development with IBM Rational ClearCase" for more on the ClearCase ProjectExplorer in general.

Ensure it is a stream you created yourself (e.g. that you own).
If there's an attached view to the stream, the view needs to be deleted first.
If the attached view has activities, they need to be deleted first.
If the activities have files checked in, they need to be discarded from the activity first.
Once all of this check list is completed, you can delete your empty stream:
While your empty stream is selected, click on "File" on the upper left corner, and select "Delete".
If I remember right, you can probably also use the "Delete" key on your keyboard.
I'm also pretty sure this "Delete" trick also works for empty activities attached to views.
That's it.

Related

Could i make a custom function in Clearcase's Toolbox ?

I want to make a new icon and a fuction for clearcase, i want to activate and deactivate the element * MAIN/LATEST function without to change manually the config spec.
I would like to have also the icon on my toolbox so i could know every time if MAIN/LATEST is active. My question is if someone could manipulate the clearcase's Toolbox. I was searching in google without to find out an answer!
The usual customization I see is through the ClearCase Context Menu Editor for Windows Explorer.
That would apply for Windows client only, and for ClearCase 7.x, not ClearTeam Explorer 8 though:
The tool that allows you to change the behavior of existing dialog boxes in Windows and ClearCase Explorer is ClearCase Context Menu Editor (tool called clearmenuadmin typical found in C:\Program Files\Rational\ClearCase\bin\clearmenuadmin.exe) which is available on all ClearCase Windows installations.
With the Context Menu Editor it is possible to:
Create new commands and other menu items available to ClearCase context menus.
Change properties of built-in and custom ClearCase context menu items.
Add items to or remove items from ClearCase context menus.
Test the changes to ClearCase context menus.
It would be good to know why you want to "disable /main/LATEST" and how you plan on doing that. Completely removing the line may cause problems if you need to create new elements, for example.
Whatever script that you're planning on using would need to:
Grab the current view configspec using cleartool getcs
Edit it to make the desired changes
use cleartool setcs {filename} to apply the changes
Some key "gotchas".
Removing /main/LATEST completely will break mkelem, unless have a "element * /main/0 -mkbranch {some branch}" rule.
If you use "-time now" to prevent seeing stuff on /main that others may still be checking in, that will work up to a point. This "now" means "when the configspec is recompiled" which can happen: on starting the view server process or if "cleartool setcs -current" is used to clear view caches.
Not having a configspec line for /main is intentionally introducing "no version selected by configuration" errors. As is using "element ... -none" rules. If you use snapshot or snapshot-derived view types (Web views, and likely Automatic views), you may see error messages on updating/loading views. You can ignore these messages, but only if you're aware they will happen. If you're doing automated updates (say as part of a build process) that tooling needs to be set up to ignore the "spurious" errors and catch the "real" ones.

Is there RTC-equivalent "Suspend mode" in ClearCase?

I found "Suspend Change-set" in RTC to be very useful, and since we're working with ClearCase as well (dozens of users) I'm wondering if that feature is also available in ClearCase as well.
If not - could it be generated by script/trigger/hook ?
We use UCM, and I'd like to explain my question:
if I have to deliver and I want to skip delivering one activity, I can decide not to deliver it (if no dependencies...) , so my question is regarding working on my current stream: Is that possible to "suspend" an activity from my current stream ?
Thanks in advance
Simply put, not easily.
RTC is basically ClearCase rewritten from scratch, and the "suspend" mode (also called stashed or shelve) takes advantage of the notion of applying a changeset (to any state of a repository)
The UCM changeset are a list of versions of files. Each version is tied to its predecessor, and you cannot easily remove it (unless you do some negative or subtractive merges), and then re-apply them later.
That being said, Reuven just contacted me this morning, because he had files in checked out in a snapshot view on a Stream which he wants to rebase (similar issue to your deliver problem).
A possible way to do that is to create another view (dynamic one), which you can use for your rebase, and then go back to your snapshot view and update it: it will detect the updated config spec (following the rebase) and will not erase any of your currently checked out files.
On the checkin, those files will be merged with the updated version.

ClearCase single stream UCM project: When are changes visible in a snapshot view?

Consider a single stream UCM project in ClearCase.
Each developer works in her own snapshot view on the integration stream of the project.
According to the ClearCase documentation when a developer completes an activity, the changes made by the activity become visible to the rest of the developers.
When developer A completes an activity P, are the changes of P immediately visible to developer B and C?
Or do B and C have to refresh their snapshot view in order to actually see the changes?
For a snapshot view (UCM or not), you always have to "cleartool update" your view in order to see the changes committed by your colleagues.
Note: the notion of "completing an activity" might suggest that you are actually using ClearCase with ClearQuest (which will check-in all checked out files associated with an activity, when the related ClearQuest work item is "completed").
This is valid for single-stream UCM projects as well as multi-streams: every time you have several snapshot views on a single stream, you need an update to see your colleagues' commits.

CCRC ClearCase Remote Client - Examining view configuration details

I'm using only CCRC - I don't have ClearCase locally installed.
I use CCRC Version: 7.1.1 Build id: 7.1.1.03.00_2010C.D100803
I'm working with a mature user of ClearCase - they have hundreds of work streams in a complex child parent relationship tree. When I create a view or stream CCRC offers me a picture of this complex tree and the location of my view (or stream if I'm creating a stream).
However, once my local view is set up there appears to be no mechanism for checking the location of any views. CCRC menus which 'show ClearCase view configuration' only show the load rules (i.e. which VOB's I'm currently selecting).
Another post to Stack Overflow tells me that '.ccase_wvreg' lists the local file paths where local copies of the files are stored. But '.ccase_wvreg' doesn't show the logical name of the views.
So how does CCRC find a map the logical view names and their configuration?
Is there another file I can examine (or other work around?) which would show me the complete view configuration.
The only workaround I have today (other than being incredibly careful and keeping png images of the stream as I set it up) is to commence the process of creating a new view or stream and retrace my steps.
Its surprising that being able to confirm the location of a view is so difficult - given what happens if one mistakenly checks in or deliver to the wrong stream!!
The CLI (Command Line Interface) for CCRC might be able to provide more information, espcially regarding the config spec of your view, in which there should be mentioned the name of the associated Stream.
catcs [-username user-name][-ser/ver server-url][-pas/sword user-password]\
[-tag view-tag]
But check first in the properties of the view. It can also include that information.

ClearCase : How Can I Revert to Earlier baseline?

How Can I Revert to Earlier baseline? We have a UCM parallel development(multi-stream) project. Each developer have a snapshot view on Project's Integration stream.
Developers want to see earlier version of the application in their snapshot views so They can debug early version of application to find bugs.
When I want to change an existing snapshot views's foundition baselines, clearcase does not allow me. So How Can I do this?
Since you employ the term Baseline, I will assume you are using UCM.
On a stream, you can not revert backward a baseline.
One possibility is to make a parallel stream, with the desired baseline as foundation: this is the quickest way.
After changes on this new stream, you can make a new rebase to change the foundation baseline, but only if that new rebase is using a more recent baseline from the parent stream (not an older baseline)
For your specific need, I would recommand a non-UCM snapshot view with a simple rule
element * thePreviousBaseline
In order for the developer to have:
his/her current UCM view for development (always set on the LATEST of a branch associated to a stream)
a second snasphot view set to whatever baseline he/she needs.
That second snapshot view is completely not-related to the UCM project and takes advantage of the "full" nature of the baseline (do check that your baseline has been put as "full", not "incremental". If it is "incremental", simply change its type and upgrade it to full)
So, beside your current snapshot UCM view, you can create anywhere you want a non-snasphot view:
cleartool mkview -snap -tag mylogin_myComponentname_csl_snap -vws myPathToViewStorage myPathToRootView
cd myPathToRootView
cleartool edcs
[add the selection rule: element * myOlderBaseline]
[add the load rule at the end: 'load /myVob_Including_MyComponent]
[save, type 'yes']
That is fine for consultation/execution, but if you need to patch (that i is to write, check out and in some files), then I would recommend one UCM stream per baseline to be patched.
That way, the stream clearly represents the patch effort for a given baseline. There should not be too many of them, unless you put into production a new version of your application every five minutes... which is not advisable ;)
So to summarize:
the non-UCM snapshot view is unique and serve for a quick consultation/debug of one older baseline at a time.
for patches (source modification), you create a parallel stream properly named, with the correct foundation baseline, and then a UCM view on it. You can not only debug but also fix some bugs in an activity, the deliver that activity to the main Int stream if that bug need to be retro-fitted on an higher stream.
(note: all bugs do not always need to be delivered: they can be obsolete when compared with the current state of the development)
The way I have solved this problem is by making another Stream, a child Stream of the Integration Stream. The easiest way to create this Stream is to open ClearCase Project Explorer (not Rational ClearCase Explorer) and navigate to the Project and then the Stream in question. Right click on the Integration Stream and select "Create Child Stream..."
Click "Advanced Options" and select a baseline for each component. Do this by selecting the component and then selecting "Change..." and selecting the specific baseline you want to see. You probably want to select "Prompt me to create a View for this Stream." Select "OK".
Any developer can do this. You don't need to be a VOB owner or Project or Stream owner.
Well, it depends. Actually, the answer lies in setting up your config spec to point to the proper files. Your config spec tells your view which versions of elements to look at. But how you do write it depends on your project's approach to baselines. Did you apply a label to mark that baseline? If so, and if you only want to read and not checkout anything new, your config spec can be as simple as
element * <LABELNAME>
If you didn't use labels, you can also set up your config spec to show you files based on dates. It gets more complicated the more rules you need to add to constrain your element choices. If you have more specifics, I can try to elaborate on what rules you might need. Otherwise, I would read the manuals that come with ClearCase. If you view the Extended Help from ClearCase Explorer, and then do "Viewing Rational ClearCase Manuals On-Line" it should give you some links to the Command References. This is where I go whenever I need to modify my config spec in some new way.
Also, note that we only use dynamic views, so I don't know if snapshot views work differently.

Resources