tags:

views:

52

answers:

2

I would like to display the content changed between two labels for a file specified.

I did this using find command of cleartool earlier, but this was a two way process:

  • First determine the elements changed between two labels using the -version switch in find
  • and then pass the two versions for a file in the diff serial switch to display the output.

What I need now is to have the same done using a single command wherein I will specify the filename and the two labels.
Any help will be appreciated.

+1  A: 

If you know the branch in which the labels have been applied, you can use the extended pathname, following the rule of version selector:
(See about the version-extended path)

cleartool diff myFile@@/main/myBranch/MY_LABEL1 myFile@@/main/myBranch/MY_LABEL2

if you don't know their full extended pathname, you need first a find, in any view (snapshot or dynamic), which visualize the file (at whatever version).

cleartool find myFile -ver "lbtype(MY_LABEL1)
  File@@/main/myBranch/MY_LABEL1

cleartool find myFile -ver "lbtype(MY_LABEL2)
  File@@/main/myBranch/MY_LABEL2

Once you have the full extended pathnames, you can use the cleartool diff.

VonC
I may not know the branch ,all that I have is the file name and the two labels.Basically a script is needed to first detemine the extensionpath info and then pass the same into the diff.
Raj
@Raj: I have extended my answer to address the lack of extended pathname.
VonC
A: 

Thanks that helped

Raj

Raj
Thank you for your feedback. However it would be preferable to remove this "answer" (which isn't an answer to your question) and copy its content as a comment below my answer ;) That is, unless you didn't find back your previous 'Raj' account, meaning you haven't enough rep point to comment other answer. In this case, simply contact [email protected], asking for merging the two accounts 412641 and 423592.
VonC