如何在没有应用标签的LATEST版本中找到所有元素? [英] How can I find all elements on a branch with version LATEST that has no label applied?

查看:60
本文介绍了如何在没有应用标签的LATEST版本中找到所有元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所述:
我想使用 LATEST查找分支上的所有元素(例如 DEV_BRANCH ) / code>版本,但尚未对其应用任何标签。

As the title said: I would like to find all elements that are on a branch (e.g. DEV_BRANCH) with LATEST version but that has not yet had any label applied to them.

我知道如何查找未应用 specific 标签的元素(例如:

I know how to find elements that does not have a particular label applied (as in:

  • ClearCase: How to find elements that do NOT have a particular label,
  • ClearCase: How to find files which was not labeled as "Label_Name" on CURRENT Version filtered by config spec)

但是我不知道如何查找缺少的元素没有应用 any 标签。

But I don't know how to find elements that hasn't got any label applied.

预先感谢
Mikael

Thanks in advance Mikael

推荐答案

最简单的方法是:


  • 使用右侧的版本查找所有元素分支


cleartool find . -type f -ele "version(.../myBranch/LATEST)" -print




  • 要求lsvtree和grep开头的括号(意味着至少有一个标签)

  • 
    cleartool find . -type f -ele "version(.../DEV_BRANCH/LATEST)" \
    -exec "cleartool lsvtree \"%CLEARCASE_PN%\"" | findstr "DEV_BRANCH\\[0-9]* ("
    

    您的查找中需要一个模式(或Unix上的grep)为了检测:

    You need a pattern in your find (or grep on Unix) in order to detect:


    • DEV_BRANCH

    • a' \ '

    • 版本号

    • 后跟一个空格''(表示有一个或多个标签)

    • DEV_BRANCH
    • a '\'
    • a version number
    • a space followed by a '(' (meaning there are one or several labels)

    为您提供所有带有标签的元素的列表。

    鉴于您可以在右侧分支中生成具有版本的任何元素的列表,因此您需要对两个列表进行比较以提取所有元素。第一个列表中的元素(右侧分支中的版本),但第二个列表中的元素(带有标签的元素)中没有。

    That will give you the list of all elements with any label on it.
    Given that you can generate the list of any element with versions in the right branch, you then need to diff the two lists in order to extract all elements from the first list (versions in the right branch) but not in the second one (element with a label).

    我不知道单线该解决方案将立即列出给定分支中没有标签的元素...

    I don't know of a one-liner solution which would list right away the elements with no labels on them in a given branch...

    这篇关于如何在没有应用标签的LATEST版本中找到所有元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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