EOL: patch.eol=auto setting

Martin Geisler mg at lazybytes.net
Tue Dec 22 18:12:59 CST 2009


alexrayne <alexraynepe196 at lavabit.com> writes:

> Martin Geisler ?????:
>
> [...] i`m not against cleanup, but why not to allow user to chose what
> to do, make cleanup when he ready to do it. the current trend of hgeol
> forces user to cleanup at 1st use.

Indeed, that was supposed to be a feature. Some people really like to be
able to ensure consistency in the EOLs. Storing the files with
consistent EOLs has the advantage that the repository looks "neat" even
without using the extension.

>> [...] If you like to have an inconsistend repository, then don't use
>> the extension :-)
>>
> you think you say funny? i read - all who want somethig else fuckoff.

Well, it was not until this mail that I understood what you wanted :-)

>> That being said, Mads Kiilerich did suggest that we could support
>> using different EOL formats for different files in the repository.
>> Something like this
>>
>>   [patterns]
>>   foo.py = native/CRLF
>>   **.py = native/LF
>>
>> which should mean that foo.py is checked out in native format and
>> stored in CRLF format, whereas all other Python files are stored in
>> LF format.
>>
> as i understand it is not implemented yet. this is close to my
> request. i can propagate it to mentioned here style as
>
>  **.py = native/auto
>
> auto (or can be used another word), mean that repostory version format
> does not affected, and detected from revision file (or cached any
> handy way) on any request.

Ah, that's a new idea! I had not thought of this myself, thanks for
bringing it up.

Let me just explain how I understand your proposal:

* files are not changed in the repository (no new commits)

* files are written with native EOLs in the working directory

* we automatically detect the per-file mapping needed to make the above
  two points happen.

I've not thought of the complications yet, but the big advantage I see
with such a system is that people can begin using it independently: You
wont have to convince the rest of the team to use the eol extension or
to tolerate a .hgeol file. Instead you can just enable eol and perhaps
make an uncommitted .hgeol file to adjust some settings.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20091223/0e812fad/attachment.pgp>


More information about the Mercurial-devel mailing list