monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] OS-specific line endings


From: Thomas Keller
Subject: Re: [Monotone-devel] OS-specific line endings
Date: Sun, 04 Jul 2010 10:09:16 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; de; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5

Am 04.07.10 00:53, schrieb Stephen Leake:
> Thomas Keller <address@hidden> writes:
> 
>> Am 03.07.10 18:37, schrieb Stephen Leake:
>>> project.pin is written by Quartus, using OS-specific line endings. So
>>> when I rebuild on the other OS, 'mtn status' reports a bogus change;
>>> only the line endings have changed.
>>>
>>> project.qsf is written by me, and by Quartus (because it assumes I'm
>>> using the GUI to edit options, even though I'm actually using Emacs).
>>> Again, 'mtn status' reports bogus changes.
>>>
>>> I can invent an attr 'os_line_endings', and add a function to the
>>> 'attr_functions' hook to change the file line ending on workspace
>>> update. But that doesn't fix the bogus changes reported by 'mtn status'.
>>> In fact, it makes it worse; I only get the bogus changes now when I
>>> actually run Quartus. The same workspace contains Ada code, which I
>>> compile far more often. With this attr, I'll get bogus changes all the
>>> time.
>>
>> I'm for implementing a --no-whitespace option to diff to ignore all
>> whitespace changes (line endings, indentation, etc.) - this should solve
>> the main problem. I meant to work on this, but couldn't find time for it
>> until now.
> 
> That would help in diff, but 'mtn status' doesn't use diff to detect
> changes; it uses calculate_ident. So it would not solve the main problem.
> 
>> And then, we could of course invent and implement a custom attribute,
>> like mtn:native_eol, and mangle the line endings in attr_init_function.
> 
> Yes. But that also does not address 'mtn status'.

I don't know, but the more I think about it, the less I think its a good
idea to deal with this at all. If we change core mtn internals to behave
differently based on what kind of line style is preferred by the user,
we could introduce a lot of unwanted behaviour / bugs. At least prefer
to know for sure that monotone keeps my contents in-tact and unchanged
in the repository as well as the workspace.

Thomas.

-- 
GPG-Key 0x160D1092 | address@hidden | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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