Mercurial > hg
comparison hgext/eol.py @ 23068:fb3e63c603e8 stable
eol: fix crash when handling removed files
ci --amend would in some cases fail after 650b5b6e75ed failed to refactor the
eol extension too.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 22 Oct 2014 16:10:23 +0200 |
parents | 6500a2eebee8 |
children | 7cc77030c557 |
comparison
equal
deleted
inserted
replaced
23067:420a051616ce | 23068:fb3e63c603e8 |
---|---|
331 | 331 |
332 def commitctx(self, ctx, error=False): | 332 def commitctx(self, ctx, error=False): |
333 for f in sorted(ctx.added() + ctx.modified()): | 333 for f in sorted(ctx.added() + ctx.modified()): |
334 if not self._eolfile(f): | 334 if not self._eolfile(f): |
335 continue | 335 continue |
336 try: | 336 fctx = ctx[f] |
337 data = ctx[f].data() | 337 if fctx is None: |
338 except IOError: | |
339 continue | 338 continue |
339 data = fctx.data() | |
340 if util.binary(data): | 340 if util.binary(data): |
341 # We should not abort here, since the user should | 341 # We should not abort here, since the user should |
342 # be able to say "** = native" to automatically | 342 # be able to say "** = native" to automatically |
343 # have all non-binary files taken care of. | 343 # have all non-binary files taken care of. |
344 continue | 344 continue |