Alternatives to EOL extension
Martin Geisler
martin at geisler.net
Fri Jan 16 12:48:22 UTC 2015
Carsten Fuchs <carsten.fuchs at cafu.de> writes:
> Hi Ernie,
>
> Am 15.01.2015 um 17:13 schrieb Ernie Rael:
>> So you can see why the relatively new eol extension (replacing the
>> old win32text extension) is provided. Seems more reliable than most
>> ad hoc solutions.
>
> Uhhh, it's quite the opposite, isn't it?
>
> The wiki page for the EOL extension clearly labels it as a feature of
> last resort, which are essentially described as: "Don't use, the right
> way is something else.", whereas my custom EOL checker script is
> simple, works reliably is not "of last resort". ;-)
It's mentioned super briefly on the wiki, but see 'hg help eol' for
information about the hooks exposed by the extension. You should not
need to write a checker script, only enable the eol.checkheadshook on
your server.
With that in place your coworkers don't need to enable the extension, it
will only be the server that has the extension enabled to run the hook.
> (I just wished the wiki page would make it clearer what the proper
> alternatives to the EOL extension are.)
It's pretty clear to me: tell people to stop when they make commits that
flip the line-endings. If you have a tool in your build chain that
depends on the line-endings, then having a CI system will already be
enough -- the build will fail when someone accidentally changes the
line-endings in, say, a Makefile.
--
Martin Geisler
http://google.com/+MartinGeisler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20150116/7967c52e/attachment.asc>
More information about the Mercurial
mailing list