From 90b1d4d8ab8392699128c4fb46b62777b9e17540 Mon Sep 17 00:00:00 2001 From: crs23 Date: Thu, 6 Sep 2007 05:01:04 +0000 Subject: [PATCH] Fixes to p4tolog. --- nodist/p4tolog | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/nodist/p4tolog b/nodist/p4tolog index 561a25a3..43d0fe71 100755 --- a/nodist/p4tolog +++ b/nodist/p4tolog @@ -6,14 +6,15 @@ # changes are written to stdout # 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 case "$1" in -p) - # get depot filespec prefix to strip and escape slashes - prefix=`echo $2 | sed -e 's#/#\\\\/#g'` + # get depot filespec prefix to strip + prefix="$2" shift ;; *) @@ -23,6 +24,9 @@ while [ -n "$1" ]; do shift done +# escape slashes in prefix +prefix=`echo $prefix | sed -e 's#/#\\\\/#g'` + # get relevant changes changes=`$P4 changes $* | sed -e 's/Change \([0-9]*\).*/\1/'` if test -z "$changes"; then @@ -39,7 +43,7 @@ for change in $changes; do sed -e 's/^[^ ]* \([^#]*\)#.*$/\1/' | sed -e "s/^$prefix//" echo $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/^.//' echo echo "----------"