Mercurial > hg
comparison hgext/eol.py @ 13612:21367c3da8aa
eol: remove unused argument in readhgeol()
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 13 Mar 2011 15:07:44 +0100 |
parents | 358924b0abce |
children | 85b80261ca10 |
comparison
equal
deleted
inserted
replaced
13611:358924b0abce | 13612:21367c3da8aa |
---|---|
185 class eolrepo(repo.__class__): | 185 class eolrepo(repo.__class__): |
186 | 186 |
187 _decode = {'LF': 'to-lf', 'CRLF': 'to-crlf', 'BIN': 'is-binary'} | 187 _decode = {'LF': 'to-lf', 'CRLF': 'to-crlf', 'BIN': 'is-binary'} |
188 _encode = {'LF': 'to-lf', 'CRLF': 'to-crlf', 'BIN': 'is-binary'} | 188 _encode = {'LF': 'to-lf', 'CRLF': 'to-crlf', 'BIN': 'is-binary'} |
189 | 189 |
190 def readhgeol(self, node=None, data=None): | 190 def readhgeol(self, node=None): |
191 if data is None: | 191 try: |
192 try: | 192 if node is None: |
193 if node is None: | 193 # Cannot use workingctx.data() since it would load |
194 # Cannot use workingctx.data() since it would load | 194 # and cache the filters before we configure them. |
195 # and cache the filters before we configure them. | 195 data = self.wfile('.hgeol').read() |
196 data = self.wfile('.hgeol').read() | 196 else: |
197 else: | 197 data = self[node]['.hgeol'].data() |
198 data = self[node]['.hgeol'].data() | 198 except (IOError, LookupError): |
199 except (IOError, LookupError): | 199 return None |
200 return None | |
201 | 200 |
202 if self.ui.config('eol', 'native', os.linesep) in ('LF', '\n'): | 201 if self.ui.config('eol', 'native', os.linesep) in ('LF', '\n'): |
203 self._decode['NATIVE'] = 'to-lf' | 202 self._decode['NATIVE'] = 'to-lf' |
204 else: | 203 else: |
205 self._decode['NATIVE'] = 'to-crlf' | 204 self._decode['NATIVE'] = 'to-crlf' |