[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

asvn up to date?

From: Paul Albrecht <albrecht_at_rdi1.com>
Date: Tue, 22 Jan 2008 09:28:32 -0600

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_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-01-22 17:35:06 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.