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

Some questions about svn:mime-type and svn:eol-style

From: Stefan Weiss <spaceman_at_foo.at>
Date: 2005-06-09 03:14:11 CEST

Hello list,

I am not a very experienced SVN user yet (we have only switched from CVS
a few weeks ago), so please bear with me. I have managed to set up the
server and repositories, and written a small howto for the other
developers, but I am still uncertain about some of the fine points of SVN.

In our current project, the developers use very different platforms
(Linux, Windows, and Mac), so eol-style=native would be the desired
setting for all text files. What's the default for svn:eol-style? If
it's undefined (or something other than "native"), will we need to
require all developers to enable auto-props and add all the necessary
mappings for all possible file extensions?. Or is there a way to tell
SVN that all "text" file types should have svn:eol-style=native (and
possibly other properties, like keywords)?

How do I ensure that all SVN clients are configured correctly? What if
some time in the future we decide to rename all template files to *.tpl,
how can I get everybody to edit their config files to add a mapping for
*.tpl? It looks possible to use a pre-commit hook to check the
properties on the server side. If this is the way to go, I would be very
 thankful for a sample pre-commit file.

On a related topic, I was wondering when the svn:mime-type should be
explicitly set using "svn propset", instead of relying on SVN's
auto-detection. There was a message on this list a while back, where
Dale Worley posted a clever script that checks for missing mime-type
properties in a working copy:

http://subversion.tigris.org/servlets/ReadMsg?listName=users&msgNo=30048

Is it necessary, or desirable, to always set the correct MIME type on
all files? In some cases that might even be counter-productive; some
text files would have to be assigned an "application/" type (like XML or
PHP), and that might skew the text/not-text decision. I'm not sure about
this, because I was unable to find out how Subversion determins which
files are text and which aren't - apart from some rather cryptic remarks
in the Subversion book, like
  | Subversion runs a very basic heuristic to determine if that file
  | consists of human-readable or non-human-readable content.
and
  | something that doesn't begin with text/, though there are exceptions

I'm guessing that the differentiation between "text" and "not text" will
be pretty reliable, but that no further attempt to assign the "correct"
MIME type will be made (BTW, what's the rationale for not using
/etc/mime.types and /etc/mime-magic when available?).

The auto-props section in my config file was disabled by default; and
the examples (commented out) only included a handful of file extensions.
Is this an indication that most users do _not_ use auto-props? Is there
any way to get a more complete auto-prop list of file extension mappings
to MIME types (other than going through /etc/mime.types)?

So many questions.

thanks in advance,
stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 9 03:18:22 2005

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.