Line ending translation extension

Stephen J. Turnbull stephen at xemacs.org
Thu Sep 10 21:51:24 CDT 2009


Martin Geisler writes:

 > I'm wondering why you added the 'bin' filter? I think it's redundant: if
 > a file is binary, then don't list it in the .hgeol file and we wont
 > touch it.

Because a common use-case is a project with no binaries, where you
want the default to be 'native'.  You could use 'to-lf', but that
exposes details of the repo internal format, which is user unfriendly.

Speaking of user-unfriendly, I think the configuration syntax should
use 'native', 'unix', 'windows', 'mac', 'binary', and maybe 'unicode'
(where the last would be use of U+2028 LINE SEPARATOR).  Nonprogrammer
users understand that systems do things differently, but they don't
need or want to understand the internal representation.  They'll
understand "this is a Unix file and it should stay that way even on
Windows", and that should be enough.  The names of the methods that
actually do the conversion probably should stay as 'tolf' etc.



More information about the Mercurial-devel mailing list