changeset 31777 | 6a5b69b0abec |
parent 31776 | fe9b33bcec6a |
child 31792 | 55c0c91f55e6 |
--- a/mercurial/util.py Wed Mar 29 21:28:54 2017 +0900 +++ b/mercurial/util.py Wed Mar 29 21:40:15 2017 +0900 @@ -2211,6 +2211,13 @@ def tocrlf(s): return _eolre.sub('\r\n', s) +if pycompat.oslinesep == '\r\n': + tonativeeol = tocrlf + fromnativeeol = tolf +else: + tonativeeol = pycompat.identity + fromnativeeol = pycompat.identity + def escapestr(s): # call underlying function of s.encode('string_escape') directly for # Python 3 compatibility