Fixes to p4tolog.
This commit is contained in:
parent
dacca8f96b
commit
90b1d4d8ab
|
@ -6,14 +6,15 @@
|
||||||
# changes are written to stdout
|
# changes are written to stdout
|
||||||
|
|
||||||
# location of perforce client
|
# location of perforce client
|
||||||
P4=/home/perforce/bin/p4
|
#P4=/home/perforce/bin/p4
|
||||||
|
P4=/usr/local/bin/p4
|
||||||
|
|
||||||
prefix=""
|
prefix="//depot/project/synergy/"
|
||||||
while [ -n "$1" ]; do
|
while [ -n "$1" ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-p)
|
-p)
|
||||||
# get depot filespec prefix to strip and escape slashes
|
# get depot filespec prefix to strip
|
||||||
prefix=`echo $2 | sed -e 's#/#\\\\/#g'`
|
prefix="$2"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -23,6 +24,9 @@ while [ -n "$1" ]; do
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# escape slashes in prefix
|
||||||
|
prefix=`echo $prefix | sed -e 's#/#\\\\/#g'`
|
||||||
|
|
||||||
# get relevant changes
|
# get relevant changes
|
||||||
changes=`$P4 changes $* | sed -e 's/Change \([0-9]*\).*/\1/'`
|
changes=`$P4 changes $* | sed -e 's/Change \([0-9]*\).*/\1/'`
|
||||||
if test -z "$changes"; then
|
if test -z "$changes"; then
|
||||||
|
@ -39,7 +43,7 @@ for change in $changes; do
|
||||||
sed -e 's/^[^ ]* \([^#]*\)#.*$/\1/' | sed -e "s/^$prefix//"
|
sed -e 's/^[^ ]* \([^#]*\)#.*$/\1/' | sed -e "s/^$prefix//"
|
||||||
echo
|
echo
|
||||||
$P4 describe -s $change | \
|
$P4 describe -s $change | \
|
||||||
awk 'p==1 && !/$^/;/^$/{if (p==1) exit; else p=1}' | \
|
awk 'p==1 && !/^$/;/^$/{if (p==1) exit; else p=1}' | \
|
||||||
sed -e 's/^.//'
|
sed -e 's/^.//'
|
||||||
echo
|
echo
|
||||||
echo "----------"
|
echo "----------"
|
||||||
|
|
Loading…
Reference in New Issue