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

Re: ^M Appends to every line?

From: David Chapman <dcchapman_at_acm.org>
Date: Thu, 24 Feb 2011 08:21:59 -0800

On 2/24/2011 8:02 AM, Christopher D Haakinson wrote:
> OK, so I've been testing out the svn:eol-style prop and it appears to
> work, but it seems like an awful lot of work for such a simple issue.
> Is there something server-side I can setup to ensure that all files
> contain the correct eol style?
> Also I've noticed that my shell scripts are now failing with an EOF
> error? Does this mean that there's a style setting for the end of file
> too??

You can define a pre-commit hook script that looks at the file name and
then verifies the property is present. These are described in the
Subversion book.

Multi-platform work is an awful lot of work; it is not as simple as it
seems. Heuristics to determine whether a file is "plain text" can fail,
with catastrophic results. File transfers done carelessly will corrupt
binary files; in integrated circuit design the OASIS geometry file
format has an "almost text" string defined solely to catch this error.
If you try to use the same text files across platforms, things will fail
unless *every* tool you use - all editors, all file analysis software,
all file transfer programs - deals with mixed or "wrong platform" line
ending styles properly. This is a high standard that has never been met
in my experience.

I haven't seen script errors related to end of file; Windows no longer
puts a ^Z at the end of files, so you shouldn't need to strip that out.
Have you done an octal dump of the scripts to see what is at the end of
the files? On which platform are they failing - Windows or Linux?

     David Chapman         dcchapman_at_acm.org
     Chapman Consulting -- San Jose, CA
Received on 2011-02-24 17:22:54 CET

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.