Mercurial > hg
view hgext3rd/__init__.py @ 38630:e1987261dd05
patch: don't separate \r and \n when colorizing diff output
When displaying diffs, \r at the end of a line is treated as trailing
whitespace. This causes an ANSI escape code to be inserted between \r and \n.
Some programs, such as less since version 530 (maybe earlier, but at least not
version 487) displays ^M when it encounters a lone \r. This causes a lot of
noise in diff output on Windows, where \r\n is used to terminate lines.
We avoid that by treating both \n and \r\n as end of line when considering
trailing whitespace.
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Tue, 10 Jul 2018 13:18:34 +0200 |
parents | 4b81487a01d4 |
children | 2372284d9457 |
line wrap: on
line source
# name space package to host third party extensions from __future__ import absolute_import import pkgutil __path__ = pkgutil.extend_path(__path__, __name__)