2

I have tried to get the full history of a clearcase vob to parse it and use it with gource to get a visual representation of the changes, but I do not find the right commands to get an easy log history to parse with clearcase2gource python script. I do not use UCM, there are no streams, just plain cleacase.

With this command I get elements with @@ in the middle of a path:

cleartool lshistory -fmt "Element: %n| Date: %d| User:%u| Operation: %e| Object:%[type]p| SimpleType: %m| OperationKind: %o\n" -all /vobs/vob_name

With this command I get elements like this (deleted at some point):

Element: /vobs/vob_name/dir1@@/main/branch_dev/2/dir2/main/branch_pilot/1/file@@/main/branch_pilot/1| Date: 2008-04-15T16:58:28+02:00| User:reeasjp| Operation: create version| Object:compressed_file| SimpleType: version| OperationKind: checkin

That makes more difficult to parse for gource because of several branch names in the middle.

Is there any way to get a full history of all the elements with just plain directories and file names?

Thanks in advance.

NOTE: In the config Spec I have just "/main/LATEST".

Curro
  • 21
  • 1

1 Answers1

0

The issues are:

    e = d['Element']
    splitElement = e.split("@@")
    d['FileName'] = splitElement[0]
    d['StreamName'] = splitElement[1]
    # StreamName starts with /main/ which we aren't interested in.
    # Remove the /main/ (slice on 5 because there are 5 chars in /main/)
    d['StreamName'] = d['StreamName'][5:]
  • the cleartool lshistory --all will list history of deleted elements (non-visible anymore in the current ClearCase view), hence the multiple branch names.

The easiest solution would be to:

  • redirect the cleartool lshistory output to a file, and
  • then filter out all the extended paths which don't conform to clearcase2gource.py expectation: for instance, just for testing, keep only the ones in a specific branch or in /main only, just to see if that works better.
  • finally feed that file as input to clearcase2gource.py
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Nice summary, thank you. Your solution proposed is my plan B, but I was looking for a `cleartool` commands (maybe a mix between `find` and `lshistory`) to have a pretty print history of all the elements current and past with its changes. – Curro Mar 27 '15 at 14:40