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

Re: informing import about mime types?

From: Hamilton Link <helink_at_sandia.gov>
Date: 2004-01-16 00:47:48 CET

ok, [auto-props] is working handily, thanks. I reviewed the subversion
"book" and this feature is not yet documented there. Acutally in my
readme.txt it's not called out either. Where is a list of such features
to be found?

I now have a follow-up question. Under Mac OS X, there's no mime type
of a file to set up based on svn:mime-type when the file is downloaded,
as far as I can tell. What *does* happen is that the file's type and
creator codes are set up based on the files extension when a file is
downloaded. Is there a way that I can associate mime types with type
and creator codes to set on the file? On the mac, apps don't always
give a filename extensions. For that matter, I don't even know what
mime type i'd use for some of my apps, but that's a different problem
that I can solve by cheating flagrantly and inventing my own types.

thanks,
hamilton

On Jan 15, 2004, at 12:40 PM, Rusk, Patrick wrote:

>> Is there some configuration (of the client or server) that
>> I can do so that the mime-type of files (and their binaryness
>> as a result) is set based on their file extension or other
>> information?
>
> Hamilton,
>
> Check out the chapter "Advanced Topics" and read the sections
> "Runtime Configuration Area" and "Properties".
>
> Then, when you run any subversion command (even "svn --version"),
> your user configuration area will be automatically created for you, in
> one
> of these locations:
>
> Unix:
> ~/.subversion/
> Windows:
> %APPDATA%\Subversion
>
> where APPDATA is usually something like "C:\Documents and
> Settings\<username>".
>
> There's a Readme.txt in there that will describe a good bit about
> what those files are for, and the "config" file is where you'll want
> to make
> your changes. The relevant functionality is called "automatic
> properties"
> set by this section of the config file:
>
> ### Set enable-auto-props to 'yes' to enable automatic properties
> ### for 'svn add' and 'svn import', it defaults to 'no'.
> ### Automatic properties are defined in the section 'auto-props'.
> enable-auto-props = yes
>
> ### Section for configuring automatic properties.
> ### The format of the entries is:
> ### file-name-pattern = propname[=value][;propname[=value]...]
> ### The file-name-pattern can contain * as wildcard. All entries
> ### which match will be applied to the file.
> [auto-props]
> *.pdf = svn:mimetype=<your PDF type>
>
> You can poke around even further to figure out how to make such
> changes site-wide.
>
> Hope this helps.
>
> Patrick Rusk
>
>
> -----Original Message-----
> From: Hamilton Link [mailto:helink@sandia.gov]
> Sent: Thursday, January 15, 2004 1:55 PM
> To: users@subversion.tigris.org
> Subject: informing import about mime types?
>
>
> Is there some configuration (of the client or server) that I can do so
> that the mime-type of files (and their binaryness as a result) is set
> based on their file extension or other information? For example, I have
> these pdf files that are mostly binary data and have a binary
> mime-type, but when I do an import into my repository they start out as
> text because they have some text header information in the pdf.
>
> I've flipped through the draft svn book, but I didn't see anything to
> this effect. I know I can setprop, but I'd rather not have to do that
> every other time I add a pdf to my repository (and I'd rather my users
> not have to either). Plus I'm a little nervous about incorrect EOL
> translations when a file is imported if the wrong guess is made,
> although I don't know if that's warranted.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jan 16 00:48:33 2004

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