如何通过给定的 clearcase 流(windows)获取 pvob 名称? [英] How to get pvob name by a given clearcase stream (windows)?

查看:19
本文介绍了如何通过给定的 clearcase 流(windows)获取 pvob 名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设用户提出请求:

我无法传送表单流spider_dev"

而且那个用户也没有提到视图名称.

And that user didn't mention view name as well.

如何获取 PVOB 名称?
我们的 ClearCase 环境太大(大约 300 个 vobs).去每一个VOB并检查是非常困难的.

How do I get the PVOB name?
Our ClearCase environment is too big (around 300 vobs). It's very difficult to go each and every vob and check.

推荐答案

假设您只提供了流名称 "spider_dev" 而没有其他任何内容.在羞辱开发人员没有帮助我帮助他之后,考虑使用以下命令循环通过 vobs 并定位流(我没有在多站点工作,所以 YMMV,也标记为 Windows,所以转换为 PowerShell/DOSShell req'd):

Assume you have been provided only the stream name "spider_dev"and nothing else. After shaming the developer for not helping me help him, consider the following commands to cycle thru the vobs and locate the stream (I have not worked in multi-site, so YMMV, also tagged as Windows, so conversion to PowerShell/DOSShell req'd):

MY_STREAM=spider_dev # 你正在寻找的流

获取所有 vobs 的列表:

Get a list of all the vobs:

VOB_LIST=$(cleartool lsvob| grep ucmvob| cut -c3-| awk '{print $1}')
# list all vobs, match ucmvob, chop the active indicator (*), print the value

循环遍历 vobs 以查找匹配的开发流:

Cycle through the vobs to find matching dev streams:

MY_STREAM=spider_dev   # the stream you're looking for
for vob in ${VOB_LIST}; do
   for stream in $(cleartool lsproject -obs -fmt "%[dstreams]p\n" -inv ${vob}); do
      if [[ ${stream} == ${MY_STREAM} ]]; then
         echo  "!!! ${stream}@${vob}"
         break
      fi
   done
done

既然您知道流的位置,请找到交付状态:

Now that you know where the stream is, find the deliver status:

cleartool delivery -status -stream ${stream}@${vob}

结果将采用以下形式:

Deliver operation in progress on stream "stream:spider_dev@/vobs/my_pvob"
    Started by "username" on "2016-03-15T12:34:56Z"
    Using integration activity "deliver.activity".
    Using view "user_view".
    Activities will be delivered to the default target stream stream:spider_int@/vobs/my_pvob"
in project "project:spider@/vobs/my_pvob".

Baselines to be delivered:

您当然可以根据需要将其包装成 shell 命令、函数、批处理脚本等.我们有大约 250 个 vobs 和 4000 个分支,并编写了许多小实用程序来帮助我们管理许多类似的问题,所以感受一下你的痛苦.

You can of course wrap this up into a shell command, functions, batch script, etc. as appropriate. We have some 250 vobs w/4000 branches and had scripted many little utilities to help us manage many similar problems, so feel your pain.

最后,提醒用户下次提供更多详细信息时,帮助会更直接,如果提供的详细信息较少,则需要的时间会过长.

Finally, remind the user next time help will be more forthcoming with more details and take inordinately longer when fewer details provided.

这篇关于如何通过给定的 clearcase 流(windows)获取 pvob 名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