subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher D Haakinson <cdhaa...@us.ibm.com>
Subject Re: ^M Appends to every line?
Date Thu, 24 Feb 2011 17:25:16 GMT

Linux is the final home for these scripts. Currently I'm still in testing
mode, so the shell script I am trying is very simple, only a few lines with
a while loop, which is why I thought there may be something like
svn:eof-style to handle the EOF properly too..


|------------>
| From:      |
|------------>
  >------------------------------------------------------------------------------------------------------------------------------------------------|
  |David Chapman <dcchapman@acm.org>                                               
                                                               |
  >------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  >------------------------------------------------------------------------------------------------------------------------------------------------|
  |Christopher D Haakinson/Raleigh/IBM@IBMUS                                             
                                                         |
  >------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Cc:        |
|------------>
  >------------------------------------------------------------------------------------------------------------------------------------------------|
  |Ryan Schmidt <subversion-2011a@ryandesign.com>, users@subversion.apache.org     
                                                               |
  >------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  >------------------------------------------------------------------------------------------------------------------------------------------------|
  |02/24/2011 11:22 AM                                                                   
                                                         |
  >------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  >------------------------------------------------------------------------------------------------------------------------------------------------|
  |Re: ^M Appends to every line?                                                         
                                                         |
  >------------------------------------------------------------------------------------------------------------------------------------------------|





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@acm.org
     Chapman Consulting -- San Jose, CA



Mime
View raw message