[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: Rusk, Patrick <PRusk_at_wellington.com>
Date: 2004-01-15 20:40:37 CET

> 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 Thu Jan 15 20:42:00 2004

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.