tshm
2/29/2012 - 2:24 PM

get 'view specific' history of a given file in clearcase

get 'view specific' history of a given file in clearcase

#!/bin/sh
[ $# -ne 2 ] && echo 'please specify date and filename' && exit 1
date=$1; shift; file=$1
ct='cleartool'
# get the current visible branch
branch=$(${ct} find ${file} -cview -print | sed -e 's/.*\\\(.*\)\\\(.*\)/\1/g')
# get the history of the file within the branch
${ct} find ${file} -version "{brtype(${branch}) && created_since(${date})}" -print