1

I'm using clearcase 8.0.1.17, I want to compare a file in my wiew and his version at a specific baseline.

I can open version tree and see my baseline but I want to do that with command line.

My purpose is to do something like :

> myScript.sh file.c baseline

This will open bcompare and compare my actual file vs the version baseline

How can I do that ?

I can do :

> cleartool lsvtree myfile | grep myBaseline

But is there is no changes at myBaline it doesn't work.

A.Pissicat
  • 3,023
  • 4
  • 38
  • 93

2 Answers2

1

First, make sure to try that in a dynamic view

Then check out the concept of version extended path: using a pathname_ccase syntax, you can add characters to the end of a relative or full path name, turning it into a VOB-extended path name.
VOB-extended path names that specify versions of elements are the most commonly used; they are called version-extended path names.

/vobs/proj/foo.c@@/main/motif/4

That means you can:

  • find the version of the file with as label the Baseline name: see "How to search files by label"
  • compare that extended path name with the one currently visible in your view.

The idea is: in a dynamic view, you can access (read the content of) any version of a file through the extended pathname.
Which means you can execute bcompare on those contents (the one with the extended path, and the one currently visible in your view)

Of course, if this is an incremental baseline (instead of full), you might need a cleartool chbl -full to convert it to a full baseline, applying the UCM associated label to all files.

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

If you do a cleartool describe baseline:mybaseline@\myvobtag you will probably find that your baseline is an incremental baseline. Incremental baselines do not have a label on the version if it was changed in a prior baseline and not the current one...

cleartool diffbl -versions {baseline} {current stream} | grep {filename} can be used to find the version of the target file that is in the baseline, which you can use to do the compare...

Brian Cowan
  • 1,048
  • 6
  • 7