monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] line endings as project policy


From: Daniel Lakeland
Subject: Re: [Monotone-devel] line endings as project policy
Date: Tue, 28 Nov 2006 15:34:38 -0800
User-agent: Mutt/1.5.9i

On Sat, Nov 25, 2006 at 08:44:59AM +0100, Richard Levitte - VMS Whacker wrote:
> In message <address@hidden> on Thu, 23 Nov 2006 12:11:06 -0800, Daniel 
> Lakeland <address@hidden> said:
> 
> dlakelan> On Wed, Nov 22, 2006 at 10:40:58AM +0100, Richard Levitte - VMS 
> Whacker wrote:
> dlakelan> 
> dlakelan> >  - We need to convert line endings to the local standard on 
> anything
> dlakelan> >    that's assumed to be text on checkout.  This I regard as a 
> fact.
> dlakelan> >    (see the problem that some Unixly programs have with embedded 
> \r)
> dlakelan> 
> dlakelan> Consider languages like Python that have the ability to
> dlakelan> create multiline strings, now the \r or \n characters are
> dlakelan> part of the string. Converting them changes the behavior and
> dlakelan> meaning of the program. This is very tricky.
> 
> Does it really?  So, if I write that little example in a python
> program in Windows, using notepad, I should expect my program to
> expect differently on Windows than if I wrote that in emacs on a Unix
> box and ran it on Unix?  If that is to be *expected*, then I'm
> immediately throwing away python for any future plans.

I'm not quite sure what you mean, but basically the string continues
over several lines and the newline characters become part of the
string. Therefore, for example, if your string contains some data that
is exactly what you're looking for in the output of another program,
you'll be surprised when monotone alters the line endings in your
string and your python program doesn't match the output of the other
program it interfaces with.

Yes, as someone said, this is dodgy code. But nevertheless I don't
know why monotone should be altering the content of any text that it
checks in. It WILL cause problems eventually. 


-- 
Daniel Lakeland
address@hidden
http://www.street-artists.org/~dlakelan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]