[kepler-dev] binary files in kepler-docs

Timothy McPhillips tmcphillips at mac.com
Tue Jul 29 10:30:51 PDT 2008

Hi Matt,

Ok, I understand now that each client has to set this correctly and  
that a client might get confused figuring out what is binary without  
the hints in the local config file.  I was just getting lucky with the  
earlier checkins of PDFs that did get set properly. (It is interesting  
that this is something every client has to get right.  If I have 3  
machines I work from, say, each with its own home directory, then I  
need to configure and maintain the config file in a hidden directory  
independently on each of those machines, which is not all that  
intuitive for a version control system.  It beats having to re-checkin  
files that were incorrectly indicated to be plain text, though.)

I'm still puzzled about:

(1) Why the file 20080513-jones-kepler.pdf you checked in to kepler- 
docs on July 15 doesn't have the svn:mime-type property 'application/ 
pdf' as your config file indicates it should.  It does not download  
properly in Firefox on my Mac. May I try setting the property?

(2) Why the file allen-bap-stakeholders-mtg-2008.pdf I checked in and  
later set manually to svn:mime-type=application/octet-stream still  
didn't behave properly via the web interface for a while (many  
minutes) even after I committed the change.  It works properly now  
though.  Caching somewhere, maybe?  Other files I've updated (for  
content) have changed immediately on the web.



On Jul 28, 2008, at 5:31 PM, Matt Jones wrote:

> Hi Tim,
> This  is a 'feature' in SVN that is similar to the need to use -kb  
> on binary files in CVS, with the difference that subversion doesn't  
> change the file on the server, so mistakes are easily remedied by  
> changing the mime property setting.  See:
> http://subversion.tigris.org/faq.html#auto-props
> Thus, each svn client is responsible for setting its mime type  
> correctly on the files it uploads using svn add or svn import.  If a  
> mime type is not set, the file is assumed to be text.  The default  
> SVN client can be configured to automatically set some files to a  
> given mime type by using the 'auto-props' feature of the client.   
> Each developer must configure this is their .subversion/config  
> file.  The relevant section from mine is pasted below.
> Once a file is added or imported incorrectly, the only way to fix it  
> is to commit the mime property correctly on the file so that line  
> endings aren't touched (as you described), then recheck it out  
> (delete your working copy then update it).
> More details here:
> http://svnbook.red-bean.com/en/1.4/svn.advanced.props.html#svn.advanced.props.auto
> Matt
> # ------------ Snippet from ~/.subversion/config
> #
> ### Automatic properties are defined in the section 'auto-props'.
> enable-auto-props = yes
> ### Section for configuring automatic properties.
> [auto-props]
> ### The format of the entries is:
> ###   file-name-pattern = propname[=value][;propname[=value]...]
> ### The file-name-pattern can contain wildcards (such as '*' and
> ### '?').  All entries which match will be applied to the file.
> ### Note that auto-props functionality must be enabled, which
> ### is typically done by setting the 'enable-auto-props' option.
> # *.c = svn:eol-style=native
> # *.cpp = svn:eol-style=native
> # *.h = 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
> *.gif = svn:mime-type=image/gif
> *.tif = svn:mime-type=image/tiff
> *.tiff = svn:mime-type=image/tiff
> *.pdf = svn:mime-type=application/pdf
> *.doc = svn:mime-type=application/msword
> *.xls = svn:mime-type=application/excel
> *.ppt = svn:mime-type=application/powerpoint
> *.gz = svn:mime-type=application/x-gzip
> *.tgz = svn:mime-type=application/x-compressed
> *.zip = svn:mime-type=application/zip
> *.avi = svn:mime-type=video/avi
> *.mov = svn:mime-type=video/quicktime
> *.mpg = svn:mime-type=video/mpeg
> On Mon, Jul 28, 2008 at 3:32 PM, Timothy McPhillips <tmcphillips at ucdavis.edu 
> > wrote:
> Hi Matt,
> The last couple PDF files I've committed to kepler-docs have not  
> been recognized automatically as binary files.  (I noticed this  
> because this wreaks havoc with downloads via Firefox.)  I noticed  
> that the file 20080513-jones-kepler.pdf file you checked into  
> meetings/2008_05_13_Stakeholders_mtg/presentations also appears to  
> be missing the 'svn:mime-type : application/octet-stream' property.   
> Any idea what is going on?
> I seemed to be able to fix this for one file using the command:
> svn propset svn:mime-type 'application/octet-stream' bieda-chip2- 
> stakeholders-mtg-2008.pdf
> and committing.  It downloads properly in Firefox, now, but the file  
> allen-bap-stakeholders-mtg-2008.pdf still downloaded as binary  
> garbage in the Firefox window even after I set and committed the  
> property.  I must not understand what is going on...
> Tim
> -- 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Matthew B. Jones
> Director of Informatics Research and Development
> National Center for Ecological Analysis and Synthesis (NCEAS)
> UC Santa Barbara
> jones at nceas.ucsb.edu                       Ph: 1-907-523-1960
> http://www.nceas.ucsb.edu/ecoinfo
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at ecoinformatics.org
> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/kepler-dev/attachments/20080729/fe13a5f4/attachment.html>

More information about the Kepler-dev mailing list