Ramdas Nair
Ramdas Nair

Reputation: 278

Getting previous activity ids of a file in clearcase commandline

I'm using windows. I need to extract activity ids of check ins in ClearCase.

I can get the current one through cleartool describe and then parsing the response for the word 'Activity'.

I'm looking to get the activity ids of it's previous versions.
How can I do that?

Upvotes: 1

Views: 78

Answers (1)

VonC
VonC

Reputation: 1323483

You don't have to parse the output of cleartool describe, if you combine it with fmt_ccase.

That allows you to:

  • get the previous version of an existing version

     cd /path/to/view
     cleartool describe -fmt "%[version_predecessor]p" afile
    
  • get all activity id with that version involved:

     cd /path/to/view
     cleartool describe -fmt "%[activity]p" afile@@/a/previous/version
    

(that is using the version-extended pathname @@/... returned by the first cleartool describe)

Upvotes: 1

Related Questions