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.
Related
Removing merge arrows and versions of files is straightforward using the ClearCase CLI. However, I only can manipulate our UCM via the Eclipse Clearteam Plugin and I do not have access to the command line.
Right now the version tree in the area I want to manipulate looks like this:
For reference, here is the toolbar that I have at the ready. The help menu only described how to make merges, not cancel them:
How do I remove a merge through the Clearteam application shown?
There is not much option that doing the equivalent of a cleartool rmver of the target version of the merge arrow. (right-click on the target version, and select delete)
And that would even not be enough, as ClearCase should refuse the rmver, considering the version is reference by the merge hlink, or part of other UCM metadata (baselines, stream, ...)
If that is the case, then the GUI alone would not be enough, as opposed to the CLI rmver -xhlink.
You might consider adding a custom action menu to your ClearTeam Explorer in order to try and replicate the rmver -xhlink using the CM API (libraries and documentation are an option when you install ClearCase), but I don't know if said library can go that far.
If you're using web views and can only work in the GUI, there isn't a way to remove any type of hyperlink.
Nor does the rcleartool command support the rmhlink command. rcleartool doesn't allow rmver either. All you can do is remove the version.
I am using Clearteam Explorer 8. I recently was browsing a project folder which contained a symbolic link. Explorer said that I would need to enable something in order to follow the link. I said ok.
Now it insists on showing me every possible folder in all of my views including unloaded ones. The folders have no contents, but it makes all views really hard to navigate as there is a lot of chaff in the view's tree.
I cannot find where this option is set/unset because I set it in response to a one-time prompt. Does anyone know how to turn this off and have it only show me loaded folders?
Check in the Load Rules tab of the "Edit Configuration" dialog box, for Web views only, if you have the option "Show Obsolete Directories and Files" selected.
Un-selecting this option might help.
If you can edit the config spec of your view, you can add cleaning rules, like:
element /avob/* -none
If you placed it just before the last one (element * /main/LATEST), that would hep ClearCase to not select at all any element which wasn't already selected before by the config spec selection rules.
I had the same problem and I solved it by:
Removing the parameter ccvtreeviewer.fetchFullTree=true from file com.ibm.rational.clearcase.prefs. On my machine, this file is located in folder: C:\Documents and Settings\UserName\.Rational\CTE8\workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.ibm.rational.clearcase.prefs
Editing the file com.ibm.rational.team.client.ui.model.prefs and update theses parameters:
appliedTreeRules_0=com.ibm.rational.clearcase.ui.actions.ShowLoadedVobsAction|Public and Private VOBs|true|true|true|System;
nonappliedTreeRules_0=com.ibm.rational.clearcase.ui.actions.ShowUnloadedVobsAction|Unloaded VOBs|true|false|false|System;com.ibm.rational.clearcase.ui.actions.ShowUnloadedElementsAction|Unloaded Elements|true|false|false|System;com.ibm.rational.clearcase.ui.actions.ShowLoadedPrivateVobsAction|Private VOBs only|true|true|false|System;com.ibm.rational.clearcase.ui.actions.ShowLoadedPublicVobsAction|Public VOBs only|true|true|false|System;com.ibm.rational.clearcase.ui.actions.ShowUnmountedVobsAction|Unmounted VOBs|true|false|false|System;
I have noticed the behavior of a Dynamic view is different than a web view with the following config spec:
element * CHECKEDOUT
element * MYLABEL
element * /main/latest
With a web view, my view is filtered by MYLABEL.
But in Dynamic views, I always get the "latest" files.
What am I doing wrong?
It depends on:
the config spec of the dynamic view
(you need to double-check if it is the same than the web view, with a cleartool catcs)
the files you are considering (that LABEL might not be applied on all those files)
how long the web view was updated: a web view is basically like a snapshot view: you might see those versions now, but if the label was moved, then a refresh might give you different result.
Beside that, there is no differences in the selected versions a web view or a dynamic view would return.
The OP Kevin Zamora adds in the comments:
I got it to work.
The problem is that Clearteam explorer is slowwww... and if you work remotely, it could take forever (and we reportedly have a fast connection).
Even at work, it takes many seconds.
Also, I notice that you have to kill the show version tree window and restart it completely. Sometimes the window doesn't update properly.
My company has recently switched from using Perforce to Rational ClearCase for version control.
In the P4Win client it was possible to select View -> Entire Depot and browse depot files that were outside my client spec and this was useful for figuring out exactly what I needed to add to my client spec.
Significantly this avoided the need to synch the files from the depot before viewing them, and was therefore quicker.
I'm now using ClearTeam Explorer and can't seem to find an equivalent. I'd like to have this for a similar purpose, to figure out exactly what I need in the load rules for my snapshot view and also to decide what views I need to create.
Does anyone know if it is possible to view what files exist under a project in ClearTeam Explorer without first creating a view on the project / joining it?
ClearTeam Explorer is basically a trimmed down Eclipse with ClearCase specific plugins.
thanks.
The easiest way would be to create a dynamic view (you need to add -stream yourStream#\yourPvob to the mkview command, I know it looks like you "joining a project", but still, dynamic view are quick to setup).
The idea is to configure your config spec with the right selection rules (a dynamic view will display the files instantly), and then make your snapshot view with those same selection rules (and the appropriate load rules, specific to a snapshot view)
Note that, according to the CCRC wiki:
With the Release of v8.0, the ClearTeam Explorer is the common Eclipse UI client that supports MVFS on native clients, as well as webviews.
CM Server in 7.1.x was renamed to CCRC Wan Server in v8.
If you don't have cleartool installed, that means you are using webviews (which are snapshot views with web access to the CCRC Wan server).
In that case, there is no easy way to browse any code from any Baseline (other than joining a project)
FWIW now, wanted to suggest a different solution here.
I would create a web view on the stream with empty load rule.
This will ensure a faster view creation.
Then from ClearTeam Navigator menu, I will enable the options to show
Unloaded VOBs
Unloaded Elements
This will ensure that the unloaded elements chosen from my element rules are displayed in ClearTeam Details and ClearTeam Navigator.
Note: You need to be connected to the CCRC server to view the unloaded elements.
Then I can browse the file structure and decide which files needs to be added to my view's load rule.
Or I can just right click on any unloaded/partially loaded resource and select "Load Resource..." which will load the item to my view.
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.