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

RE: Now 100% Serious Newline conversion suggestion

From: <peter.westlake_at_arm.com>
Date: 2001-12-14 11:19:43 CET

On 2001-12-13 21:31:42 Billy Tanksley wrote:
>From: cmpilato@collab.net [mailto:cmpilato@collab.net]
>><peter.westlake@arm.com> writes:
>>> William writes a text file. Linus checks it out and the CR breaks
>>> his tools. Linus feels punished.
>>> Am I missing something?
>
>>Hm. Yeah, that does seem pretty punishing. Suggestion withdrawn.
>
>I don't think it's that bad.
>
>Step 4: Linux stops feeling sorry for himself and runs a dos2unix tool
over
>the file.

.. every single time.
Every checkout.
Every checkin.
Before every update.
After every update.

My nice cross-platform perl script that used to do

     checkout("foo");
      process("foo");

becomes

     checkout("foo");
     $foo_ending = get_line_ending_attribute("foo");
     $platform_ending = get_platform_line_ending();
     if ($foo_ending == CRLF && $platform_ending == LF) {
          dos_to_unix("foo");
     } else if ($foo_ending == LF && $platform_ending == CRLF) {
          unix_to_dos("foo");
     if ($foo_ending == CR && $platform_ending == LF) {
          mac_to_unix("foo");
     } else if ($foo_ending == LF && $platform_ending == CR) {
          unix_to_mac("foo");
     if ($foo_ending == CR && $platform_ending == CRLF) {
          mac_to_dos("foo");
     } else if ($foo_ending == CRLF && $platform_ending == CR) {
          unix_to_mac("foo");
     }
     process("foo");

No thanks.

Peter.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:53 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.