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

Re: File Content Type/Executablitiy?

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Mon, 13 Oct 2008 13:09:02 -0500

On Oct 13, 2008, at 07:17, N D wrote:

> I build my application using a unix shell script. I commited this
> script into my svn repo. using Eclips IDE. The problem was that
> when this script was checked out from svn it did not run properly
> and terminated at places where it was syntactically correct. I
> suppose this is becaue of the ^M characters / end of line
> characters not recognized.
> The soulution that i thought of is to commit the build script from
> the linux system, using --encoding ASCII option. This is working
> for me.
> But as I was going thorugh the manual again, I got to see the
> section 'File Content Type' where in this problem has mentioned.
> What I remember read there is 'set the svn:mime to native' . But I
> have not tried this yet.

It sounds like you've confused two properties...

The one property is svn:mime-type which sets the file's MIME type.
For shell scripts, text/plain is probably fine, and that's the
default, so you don't need to set this property. But if you were
committing e.g. an HTML file, you might want to set svn:mime-type to

The other property is svn:eol-style which indicates what line ending
translation you want Subversion to perform. The default (when this
property is not set) is that Subversion does no translation. But for
text files like shell scripts that you want to check out and edit on
both Windows and Linux, a good value for svn:eol-style is native,
which means that if you check out on Windows, you get a file with
CRLF (DOS-style) line endings, and if you check out on Linux, you get
a file with LF (UNIX-style) line endings.

--encoding ASCII is irrelevant; on both Windows and Linux your file
is still ASCII; what differed was the line ending characters.

A third property is svn:executable, which you should probably set (to
any value; Subversion will normalize the value to "*") on scripts
that you want to be able to directly execute. When the Subversion
client sees this property during checkout or update, it will set the
executable bit on the file if the OS supports it.

To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-10-13 20:09:38 CEST

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.