Show More
@@ -118,6 +118,9 b' configitem = registrar.configitem(config' | |||||
118 | configitem('eol', 'fix-trailing-newline', |
|
118 | configitem('eol', 'fix-trailing-newline', | |
119 | default=False, |
|
119 | default=False, | |
120 | ) |
|
120 | ) | |
|
121 | configitem('eol', 'native', | |||
|
122 | default=pycompat.oslinesep, | |||
|
123 | ) | |||
121 |
|
124 | |||
122 | # Matches a lone LF, i.e., one that is not part of CRLF. |
|
125 | # Matches a lone LF, i.e., one that is not part of CRLF. | |
123 | singlelf = re.compile('(^|[^\r])\n') |
|
126 | singlelf = re.compile('(^|[^\r])\n') | |
@@ -174,7 +177,7 b' class eolfile(object):' | |||||
174 |
|
177 | |||
175 | isrepolf = self.cfg.get('repository', 'native') != 'CRLF' |
|
178 | isrepolf = self.cfg.get('repository', 'native') != 'CRLF' | |
176 | self._encode['NATIVE'] = isrepolf and 'to-lf' or 'to-crlf' |
|
179 | self._encode['NATIVE'] = isrepolf and 'to-lf' or 'to-crlf' | |
177 |
iswdlf = ui.config('eol', 'native' |
|
180 | iswdlf = ui.config('eol', 'native') in ('LF', '\n') | |
178 | self._decode['NATIVE'] = iswdlf and 'to-lf' or 'to-crlf' |
|
181 | self._decode['NATIVE'] = iswdlf and 'to-lf' or 'to-crlf' | |
179 |
|
182 | |||
180 | include = [] |
|
183 | include = [] |
General Comments 0
You need to be logged in to leave comments.
Login now