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

RE: [PATCH] for asvn

From: Scott Miller <Scott.Miller_at_prioritytech.com>
Date: 2006-10-17 18:06:44 CEST

Thanks for the new patch, I'll check it out.

bishillo@gmail.com wrote:
> I'm not sure about this part:
> @@ -310,10 +333,20 @@
> CHECKIN=true
> shift
> fi
> + dir="$1"
>
> - # Find all the directories and files
> + echo checking $dir for permissions
> cp /dev/null $TMPFILE
> - eval "find $PCWD $SKIPSVN -o \( \( -type d ! -name .svn \) -o
> -type f \) $PRINTDETAILS" | while read info
> + #
> + # Obtain the list of symlinks in this directory
> + #
> + eval "find $dir \( -maxdepth 1 \( -type d -a ! -name \.svn \)
> -o -type f \) $PRINTDETAILS" |
> + sort >$TMPFILE
> +
> + #
> + # Make sure all the symlinks are being ignored.
> + #
> + cat $TMPFILE |while read info
> do
> device=`expr "$info" : "file='\(.*\)' mode"`
> info=`expr "$info" : "file='.*' \(mode.*\)"`
> @@ -338,6 +371,7 @@
> uid=`expr "$info" : ".* user=[^(]*(\([0-9]*\) "`
> group=`expr "$info" : ".* group=\([^(]*\)("`
> gid=`expr "$info" : ".* group=[^(]*(\([0-9]*\) "`
> +
> if [ "$user" = "" -o "$group" = "" -o "$mode" = "" ]
> then
> echo "property $FILE_PROP not set for $dir/$file"
>
> Why you use a tmpfile instead of the original way? Why you add
> dir="$1" instead of the original $PCWD? (and in the find $dir the
> variable should be quoted).

Well, if you look at the original recordpermissions function, it is
re-iterating over the entire directory tree to do the work, and one of
my main goals was to just iterate over the tree once (in recorddirinfo
which then calls the device and permission routines). So, I stole the
mechanism that goes through the "current" directory from the symbolic
link routine (which is where the completely incorrect comments come
from, I need to fix those).
I think the TMPFILE is unneeded and we could revert back to doing the
"while read info" part directly after the find. $dir is the directory
we're currently working on as called from the recorddirinfo routine.

Which variable should be quoted in the find command?

-Scott

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 17 18:06:08 2006

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