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

Re: Determining which files are treated as binary

From: Thomas Moschny <moschny_at_ipd.uni-karlsruhe.de>
Date: 2005-06-02 17:40:42 CEST

On Thursday 02 June 2005 16:55, Christopher Ness wrote:
> I think this will work:
>
> find . -! -path '*/.svn/*' -type f | \
> xargs svn propget "svn:mime-type" 2>/dev/null | \
> grep -v "- text/"

This will not work if there are filenames with spaces in it, and especially
not for files named e.g. 'foobar - text.doc'.

What about this:

find . -! -path '*/.svn/*' -type f -exec sh -c \
'if test "`svn propget svn:mime-type $0 2>/dev/null '\
'| cut -f1 -d/`" != "text" ; then echo $0 ; fi' \{\} \;

But of course this is somewhat slower, because svn propget is executed for
each file.

Regards,
Thomas

  • application/pgp-signature attachment: stored
Received on Thu Jun 2 18:04:08 2005

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