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

Re: [PATCH] contrib/client-side/asvn: only check files, that are part of the subversion repository

From: Jörg Steffens <joerg.steffens_at_dass-it.de>
Date: Thu, 06 May 2010 12:02:36 +0200

Am 05.05.2010 21:15, schrieb Stefan Sperling:
> On Wed, May 05, 2010 at 07:03:44PM +0200, Jörg Steffens wrote:
>> +function stat_details()
>> +{
>> + # attention: stat uses other variables as find, eg. %u<->%U
>> + local path=${1:-.}
>> + stat -c "mode=%a user=%U(%u) group=%G(%g)" "$path"
>
> This isn't portable, e.g. on OpenBSD you get:
>
> stat: unknown option -- c
> usage: stat [-FLnq] [-f format | -l | -r | -s | -x] [-t timefmt] [file ...]
>
> Is there a more portable way to get at this information?
>
> In general it's quite hard to write shell scripts that run everywhere.
> Maybe just keep the original find-based code, but filter some errors?

IMHO it is a cleaner approach to only work on files that are part of the
svn checkout instead of calling "svn" for all files in the directory
(and filter for errors). But of course, both approaches are doable.

I replaced "stat -c" by "find -maxdepth 0".
If this would work also with BSD, I would appreciate if my patch gets
included.

  • text/x-patch attachment: stored
Received on 2010-05-06 12:03:31 CEST

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

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