I re-migrated a Project VOB from one domain to another a second time and views that were created in the new domain before the Project VOB was migrated a second time still look fine in the Registry (it was not impacted), but they lost their connection to their Stream. How do I fix that? These are Web views, and recreating them would require the developers to re-setup their workspaces.
Unfortunately, what @VonC suggested only appears to work for views that still have a valid association with a stream. If the association is lost (because the Project VOB was replaced as in our case), a chview command errors out. This is for a regular dynamic UCM view (that lost its association with its Stream):
cleartool chview -stream CF_RL_04.03.00_DEV@\cf_pvob bfdeploy_CF_RL_04.03.00_DEV_dyn
cleartool: Error: Cannot set the stream for non-UCM view "bfdeploy_CF_RL_04.03.00_DEV_dyn".
cleartool: Error: Could not change view "bfdeploy_CF_RL_04.03.00_DEV_dyn" to stream "CF_RL_04.03.00_DEV".
This view looks ok otherwise:
cleartool lsview -l bfdeploy_CF_RL_04.03.00_DEV_dyn
Tag: bfdeploy_CF_RL_04.03.00_DEV_dyn
Global path: \\s-pmas-ibmrtm02.swe.la.gov\cc_storage\Views\SWE\bfdeploy\bfdeploy_CF_RL_04.03.00_DEV_dyn.vws
Server host: s-pmas-ibmrtm02.swe.la.gov
Region: swe
Active: NO
View tag uuid:f027d0e0.66d3408d.b8ea.54:bb:fa:b8:a2:a2
View on host: s-pmas-ibmrtm02.swe.la.gov
View server access path: D:\cc_storage\Views\SWE\bfdeploy\bfdeploy_CF_RL_04.03.00_DEV_dyn.vws
View uuid: f027d0e0.66d3408d.b8ea.54:bb:fa:b8:a2:a2
View attributes: ucmview
View owner: SWE\bfdeploy
Note that there is no mention of the Stream in the lsview -l output. This is for a working dynamic UCM view:
cleartool lsview -l bfdeploy_le_paymentinqdbpop_int_dyn
Tag: bfdeploy_le_paymentinqdbpop_int_dyn
Global path: \\s-pmas-ibmrtm02.swe.la.gov\cc_storage\Views\SWE\bfdeploy\bfdeploy_le_paymentinqdbpop_int_dyn.vws
Server host: s-pmas-ibmrtm02.swe.la.gov
Region: swe
Active: NO
View tag uuid:316618d1.c0314d5a.ab38.bf:a2:3a:fd:a6:0c
View on host: s-pmas-ibmrtm02.swe.la.gov
View server access path: D:\cc_storage\Views\SWE\bfdeploy\bfdeploy_le_paymentinqdbpop_int_dyn.vws
View uuid: 316618d1.c0314d5a.ab38.bf:a2:3a:fd:a6:0c
View attributes: ucmview
View owner: SWE\bfdeploy
Unregistering and reregistering an orphaned view (detached from its Stream) also does not fix the problem (commands below are against a regular UCM dynamic view to avoid the additional complexities with Web views):
M:\>cleartool unreg -view D:\cc_storage\Views\SWE\bfdeploy\bfdeploy_CF_RL_04.03.00_DEV_dyn.vws
M:\>cleartool register -view -host s-pmas-ibmrtm02 -hpath D:\cc_storage\Views\SWE\bfdeploy\bfdeploy_CF_RL_04.03.00_DEV_dyn.vws D:\cc_storage\Views\SWE\bfdeploy\bfdeploy_CF_RL_04.03.00_DEV_dyn.vws
M:\>cleartool chview -stream CF_RL_04.03.00_DEV@\cf_pvob bfdeploy_CF_RL_04.03.00_DEV_dyn
cleartool: Error: Cannot set the stream for non-UCM view "bfdeploy_CF_RL_04.03.00_DEV_dyn".
cleartool: Error: Could not change view "bfdeploy_CF_RL_04.03.00_DEV_dyn" to stream "CF_RL_04.03.00_DEV".
I also opened a Case with IBM for this and they (Brian) confirmed this is not something that can be fixed. When you replace a Project VOB, the associations between views and Streams are lost. The views have to be recreated. They state that views should be considered to have the same longevity as tissue paper. Of course, developers who spent a lot of time setting up a workspace in a snapshot view would have a different view!
I would start with:
The output will display a lot of information about the view. You should be able to find the associated stream in the output with a line that starts with
stream:.If the stream is not correct, you can re-associate the view to the correct stream with
cleartool chview:Replace
[stream-selector]with the correct stream and[view-tag]with the view's tag. That command changes the stream associated with the UCM view.I mentioned
chviewpreviously here.Validate if the re-association is successful by repeating the
cleartool lsview -long [view-tag]command. You should see the updated stream association.Keep in mind that
cleartool chview -streamcommand only works for UCM views. If you are using Base ClearCase views, the stream concept does not apply. You would need to modify the config spec manually to point to the correct branch or label.Also, those operations should ideally be done when the developers are not using the views. Please ensure the developers back up any un-checked-in work before you make these changes.
However, when dealing with Rational ClearCase Web views, command line operations are not applicable as in the case of dynamic or snapshot views. You should use the ClearCase Remote Client (CCRC) instead, which is the tool designed for interacting with Web views.
In the ClearCase Remote Client, go to the "ClearCase Navigator" view. If it is not visible, you can open it by navigating to "Window > Show View > Other > ClearCase > ClearCase Navigator".
When a view loses its association with its stream due to the Project VOB being replaced, it seems to become "disconnected" in a way that the ClearCase tools do not readily accommodate.
You can therefore try the following workaround:
Unregister and reregister the views:
Where
[view-tag]is the tag of the view, and[global-path-of-the-view]is the Global path value that you see in thelsview -lcommand output.Once the view is reregistered, you can try the
cleartool chviewcommand again to re-associate the stream:As a last resort, you may need to recreate the views and ask the developers to set up their workspaces again. I understand this is not an ideal solution, but it may be the most efficient way to solve the issue if all else fails.
If IBM support has confirmed that the issue cannot be resolved directly and that the views need to be recreated, that would be the authoritative advice.
Moving forward, one way to alleviate the impact of such situations could be to implement scripts or tools that automate the process of setting up developer workspaces.
This could help reduce the manual effort involved in re-establishing a workspace after the view has been recreated.