1

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!

pop rock
  • 517
  • 1
  • 6
  • 14

2 Answers2

1

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:

http://www-01.ibm.com/support/docview.wss?uid=swg21158221&aid=1

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.
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • @poprock you can define a script called by a contextual menu on the dynamic view: that script can do whatever you need to, as it will have the name of the view in parameter. – VonC Feb 01 '16 at 16:13
  • @ok, now it's more clearly but could i change the color of a icon, so i could see that if it is red then main latest is active? – pop rock Feb 02 '16 at 08:28
  • @poprock that I do not think so. – VonC Feb 02 '16 at 08:30
0

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:

  1. Grab the current view configspec using cleartool getcs
  2. Edit it to make the desired changes
  3. 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.
Brian Cowan
  • 1,048
  • 6
  • 7
  • if i have a new configuration for a new release, and i dont want to use anymore the head FirstInclude.h but the NewInclude.h, and i forget to change a C code file because i have hundrents of them. Then with main latest the compiler finds the FirstInclude.h and i dont have an error but if i deactivate the Main Latest, then i have an erron during compiling and i could search for my error. – pop rock Feb 02 '16 at 08:25