6 messages in com.perforce.perforce-userTracing history back through branches| From | Sent On | Attachments |
|---|---|---|
| Andr...@vignette.com | 19 Mar 1998 16:25 | |
| Greg...@sgi.com | 19 Mar 1998 16:33 | |
| Davi...@home.chat.net | 19 Mar 1998 17:00 | |
| Jere...@softway.com.au | 19 Mar 1998 19:26 | |
| Jere...@softway.com.au | 19 Mar 1998 19:43 | |
| Robe...@fore.com | 20 Mar 1998 05:12 |
| Subject: | Tracing history back through branches![]() |
|---|---|
| From: | Davi...@home.chat.net (Davi...@home.chat.net) |
| Date: | 03/19/1998 05:00:23 PM |
| List: | com.perforce.perforce-user |
On Thu, Mar 19, 1998 at 06:25:43PM -0600, Andrea Adams wrote:
Does anyone know how to trace history back through branches easily or has anyone written a script to do so?
Let's say I just did a release branch off of main. All the files on the branch are at revision #1. I want to see all the revision history through any earlier branches instead of a history line that tells me from where the file was branched. Does anyone know a quick way to do this or has anyone written a script?
Yeah, I did.
I called it p4desc and posted it to the perforce-user mailing list... Here is a copy of the original post.
Date: Thu, 22 Jan 1998 11:06:13 -0800 From: David Jeske <jeske at chat.net> To: *** P4-USER *** <perforce-user at perforce.com> Subject: Re: script which walks an integration description
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




