3 messages in com.perforce.perforce-userscript which walks an integration des...
FromSent OnAttachments
Davi...@home.chat.net21 Jan 1998 16:22 
Davi...@home.chat.net21 Jan 1998 20:05 
Davi...@home.chat.net22 Jan 1998 11:05 
Subject:script which walks an integration description
From:Davi...@home.chat.net (Davi@home.chat.net)
Date:01/22/1998 11:05:52 AM
List:com.perforce.perforce-user

I removed the last use of a temp file. Here is the (hopefully) final version of the script.

=========== #!/bin/ksh # # p4desc # ** By David Jeske # ** You are permitted to use and redistribute this # ** however you like. Send me some email if you # ** find this useful. jeske at chat.net #

if [[ $1 != "" ]]; then chl_list='';

# show the base changelist info

p4 describe -s $1

# show the prompt so they know why they are waiting...

printf "Integrated Changelist(s)...";

# find the target file revisions for the integrations in this changenumber # and compile a list of the source files and revisions for those # integrations

for i in ` for i in \`p4 describe -s $1 | egrep "integrate$" | cut -d' ' -f2\`; do set file rev rev=${i##*\#} file=${i%%\#*}

for i in \`p4 filelog $file | nawk -F ' ' ' { \ revstr = "#"rev; \ do { \ if ((\$1 == "...") && (\$2 == revstr)) { \ getline; \ do { \ if (\$2 == "...") { \ print $0; \ getline; \ } \ } while (\$2 == "..."); \ } else { \ if (!getline) { \ exit 0; \ } \ }\ } while (1); \ } \ ' rev=$rev | cut -d' ' -f5\`; do set rev file file=${i%%\#*} rev=${i##*\#}

p4 filelog $file | grep "... #${rev}" | cut -d' ' -f4 done; done | sort -t ' ' -u -k 1 ` # for each unique changenumber, print out the description do found='true' chl_list="$chl_list $i" printf "$i " done

if [[ $found != 'true' ]]; then printf "(none)\n\n" exit 1; fi

printf "\n\n"

for i in $chl_list; do printf "[Merged]: "; p4 describe -s $i done

else echo echo "Usage: p4desc <changenumber>" echo fi

--- David Jeske (N9LCA) + http://www.chat.net/~jeske/ + jeske at chat.net