Line ending translation extension
toni.arte at nokia.com
toni.arte at nokia.com
Wed Sep 9 00:48:07 CDT 2009
>> Mercurial, IMHO, does the correct thing, and provides hooks so that
>> you can customize it.
>
>I, on the other hand, have been burned to many times by systems like
>that. A new user shows up, checks things out, loads them into his
>"smart" tools that quietly convert alien line endings to the platform
>native version, makes a one-line change, and checks in resulting in a
>changeset that then includes every line in the file.
I tried to explain that while *you* can configure Mercurial to do whatever you like (and yes, if you would want to have the CRLF <-> LF conversion to be done between Windows and Unix, there's nothing stopping you from doing that), it's up to the *individuals* to configure it properly.
The *problem*, as I see it, is that in corporate environment most of the people would want to have tools which 'just work' the corporate standard way, instead of having to personally fiddle with the small details with each tool (which is probably what the Mercurial enthusiastic would want to do with Mercurial).
This CRLF<->LF issue is just one example (*). What I'd want to see is that out-of-the-box Mercurial would behave in such a way that the repository could specify certain defaults so that having the correct settings would not be up to the individuals to set:
* So, *if* there is a special file (like .hgeol, or a more generic .hgattributes, like Git has .gitattributes), Mercurial would read certain settings from this file. Like the EOL policy of *this* repository
* If there is no such special file, nothing is configured. So just like it is today
* And of course there should be a possibility to override the repo settings
* Another one which comes into mind is the ui.username. Yes, you can set it to whatever you like, but we also have an LDAP directory which has all the data in a uniform format.
--
Toni
More information about the Mercurial
mailing list