ClearCase 是否有快照视图触发器?

发布于 2024-08-28 01:55:14 字数 79 浏览 1 评论 0原文

看来 ClearCase 中的触发器可扩展性功能必须由所有者附加到 VOB。我想要类似的东西,我可以自己管理我的本地快照视图。存在这样的功能吗?

It seems like the Trigger extensibility feature in ClearCase has to be attached to a VOB by the owner. I would like something similar that I can administer myself for my local snapshot views. Does such a feature exist?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

相思故 2024-09-04 01:55:14

ClearCase 中的每个视图没有“本地触发器”。

当您创建 触发(使用 mktrtype),您可以:

  • 将其附加到 VOB
  • 通过读取环境变量 CLEARCASE_SNAPSHOT_PN

检查您是否处于快照视图中

(在快照视图中执行的所有操作)发生导致触发器触发的操作的快照视图目录的根路径。

  • 通过读取环境变量 CLEARCASE_VIEW_KIND 检查您是否处于快照视图中

(所有操作)发生导致触发器触发的操作的视图类型;该值可以是动态、快照或快照网络。

  • 通过读取视图标签 CLEARCASE_VIEW_TAG 检查您是否处于正确的视图中

(所有非 UCM 操作;对于 UCM,所有交付和变基操作以及 setactivity)发生导致触发器触发的操作的视图的视图标记。

  • 检查触发器是否应为正确的用户执行自身:CLEARCASE_USER

(全部)发出导致触发器触发的命令的用户;派生自 UNIX 或 Linux 真实用户 ID 或 Windows 用户 ID。


有了所有这些元素,您就可以编写一个能够调用快照视图中版本化的自定义脚本的脚本,这意味着按照约定(在预先定义的路径中),您可以为快照视图定义由用户管理的脚本。

但除非您尝试这种间接方式,否则 ClearCase 不会直接提议本地触发器。

There is no "local trigger" per view in ClearCase.

When you create a trigger (with mktrtype), you can:

  • attach it to a VOB
  • check if you are in a snapshot view by reading the environment variable CLEARCASE_SNAPSHOT_PN

(All operations executed in a snapshot view) The path to the root of the snapshot view directory in which the operation that caused the trigger to fire took place.

  • check if you are in a snapshot view by reading the environment variable CLEARCASE_VIEW_KIND

(All operations) The kind of view in which the operation that caused the trigger to fire took place; the value may be dynamic, snapshot, or snapshot web.

  • checking if you are in the right view by reading the view tag CLEARCASE_VIEW_TAG

(All non-UCM operations; for UCM, all deliver and rebase operations and setactivity) View tag of the view in which the operation that caused the trigger to fire took place.

  • check if the trigger should execute itself for the right user: CLEARCASE_USER

(All) The user who issued the command that caused the trigger to fire; derived from the UNIX or Linux real user ID or the Windows user ID.


With all those elements, you could write a script able to call a custom script versioned in the snapshot view, which means by convention (in a path defined in advance) you could define a script managed by the user for a snapshot view.

But unless you try that kind of indirection, there is no local trigger proposed directly by ClearCase.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文