You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Paul Albrecht <al...@rdi1.com> on 2008/01/22 15:28:32 UTC

asvn up to date?

Hi,

I tried using asvn to archive a filesystem and I noticed some bugs with
file names containing white space and directories containing special
files.

Here is a diff against the original asvn I downloaded from "tools and
contrib."

--- asvn.orig	2008-01-22 09:13:20.000000000 -0600
+++ asvn	2008-01-22 09:13:12.000000000 -0600
@@ -58,7 +58,7 @@
 function basedirname()
 {
     refname="$1"
-    dir="`dirname $2`"
+    dir="`dirname "$2"`"
     ref=`expr "$dir" : "$refname/\(.*\)"`
     if [ -z "$ref" ]
     then
@@ -74,7 +74,7 @@
 function addignorefile()
 {
     file=`basename $1`
-    dir=`dirname $1`
+    dir=`dirname "$1"`
 
     efile="`echo $file |sed -e 's!\([\[\(\$]\)!\\\\\1!g'`"
     gefile="`echo $efile |sed -e 's!\(\\\\\)!\\\\\\\\\1!g'`"
@@ -82,8 +82,9 @@
     then
 	$SVN propget svn:ignore "$dir"  |sed -e '/^$/d' >$TMPFILE2
 	echo "$efile" >>$TMPFILE2 
-	$SVN propset svn:ignore -F $TMPFILE2 "$dir"
-	echo setting ignore
+#	$SVN propset svn:ignore -F $TMPFILE2 "$dir"
+	$SVN propset svn:ignore -F $TMPFILE2 "$dir" > /dev/null
+#	echo setting ignore
 #cat $TMPFILE2 >&2
     fi
 }
@@ -91,7 +92,7 @@
 function deleteignorefile()
 {
     file=`basename $1`
-    dir=`dirname $1`
+    dir=`dirname "$1"`
     efile="`echo $file |sed -e 's!\([\[\(\$]\)!\\\\\1!g'`"
     gefile="`echo $efile |sed -e 's!\(\\\\\)!\\\\\\\\\1!g'`"
     echo "deleting ignore setting for '$file'"
@@ -323,14 +324,14 @@
 	    file=""
 	else
 	    dir="`basedirname $PCWD $device`"
-	    file="`basename $device`"
+	    file="`basename "$device"`"
 	fi
 	# see if the properties have changed.
-	if [ "`$SVN propget $FILE_PROP $dir/$file`" != "$info" ]
+	if [ "`$SVN propget $FILE_PROP "$dir/$file"`" != "$info" ]
 	then
 	    if [ "$CHECKIN" = "true" ]
 	    then
-		$SVN propset $FILE_PROP  "$info" $dir/$file
+		$SVN propset $FILE_PROP  "$info" "$dir/$file"
 	    else
 		info=`$SVN propget $FILE_PROP "$dir/$file"`
 		mode=`expr "$info" : "mode=\([0-9]*\) "`
@@ -382,7 +383,7 @@
 
 [ "$ACTION" =  "pre" ] && pre_checkin $@
 
-$SVN $@
+$SVN "$@"
 
 [ $? = 0 -a "$ACTION" = "post" ] && post_checkout $@
 

Can I get my changes reviewed here or does this go to the development
list?

-- 

Paul Albrecht

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org