Line endings checks
checkfiles.py currently provides a great way to verify that changes to a repository conform to white space standards. For teams using a mixture of Windows and Unix/Linux operating systems, ensuring the the end of line characters are consistent is an important test.
There are options in Mercurial to do this, including the EolExtension and Win32TextExtension, however the approach taken in checkfiles.py of simply warning about errors and providing a tool to correct them if desired seems to be a good alternative, without the complexity of converting line endings that those methods use. (They are also marked as features of last resort.)
Is there any interest or intention to provide options to check and correct line endings in the future?
I have implemented checks for CRLF, and fixup to LF line endings, because we intend to use LF line endings in a project. (These checks are not optional in my modified code.) The chief changes required are to test for "chunk == '\r'" in separate elseif statements around lines 245 and 363, and to use splitlines(1) and rstrip('\n') to preserve '\r' at the end of lines for tests around lines 264, and 379. I can provide this code, or diffs if necessary.