[Zope-dev] Re: [ZODB-Dev] Re: End-of-line translation problem

Barry Warsaw barry at zope.com
Fri Apr 30 11:07:40 EDT 2004


On Fri, 2004-04-30 at 10:48, Philipp von Weitershausen wrote:

> But, as the -kb property in CVS has shown, newbies tend to forget these 
> things. Then again, setting svn:eol-style after a file has been added to 
> svn is easier than getting -kb on a file that's already in CVS.

I often have to "cvs admin -kb *.gif *.jpg *.png" after the fact.  That
doesn't seem too difficult, although it would be really nice to have a
standard mapping of extensions to file properties.

> > For myself, I'm inclined to do what Tim suggested, and tell
> > subversion to automatically set the eol-style for all files to
> > native. This will fail loudly when binary files are checked in and I
> > think that I can deal with that inconvenience.
> 
> That does not make sense. You'd only want svn to set that property on 
> text files anyway. So I don't understand what this "inconvenience" is.
> 
> > Note that this is a big improvement over CVS as generally, binary
> > files will automatically *not* be treated as text files. (The danger
> > being that the binary detection algorithm will occasionally fail.)
> 
> I think that's very rare. It has never happened to me at least, and I 
> have lots of binary stuff like OpenOffice files in my repository.
> 
> >>> [auto-props]
> >>> *.c = svn:eol-style=native
> >>> *.cpp = svn:eol-style=native
> >>> *.h = svn:eol-style=native
> >>> *.py = svn:eol-style=native
> >>> *.dsp = svn:eol-style=CRLF
> >>> *.dsw = svn:eol-style=CRLF
> >>> *.sh = svn:eol-style=native;svn:executable
> >>> *.txt = svn:eol-style=native
> >>> *.png = svn:mime-type=image/png
> >>> *.jpg = svn:mime-type=image/jpeg
> 
> I wouldn't mind such a configuration. I would really make it the 
> responsbility of the committer. He/she may choose to use such settings 
> or simply set svn:eol-style after every 'svn add' manually.

+1.  I wish the subversion folks would support file extension to
attribute mappings.

-Barry





More information about the Zope-Dev mailing list