Tuesday, February 07, 2012

A clearcase pre-code delivery check script

The following script finds all hijacked or checked out files recursively in the directories starting from the current working directory and dumps the data in an output.txt file.
@echo off
set output=c:\output.txt
echo Pre Delivery script started @ %TIME%
if exist "%output%" del "%output%"
echo List of Hijacked files in %CD%.  >> "%output%"
echo _______________________ >> "%output%"
echo Finding hijacked files. Please wait...
cleartool ls -recurse | findstr "hijacked" >>c:\output.txt
echo List of View Private files in %CD%. >> "%output%"
echo Finding view private files. Please wait...
echo ___________________________ >> "%output%"
cleartool ls -r -s -view_only| findstr /V ".contrib \\dist\\ \\build\\ dist .keep .class" >> "%output%"
start notepad "%output%"
echo Pre Delivery script completed  @ %TIME%. Please refer c:\output.txt file for hijacked and view private files

No comments:

Book Review: Spring Start Here: Learn what you need and learn it well

  Spring Start Here: Learn what you need and learn it well by Laurentiu Spilca My rating: 5 of 5 stars This is an excellent book on gett...