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.
Related
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.
I have an eclipsed file in my ClearCase dynamic view.
If I use ClearCase Explorer, I see it's eclipsed (the yellow moon icon).
If I check the command-line, I see it's eclipsed indeed.
When I use ClearTeam Explorer, it does not specify it's eclipsed (no text, icon or something like that). Since I tend to use the new explorer, I'm wondering how it should work on this situation?
It can depend on your ClearTeam version (release notes for 8.0), since
CM API support for dynamic views
The ClearCase CM API now supports dynamic views. For detailed information on API changes, refer to Technote 1566574.
Other than that, not of the ClearCase fixes reports any issue for eclipsed files.
I have a question about ClearCase activity IDs.
By default they are just strings, but is there any way to force them to be numerical ids? It does not appear to be a simple setting anywhere, so I thought perhaps there is some background script that has to be triggered if this is possible at all.
I want this to be automated/managed by the system, not left up to developers to plug in whatever id they want.
Thoughts? I'm using ClearCase 8 (UCM) on Windows. As well, most of our developers use the GUI as opposed to command line, if that makes a difference.
That wouldn't be covered by ClearCase directly.
If you are using full ClearCase (as opposed to CCRC or ClearTeam), you could deploy a wrapper for cleartool, which would intercept a cleartool mkact command and provide the right name according to your policy.
For ClearTeam, you would wrap rcleartool.
But in both cases, that would be a command-line solution.
One other alternative would be to control the activity name, through a pre-op mkact trigger.
From a snapshot view using base ClearCase, I want to checkout the latest version of a file from a branch that is NOT selected in my snapshot view. I would expect this to be possible, because you can do it from the version tree browser tool.
However, the documentation for the checkout command claims that you can't do this in a snapshot (emphasis mine): [edit: Yes you can! See below.]
Nonstandard checkouts
By default, the checkout command checks out
these versions:
The most recent version on a branch, if you are using a dynamic view
The version currently loaded in the view, if you are using a snapshot view
To modify a different version, you can either use the –version option or create a subbranch at that version. (See the mkbranch
reference page). Furthermore, from a single view, you can have only
one checkout per element at a time.
Note: When you work in a snapshot view, the only version of a
directory element that can be checked out is the version currently
loaded in the view. Therefore, the –version and –branch options do not
work.
How can I check out an unselected version from the command line?
[edit: Here I misread the "Note:" section. What the help means is that directories can't be checked out using the -version or -branch args, but normal files can be.]
The actual solution selected by the OP dss539 is to use cleartool checkout directly (see cleartool checkout man page)
cleartool checkout -bra/nch branch-pname | -ver/sion
It would work for files (not directories) in dynamic or snapshot view.
If you don't want to modify the config spec of your current snapshot file, then you can:
either use a separate view (a dynamic one in order to have the right version immediately selected), and modify at will the config spec of that other (dynamic view),
And copy the version back to your snapshot view.
See also "How would you select versions from a specific branch in ClearCase?" for config spec example.
...
Actually, you don't even need to modify the config spec of that dynamic view:
You can use the extended pathname of the version you want to directly access and copy the right version.
or use the cleartool get command (which is what "Send To" is doing on the version Tree).
See "clearcase command to backup predecessor version of a file?"
(You don't need a separate view here)
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.