Added ability to filter out filespec prefixes and removed @...

from user on each change.
This commit is contained in:
crs 2002-12-25 19:20:12 +00:00
parent fd5625ba99
commit d2a871d0d9
1 changed files with 17 additions and 2 deletions

View File

@ -8,6 +8,21 @@
# location of perforce client
P4=/home/perforce/bin/p4
prefix=""
while [ -n "$1" ]; do
case "$1" in
-p)
# get depot filespec prefix to strip and escape slashes
prefix=`echo $2 | sed -e 's#/#\\\\/#g'`
shift
;;
*)
break
;;
esac
shift
done
# get relevant changes
changes=`$P4 changes $* | sed -e 's/Change \([0-9]*\).*/\1/'`
if test -z "$changes"; then
@ -18,10 +33,10 @@ fi
# convert each change
for change in $changes; do
$P4 describe -s $change | head -1 | \
sed -e 's/.*by \([^ ]*\) on \([^ ]*\) \([^ ]*\)/\2 \3 \1/'
sed -e 's/.*by \([^ @]*\)[^ ]* on \([^ ]*\) \([^ ]*\)/\2 \3 \1/'
$P4 describe -s $change | \
awk 'p==1 && !/^$/;/^Affected/{p=1}' | \
sed -e 's/^[^ ]* \([^#]*\)#.*$/\1/'
sed -e 's/^[^ ]* \([^#]*\)#.*$/\1/' | sed -e "s/^$prefix//"
echo
$P4 describe -s $change | \
awk 'p==1 && !/$^/;/^$/{if (p==1) exit; else p=1}' | \