Skip to content

Instantly share code, notes, and snippets.

@tshm
Created February 29, 2012 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tshm/1941192 to your computer and use it in GitHub Desktop.
Save tshm/1941192 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment