1

We are using base ClearCase with ClearQuest integration and whenever a checkin is made, a hyperlink with the WorkRequest number in ClearQuest is attached to the checked in version. I could look at the changeset of the WorkRequest in ClearQuest, but would like to be able to find all files in ClearCase so that we can automate our processes.

Is there anyway to find a version of a file based on the attribute value of an attached hyperlink?

ie. describing a file lists the hyperlinks:

Hyperlinks:
    CrmRequest@50304@\java "WorkRequest" ->  "HUBUB00081581"

and then describing the hyperlink shows the attributes:

Attributes:
    HlinkFromText = "WorkRequest"
    HlinkToText = "HUBUB00081581"

So I would like to be able to find all files which have a hyperlink called "CrmRequest" whose attribute "HlinkToText" has a value of "HUBUB00081581"

2 Answers2

0

You could use a find command in order to display the value of each version which has an "CrmRequest" hyperlink, and grep on the right value:

Unix:

cleartool find . -version "hltype(CrmRequest)" -nxname -exec 'cleartool desc -l "$CLEARCASE_PN"' | grep HUBUB00081581

Windows:

cleartool find . -version "hltype(CrmRequest)" -nxname -exec "cleartool desc -l \"%CLEARCASE_PN%\"" | grep HUBUB00081581
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks but it's not quite what I am after. grep isn't available on the windows machine and even if it was, it would only return the name of the WorkRequest, not the filename which is on a different line. – troy.williames Aug 26 '12 at 21:48
0

I decided to create a checkin trigger which would read the cache file holding the associated work request number and then apply an attribute to the relevant version using this value. We can now do a find based on the attribute values rather than delving down to the hyperlink; it's also more visible through a version tree.

Thanks!