1

With git log my_file, I can see a list of commits (or rather a forest of branches and commits on them) involving my_file, inclduing dates and commit comments. How do I do this with ClearCase?

einpoklum
  • 118,144
  • 57
  • 340
  • 684
  • Note that ClearCase actually stores file-by-file revisions, so this is not really the same as Git's method: Git stores commits, not files, so it's following a *commit* chain and then looking for files with that *name*, rather than tracing a file object. The distinction shows up mostly with rename operations. Since ClearCase has an object ID for the *file*, it can track its use under different (and multiple simultaneous) name conditions, which Git can't. – torek Mar 15 '20 at 22:43
  • By the same token, though, sometimes that is the *opposite* of what you want. In the case of an Evil Twin file in ClearCase you may wind up following the wrong file. – torek Mar 15 '20 at 22:44
  • @torek: Indeed, it's not the same as in git. s/list/forest of commits. – einpoklum Mar 15 '20 at 23:03

2 Answers2

1

The two commands to consider are:

  • cleartool lshistory which applies to:

    • a pname, including an extended path name of the version you need
    • an object selector: for example, lbtype:V3.0
  • cleartool lsvtree, which is closer to a git log --all --branches, which lists part or all of the version tree of one or more elements.
    By default, the listing includes all branches of an element's version tree except for obsolete branches

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

Use:

cleartool lshistory /path/to/file

for that. Output will have one line for every action, with the fields:

  1. Date take (or time if it's recent)
  2. Acting user
  3. Action description (e.g. "create branch")
  4. File location + @@ + revision/branch specification (e.g. foo@@/bar/LATEST)

Enjoy.

einpoklum
  • 118,144
  • 57
  • 340
  • 684