#!/bin/bash autolabels=`p4 -F "%label% Rev:%Revision%" -ztag labels | grep -v "Rev:$" | sed -e "s/ Rev:.*//g"` depotpath='//depot/source/...' for l in $autolabels; do labcount=`p4 files $depotpath#1,@$l 2> /dev/null | wc -l` if [ "$labcount" -gt "0" ] then p4 labels -e "$l" fi done
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 24538 | Adam Morriss | Improvements to script, plus adding keywords | ||
#1 | 24537 | Adam Morriss | name-change for script | ||
//guest/amo/scripts/working-autolabel.sh | |||||
#1 | 24203 | Adam Morriss | Moving files to 'amo' | ||
//guest/adam_morriss/scripts/working-autolabel.sh | |||||
#1 | 18478 | Adam Morriss |
A couple of bash scripts to carry out basic checks. Both are functional, though need further checks and measures, and neither have been tested to destruction. 'working-autolabel' attempts to produce a list of automatic labels corresponding to a (currently hard-coded) depot path. 'findchange' searches the description of changes related to a specified path for a provided string, and lists the change number for those that match. This needs further error checking, and the ability to search pending changes (which won't work if you provide a path). Would be good to check that the depot path exists too. |