Index: contrib/client-side/asvn =================================================================== --- contrib/client-side/asvn (Revision 941610) +++ contrib/client-side/asvn (Arbeitskopie) @@ -61,6 +61,24 @@ rm -f $TMPFILE $TMPFILE1 $TMPFILE2 } +function stat_details() +{ + local path=${1:-.} + # stat -c: can not be used, because it does not work on BSD + find "$path" -maxdepth 0 -printf "mode=%m user=%u(%U) group=%g(%G)\n" +} + +function svn_list() +{ + [ $# -eq 0 ] && local path="`pwd`" + # grep -v "^?": exclude all files that do not belong to subversion + # cut -c 42-: svn status lists different information. The filename starts at column 42 + # improvement: use "svn status --xml" and parse the xml output + svn status -v --ignore-externals $path "$@" | grep -v "^?" | cut -c 42- +} + + + function basedirname() { refname="$1" @@ -320,10 +338,12 @@ # Find all the directories and files cp /dev/null $TMPFILE - eval "find $PCWD $SKIPSVN -o \( \( -type d ! -name .svn \) -o -type f \) $PRINTDETAILS" | while read info + # uses svn_list instead of version based on find, + # because the find version produces warnings for all files + # that are not part of the repository (eg. backup files) + svn_list $PCWD | while read device do - device=`expr "$info" : "file='\(.*\)' mode"` - info=`expr "$info" : "file='.*' \(mode.*\)"` + info=`stat_details "$device"` if [ "$PCWD" = "$device" ] then