[Zope3-dev] Re:End-of-line translation problem
Tim Peters
tim at zope.com
Sun May 2 22:05:35 EDT 2004
Jim, doesn't svn try to add an "appropriate" mime-type during an import? Or
... OK, we didn't use import to populate the demo repository, we used some
conversion script?
The reason I ask is that svn:mime-type isn't set on any file in the demo
repository's Zope3 or Zope parts. This can be seen via a platform
equivalent of
svn proplist -R | findstr svn:mime
from the root of a Zope or Zope3 checkout -- there's no output.
mime-type was set on some files in the ZConfig and ZODB portions, and I used
that to write a Python script that set eol-style on all the files svn didn't
think were binary (as evidenced by svn not setting mime-type on them). That
didn't work for Zope or Zope3, though, because their repositories didn't
have svn:mime-type set anywhere.
A dirt-dumb "is it a binary file?" sniffer of my own (== does the file
contain any bytes in range(32) outside of '\r\n\f\t'?) found plenty of
binary files in Zope3, and more in Zope. Here's part of the Zope3 listing:
2 binary files of type '.fs'
tags/cvs-to-svn-conversion/utilities/ZODBTools/tests/test-checker.fs
trunk/utilities/ZODBTools/tests/test-checker.fs
102 binary files of type '.gif'
tags/cvs-to-svn-conversion/doc/security/security-use.gif
tags/cvs-to-svn-conversion/doc/style/zope3logo.gif
tags/cvs-to-svn-conversion/src/zope/app/basicskin/arrowup.gif
tags/cvs-to-svn-conversion/src/zope/app/basicskin/document_icon.gif
...
10 binary files of type '.jpg'
tags/cvs-to-svn-conversion/src/zope/app/zopetop/bg_bar.jpg
tags/cvs-to-svn-conversion/src/zope/app/zopetop/bg_content.jpg
tags/cvs-to-svn-conversion/src/zope/app/zopetop/bg_root_folder.jpg
tags/cvs-to-svn-conversion/src/zope/app/zopetop/bg_top.jpg
tags/cvs-to-svn-conversion/src/zope/app/zopetop/zope3logo.jpg
2 binary files of type '.mar'
tags/cvs-to-svn-conversion/src/zope/app/rdb/gadfly/sql.mar
trunk/src/zope/app/rdb/gadfly/sql.mar
30 binary files of type '.mo'
trunk/src/zope/app/demo/jobboard/locale/en/LC_MESSAGES/jobboard.mo
trunk/src/zope/app/demo/jobboard/locale/it/LC_MESSAGES/jobboard.mo
trunk/src/zope/app/demo/jobboard/locale/nl/LC_MESSAGES/jobboard.mo
trunk/src/zope/app/form/browser/tests/testlabeltranslation.mo
...
4 binary files of type '.pdf'
tags/cvs-to-svn-conversion/doc/security/Guide_for_Production_of_PPs_and_STs_
0.9.pdf
tags/cvs-to-svn-conversion/src/ZConfig/doc/zconfig.pdf
trunk/doc/security/Guide_for_Production_of_PPs_and_STs_0.9.pdf
trunk/src/ZConfig/doc/zconfig.pdf
28 binary files of type '.png'
tags/cvs-to-svn-conversion/doc/skins/skinsandlayers.png
tags/cvs-to-svn-conversion/src/zope/app/demo/insensitivefolder/cifolder_icon
.png
tags/cvs-to-svn-conversion/src/zope/app/demo/jobboard/browser_views.png
...
The good news is that none of those are corrput in a Windows checkout, since
svn doesn't do line translation unless explicitly asked to. The possibly
bad news is that if the way the Zope3 and Zope repositories were created let
svn guess whether files are binary, svn's binary detection algorithm must be
very poor to have missed all the binary files.
More information about the Zope3-dev
mailing list