有人在我的信息流里推荐了一个基线。我怎么知道如何推荐它?我只能看到谁创建了它,但没有得到任何推荐它的人的信息。是否有特定的命令来查看基线/流/视图等的历史记录?
发布于 2015-03-11 03:55:56
我不认为元数据是被记录的。
您可以检查policies attached to the UCM project though
POLICY_CHSTREAM_UNRESTRICTED如果没有设置,这意味着只有UCM项目的所有者可以更改流上的推荐基线。
否则,就像下面建议的那样,您将需要通过触发器自己捕获和记录该事件。
在ClearCase 7.x方面(CC8可能已经改变了),这是通过chstream上的预操作触发器完成的,但它必须处理两种类型的交互:
有关实例this thread,请参阅
recommend_bls触发器,可提前检查chstream是否未达到推荐的基线:
if ($ENV{CLEARCASE_CMDLINE}) {
# chstream run from the command line, check for a "-recommended" option
if ($ENV{CLEARCASE_CMDLINE} =~ /-recommend /) {
$msg->D( "this is a chstream to recommend a baseline",
"CLEARCASE_CMDLINE is: <$ENV{CLEARCASE_CMDLINE}>",
"trigger proceeding...",
);
}
else {
$msg->D( "EARLY OUT - this chstream command does not include a
baseline recommend:",
"CLEARCASE_CMDLINE is: <$ENV{CLEARCASE_CMDLINE}>",
);
exit 1;
}
}
else {
# chstream was run from the gui, must look at event records to
# determine if the command was a baseline recommend or
# some other change to the stream
my $lshist_rc = qx($CT lshist -minor -last 1 -me stream:$ENV{CLEARCASE_STREAM});
if ($?) {
# error in the lshist command, report trigger error
my @args = ("$CP proceed -type error -default abort -mask abort -newline -prompt \"***RECOMMEND_BL Trigger Version: $VERSION***\n\n<lshist> cmd failed on
stream:$ENV{CLEARCASE_STREAM}.\nResults:\n$lshist_rc\nPlease send a
screen print of this error to your ClearCase admin.\" -prefer_gui");
system (@args);
$msg->D( "Processing aborted - lshist command failed!",
"$lshist_rc"
);
exit 11;
}
chomp($lshist_rc);
# check latest stream event record to see if the chstream was
# a baseline recommend or some other change to the stream.
# a baseline recommend will have an event record of the form:
# "Set activity process variable named "UCM_STREAM_RECBLS".
if ($lshist_rc =~ /UCM_STREAM_RECBLS/) {
$msg->D( "this is a chstream to recommend a baseline",
"latest event record on stream is:",
"$lshist_rc",
"trigger proceeding...",
);
}
else {
$msg->D( "EARLY OUT - this chstream command did not include a baseline recommend:",
"latest event record on stream is:",
"$lshist_rc",
);
exit 1;
}
}https://stackoverflow.com/questions/28972808
复制相似问题