看来 ClearCase 中的触发器扩展性功能必须由所有者附加到 VOB。我想要类似的东西,我可以自己管理我的本地快照 View 。有这样的功能吗?
最佳答案
ClearCase 中的每个 View 没有“本地触发器”。
当您创建trigger时(使用 mktrtype
),您可以:
- 将其附加到 VOB
- 通过读取环境变量
CLEARCASE_SNAPSHOT_PN
来检查您是否处于快照 View
(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.
- 通过读取环境变量来检查您是否处于快照 View
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.
- 通过读取 View 标签来检查您是否处于正确的 View
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.
- 检查触发器是否应为正确的用户执行自身:
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.
使用所有这些元素,您可以编写一个能够调用快照 View 中版本化的自定义脚本的脚本,这意味着按照约定(在预先定义的路径中),您可以为快照 View 定义由用户管理的脚本.
但是除非您尝试这种间接方式,否则 ClearCase 不会直接提议本地触发器。
关于triggers - ClearCase 是否有快照 View 触发器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2587777/