重新连接ClearCase视图到其流。

huangapple go评论90阅读模式
英文:

Reconnect ClearCase view to its Stream

问题

我重新将一个项目 VOB 从一个域迁移到另一个域,这是第二次迁移,之前在项目 VOB 第二次迁移之前在新域中创建的视图在注册表中看起来仍然正常(没有受到影响),但它们失去了与它们的流的连接。我该如何修复这个问题?这些是 Web 视图,重新创建它们将需要开发人员重新设置他们的工作空间。

不幸的是,@VonC 建议的方法似乎只适用于仍然与流有有效关联的视图。如果关联丢失(因为项目 VOB 被替换,就像我们的情况一样),chview 命令会出错。这是一个普通的动态 UCM 视图(失去了与其流的关联)的示例:

cleartool chview -stream CF_RL_04.03.00_DEV@\cf_pvob bfdeploy_CF_RL_04.03.00_DEV_dyn
cleartool: Error: 无法为非 UCM 视图 "bfdeploy_CF_RL_04.03.00_DEV_dyn" 设置流。
cleartool: Error: 无法将视图 "bfdeploy_CF_RL_04.03.00_DEV_dyn" 更改为流 "CF_RL_04.03.00_DEV"。

除此之外,此视图看起来正常:

cleartool lsview -l bfdeploy_CF_RL_04.03.00_DEV_dyn
Tag: bfdeploy_CF_RL_04.03.00_DEV_dyn
全局路径:\s-pmas-ibmrtm02.swe.la.gov\cc_storage\Views\SWE\bfdeploy\bfdeploy_CF_RL_04.03.00_DEV_dyn.vws
服务器主机:s-pmas-ibmrtm02.swe.la.gov
区域:swe
活动:否
视图标签 uuid:f027d0e0.66d3408d.b8ea.54:bb:fa:b8:a2:a2
视图位于主机上:s-pmas-ibmrtm02.swe.la.gov
视图服务器访问路径:D:\cc_storage\Views\SWE\bfdeploy\bfdeploy_CF_RL_04.03.00_DEV_dyn.vws
视图 uuid:f027d0e0.66d3408d.b8ea.54:bb:fa:b8:a2:a2
视图属性:ucmview
视图所有者:SWE\bfdeploy

请注意,在 lsview -l 输出中没有提到流。这是一个正常的动态 UCM 视图示例:

cleartool lsview -l bfdeploy_le_paymentinqdbpop_int_dyn
Tag: bfdeploy_le_paymentinqdbpop_int_dyn
全局路径:\s-pmas-ibmrtm02.swe.la.gov\cc_storage\Views\SWE\bfdeploy\bfdeploy_le_paymentinqdbpop_int_dyn.vws
服务器主机:s-pmas-ibmrtm02.swe.la.gov
区域:swe
活动:否
视图标签 uuid:316618d1.c0314d5a.ab38.bf:a2:3a:fd:a6:0c
视图位于主机上:s-pmas-ibmrtm02.swe.la.gov
视图服务器访问路径:D:\cc_storage\Views\SWE\bfdeploy\bfdeploy_le_paymentinqdbpop_int_dyn.vws
视图 uuid:316618d1.c0314d5a.ab38.bf:a2:3a:fd:a6:0c
视图属性:ucmview
视图所有者:SWE\bfdeploy

注销并重新注册孤立的视图(与其流分离)也无法解决问题(以下命令针对普通的 UCM 动态视图,以避免与 Web 视图的附加复杂性有关):

cleartool unreg -view D:\cc_storage\Views\SWE\bfdeploy\bfdeploy_CF_RL_04.03.00_DEV_dyn.vws
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

cleartool chview -stream CF_RL_04.03.00_DEV@\cf_pvob bfdeploy_CF_RL_04.03.00_DEV_dyn
cleartool: Error: 无法为非 UCM 视图 "bfdeploy_CF_RL_04.03.00_DEV_dyn" 设置流。
cleartool: Error: 无法将视图 "bfdeploy_CF_RL_04.03.00_DEV_dyn" 更改为流 "CF_RL_04.03.00_DEV"。

我还向 IBM 提交了一个案例,他们(Brian)确认这不是可以修复的问题。当你替换一个项目 VOB 时,视图与流之间的关联会丢失。必须重新创建视图。
他们表示视图应该被视为与纸巾具有相同的寿命。当然,花了很多时间在快照视图中设置工作空间的开发人员会有不同的看法!

英文:

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!

答案1

得分: 1

我会从以下内容开始:

cleartool lsview -long [view-tag]

