1

I actually use clearcase file browser to see version tree for a specific file. I can select the version for a baseline and do diff with predecessor.

But I want to do that with bcompare in commandline.

I have myFile.c and the baseline Version_XX_YY_ZZ, how can I do to compare with the previous version with bcompare ?

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

2 Answers2

1

Check first if you can integrate Beyond Compare with ClearCase as I documented before (it might have changed since 2010)

The official documentation is here and does edit the C:\Program Files\IBM\RationalSDLC\ClearCase\lib\mgrs file.

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

I found a solution by doing this :

#!/bin/bash

BASELINE="Version_XX_YY_ZZ"
FILE="myFile.c"

cleartool lsvtree "$FILE" | grep "$BASELINE" > ~/tmp.txt

# tmp.txt must contain only 1 line

# get file name for $BASELINE
BaseFile=$(cat ~/tmp.txt | cut -d' ' -f1)
# get predecessor file short name
PredFile=$(cleartool descr -pred -short "$BaseFile" | cut -d$'\n' -f1)

# Start compare
bcompare "$FILE"@@"$PredFile" "$BaseFile"
A.Pissicat
  • 3,023
  • 4
  • 38
  • 93