Search code examples
clearcase

How to find where a string was added at first in code, with ClearCase?


I want to find in which ClearCase label a specific string was added in code?

I am using base ClearCase.


Solution

  • I recommended before (8 years ago) to limit the scope of your search and use the exec clause of a cleartool find.

    Example:

    cleartool find -all -type f -user myLogin \
      -version "lbtype(A_LABEL)" \
      -exec ...
    

    If you can do so in a dynamic view, you can then directly grep the content of CLEARCASE_XPN, the variable set by cleartool find for each version found.
    It reference an extended pathname that (in a dynamic view) you can directly read and grep for your code)

    You can do so for each label you can find in your Vob, from the oldest to the newest.

    Z:myvob>ct lstype -kind lbtype -short
    Z:myvob>ct find . -version "lbtype(A_LABEL)" -print