changeset 34118:4a6ef3a5b282

configitems: register the 'eol.native' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 30 Jun 2017 03:39:26 +0200
parents 0f685a229a81
children d4a5193332b3
files hgext/eol.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/eol.py	Fri Jun 30 03:39:21 2017 +0200
+++ b/hgext/eol.py	Fri Jun 30 03:39:26 2017 +0200
@@ -118,6 +118,9 @@
 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 @@
 
         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 = []