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

Re: How to add directories containing binary files?

From: Grant Edwards <grante_at_visi.com>
Date: 2007-09-21 08:21:49 CEST

On 2007-09-21, Grant Edwards <grante@visi.com> wrote:

> I've got a large directory tree with lots of text files and a
> few scattered binary files. When I try to add this tree,
> subversion does fine until it finds the first binary file.
> Then it adds that file and quits.
>
> This is because I've got an auto-props rule like this:
>
> * = svn:eol-style=native

My work-around is to add the whole tree with --no-auto-props
and then run a shellscript to go through the whole tree and set
the eol-style to native for non-binary files:

#!/bin/bash
for f in `find . -name .svn -prune -o -type f -print`
  do
  SvnMimeType=`svn propget svn:mime-type "$f"`
  printf "%25s %s\n" "$SvnMimeType" "$f"
  if [ -z "$SvnMimeType" ];
    then
    svn propset svn:eol-style native "$f"
    fi
  done

Sure seems like there ought to be a simpler way to do that...

-- 
Grant Edwards                   grante             Yow!  I represent a
                                  at               sardine!!
                               visi.com            
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Sep 21 08:22:20 2007

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.