I'm trying to figure out how can I switch between multiple ClearCase regions without going and modifying the ClearCase properties every time.
Any help would be appreciated.
Even in the latest ClearCase 9.0.1, changing the region does involve changing the ClearCase properties: see "Assigning a Rational ClearCase host's registry and region".
What you can do (if you don't want to fully switch region through registry/properties) is take advantage of the -reg/-region
option for some command.
See for instance cleartool lsview -reg newtwork-region
: you can list views of other regions without changing your current one.
But that remains limited to listing resources (Vobs, Views).
Once you are using commands within a view (lscheckout, checkout, ...), said commands are expected to work within the current region.
You might need to consider registering (cleartool register
) a view from another region into the registry of this current region.
The alternative, as mentioned in the comments, is to modify the registry, as with this Javascript program REGION_SWITCHER.js
from 2005.
Source code.
It modifies:
HKEY_LOCAL_MACHINE\SOFTWARE\Atria\ClearCase\CurrentVersion\Region