输出将显示关于视图的大量信息。您应该能够在以stream:开头的行中找到与视图相关的流。

如果流不正确,您可以使用cleartool chview重新将视图关联到正确的流程:

cleartool chview -stream [stream-selector] [view-tag]

[stream-selector]替换为正确的流程,将[view-tag]替换为视图的标签。该命令将更改与 UCM 视图关联的流程。
我之前在这里提到了chview

通过重复执行cleartool lsview -long [view-tag]命令来验证重新关联是否成功。您应该会看到更新后的流程关联。

请记住,cleartool chview -stream命令仅适用于 UCM 视图。如果您使用的是 Base ClearCase 视图,则不适用流程概念。您需要手动修改配置规范以指向正确的分支或标签。

此外,最好在开发人员不使用视图时执行这些操作。请确保开发人员在进行这些更改之前备份任何未检入的工作。

M:\>cleartool chview -stream CF_RL_04.03.00_DEV@\cf_pvob 
jvandenm_CF_RL_04.03.00_DEV_web cleartool: Error: Cannot set the stream for non-UCM view "jvandenm_CF_RL_04.03.00_DEV_web". 
cleartool: Error: Could not change view "jvandenm_CF_RL_04.03.00_DEV_web" to stream "CF_RL_04.03.00_DEV"

然而,在处理 Rational ClearCase Web 视图时,命令行操作与动态或快照视图的情况不适用。您应该使用 ClearCase 远程客户端 (CCRC),这是与 Web 视图交互的工具。

在 ClearCase 远程客户端中,转到“ClearCase Navigator”视图。如果它不可见,您可以通过导航到“Window > Show View > Other > ClearCase > ClearCase Navigator”来打开它。

  • 在 ClearCase Navigator 中,您将看到您的视图。右键单击您要重新连接的视图,然后选择“Properties”(属性)。
  • 在属性窗口中,将有一个“Stream”(流程)部分。该字段是可编辑的,您可以从中选择正确的流程。选择视图的正确流程,然后单击“OK”。

当视图由于替换项目 VOB 而失去与其流程的关联时,它似乎以 ClearCase 工具不容易适应的方式变得“断开连接”。

因此,您可以尝试以下解决方法:

  1. 注销并重新注册视图:

    cleartool unreg -view [view-tag]
    cleartool reg -view [global-path-of-the-view]
    

    其中[view-tag]是视图的标签,[global-path-of-the-view]是您在lsview -l命令输出中看到的全局路径值。

  2. 一旦视图重新注册,您可以再次尝试cleartool chview命令以重新关联流程:

    cleartool chview -stream [stream-selector] [view-tag]
    

作为最后的手段,如果所有其他方法都失败,您可能需要重新创建视图并要求开发人员重新设置其工作区。我理解这不是一个理想的解决方案,但如果其他方法都失败,这可能是解决问题的最有效方法。

如果 IBM 支持已确认问题无法直接解决并且需要重新创建视图,那将是权威的建议。

未来,缓解这种情况的影响的一种方法可能是实施自动化设置开发人员工作区的脚本或工具。这可以帮助减少在重新创建视图后重新建立工作区所需的手动工作。

英文:

I would start with:

cleartool lsview -long [view-tag]

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:

cleartool chview -stream [stream-selector] [view-tag]

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 chview previously 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 -stream command 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.


M:\>cleartool chview -stream CF_RL_04.03.00_DEV@\cf_pvob 
jvandenm_CF_RL_04.03.00_DEV_web cleartool: Error: Cannot set the stream for non-UCM view "jvandenm_CF_RL_04.03.00_DEV_web". 
cleartool: Error: Could not change view "jvandenm_CF_RL_04.03.00_DEV_web" to stream "CF_RL_04.03.00_DEV"

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".

  • In the ClearCase Navigator, you will see your views. Right-click on the view you want to reconnect and choose "Properties".
  • In the Properties window, there will be a section for "Stream". That field is editable, and you can select the correct stream from here. Select the correct stream for your view and click "OK".

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:

  1. Unregister and reregister the views:

    cleartool unreg -view [view-tag]
    cleartool reg -view [global-path-of-the-view]
    

    Where [view-tag] is the tag of the view, and [global-path-of-the-view] is the Global path value that you see in the lsview -l command output.

  2. Once the view is reregistered, you can try the cleartool chview command again to re-associate the stream:

    cleartool chview -stream [stream-selector] [view-tag]
    

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.

huangapple
  • 本文由 发表于 2023年7月7日 01:54:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/76631408.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定