[opensource-dev] Help prevent DOS line endings...
Oz Linden (Scott Lawrence)
oz at lindenlab.com
Wed Feb 2 12:06:08 PST 2011
On 2011-02-01 15:33, Discrete Dreamscape wrote:
> Possible cover-all solution: use Mercurial's "eol" extension. It's
> worked pretty well for me so far, and handily autofixed all the DOS
> endings in a particular fork I looked at in one go. It works much like
> the autoprops configuration does in Subversion; hopefully with less pain.
> Enable it (should be included by default in all recent versions, dunno
> about Tortoise) by adding the following section and options to your
> system-wide or repo-local .hgrc file:
> eol =
> Then add a ".hgeol" file to the root of the repository (it can be
> versioned and thus easily distributed!), and fill it with whatever
> standard Mercurial pattern entries are needed, like so:
> **.py = native
> **.txt = native
> **.h = native
> **.cpp = native
> **Makefile = LF
> As soon as this file exists and the extension is active for you,
> further hg commands will immediately treat any non-conforming
> line-endings as modifications to your current working copy. Hope this
> is helpful; if so, it could be added to that page as well.
I considered adding that, but didn't know whether some of the
windows-specific files might be broken by it (if so, they too could be
configured). Does anyone know?
Could always put this into a test repo and run a TeamCity build....
More information about the opensource-dev