# HG changeset patch # User Boris Feld # Date 2017-06-30 01:39:26 # Node ID 4a6ef3a5b2827c23717377a01bdc0b1477b819aa # Parent 0f685a229a81bfd81490cce8c64941603943e140 configitems: register the 'eol.native' config diff --git a/hgext/eol.py b/hgext/eol.py --- a/hgext/eol.py +++ b/hgext/eol.py @@ -118,6 +118,9 @@ configitem = registrar.configitem(config configitem('eol', 'fix-trailing-newline', default=False, ) +configitem('eol', 'native', + default=pycompat.oslinesep, +) # Matches a lone LF, i.e., one that is not part of CRLF. singlelf = re.compile('(^|[^\r])\n') @@ -174,7 +177,7 @@ class eolfile(object): isrepolf = self.cfg.get('repository', 'native') != 'CRLF' self._encode['NATIVE'] = isrepolf and 'to-lf' or 'to-crlf' - iswdlf = ui.config('eol', 'native', pycompat.oslinesep) in ('LF', '\n') + iswdlf = ui.config('eol', 'native') in ('LF', '\n') self._decode['NATIVE'] = iswdlf and 'to-lf' or 'to-crlf' include = []