I need to find all Versions checked-in by me on a branch

倾然丶 夕夏残阳落幕 提交于 2019-12-11 11:24:44

问题


In Clear Case, I need to find all Versions that checked-in by me

In the example below, I need to find all versions checked-in by Loi Wang, on branch "mybranch"

>$ct desc HelloWorld.xml <br >
version "HelloWorld.xml@@/main/***mybranch***/9" <br >
  created 09-Sep-09.06:50:14 by ***Loi Wang*** (lwang.eng@compu10) <br >
  "Hello world issue " <br >
  Element Protection: <br >
    User : jsmith   : r--<br >
    Group: eng      : r--<br >
    Other:          : r--<br >
  element type: xml<br >
  predecessor version: /main/mybranch/8<br >
  Attributes:<br >
    ISSUE = "IS-123"<br >

回答1:


The principle is to use cleartool lsco for checkout, and find for checking:

 cd c:\myView\myVob\...\mypath
 or
 cd /view/myView/myVob/.../myPath
 ct lsco -me -brtype myBranch -rec .

Note: you need to be in your view, and use the name of the branch without '@\PVobName' (a "non-qualified name")

In your case

 ct lsco -user lwang.eng@compu10 -brtype mybranch -rec .

This would give you all the elements having been checked-in:

 ct find . -user lwang.eng@compu10 -branch brtype(mybranch) -print

This would all the versions created during those checkins:

 ct find . -user lwang.eng@compu10 -version brtype(mybranch) -print

Again, mybranch is used in its "non-qualified" form

If the above does not work (it works for "-me" or "-user myName", but not necessarily for any other user), a simple grep could be enough:

 ct find . -version "brtype(mybranchv)" -exec "cleartool descr -fmt """%n %u\n""" %CLEARCASE_XPN%"|grep lwang.eng



回答2:


How about doing a ct lshistory , then grepping for your username.

That'd tell you all the versions of an element you'd created.

i.e on an element called foo.xml

ct lshistory foo.xml | grep spedge

You could even make it more complicated by grepping for the branch as well.

ct lshistory foo.xml | grep spedge | grep @@/main/my-branch


来源:https://stackoverflow.com/questions/1410505/i-need-to-find-all-versions-checked-in-by-me-on-a-branch

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!