Am 06.05.2010 16:06, schrieb Stefan Sperling:
> On Thu, May 06, 2010 at 03:16:38PM +0200, Jörg Steffens wrote:
>> [[[
>> reduces error messages by checking svn return code
>>
>> * contrib/client-side/asvn
>> (recordpermissions): skip files where "svn propget" returns an error.
>> It is assumed that these files do not belong to the svn repository
>>
>> patch by joerg.steffens < at > dass-it.de
>> ]]]
> 'if [ x ]; then' is not consistent with the rest of the file.
> Usually 'then' is on a line of its own, like this:
>
> if [ x ]
> then
>
>> + # $file is not handled by svn, skipping
>
> Let's zap the above comment,
>
>> + echo "skipping property $FILE_PROP for $dir/$file"
>
> and change this messsage to:
>
> $dir/$file has no $FILE_PROP property or is unversioned; skipping
okay. Here it is.
Index: contrib/client-side/asvn
===================================================================
--- contrib/client-side/asvn (Revision 941610)
+++ contrib/client-side/asvn (Arbeitskopie)
@@ -335,8 +335,12 @@
fi
# see if the properties have changed.
- if [ "`$SVN propget $FILE_PROP \"$dir/$file\"`" != "$info" ]
+ FILE_PROP_VALUE=`$SVN propget $FILE_PROP "$dir/$file" 2>/dev/null`
+ if [ $? -ne 0 ]
then
+ echo "$dir/$file is unversioned; skipping"
+ elif [ "$FILE_PROP_VALUE" != "$info" ]
+ then
if [ "$CHECKIN" = "true" ]
then
$SVN propset $FILE_PROP "$info" "$dir/$file"