In the list of working copies, add a tag so that I can see if there are files
that needs updates. See my (quick and dirty) geektools script that does the
same for me if I place my working copies in the specified directories below:
---
#!/bin/sh
parse_svn_status() {
local REV=$( # get svn revision number
svn info "$1" 2>/dev/null | grep Revision | sed -e 's/Revision: //'
)
[ "$REV" ] || return # stop now if not a working copy
local STATUS=( # create an array
# svn status items (second column is always ' ', 'C', or 'M')
$( svn st "$1" | grep '^[^ ][ CM]' | \
# first column only, filter duplicates
sed -Ee 's/^(.).*$/\1/' | awk 'x[$0]++ == 0' )
)
[ "$STATUS" ] || return
echo "$1 (${STATUS[*]})"
}
alldirs() {
for file in *; do
if [ -d "$file" ]; then
# echo "Checking:" "$file"
parse_svn_status "$file";
fi
done
}
echo "Subversion Dirty Working Copies"
echo ""
echo "Research:"
echo "---------"
pushd /Users/msv/Documents/Research >>/dev/null
alldirs
echo ""
echo "Teaching:"
echo "---------"
pushd /Users/msv/Documents/Teaching >>/dev/null
alldirs
echo ""
pushd /Users/msv/Documents/ >>/dev/null
parse_svn_status "Personal"
popd >>/dev/null
popd >>/dev/null
popd >>/dev/null
---
Original issue reported on code.google.com by
mikael.s...@gmail.comon 20 Jan 2012 at 12:32