mirror of https://github.com/debauchee/barrier.git
Added ability to filter out filespec prefixes and removed @...
from user on each change.
This commit is contained in:
parent
fd5625ba99
commit
d2a871d0d9
|
@ -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}' | \
|
||||
|
|
Loading…
Reference in New Issue