Details
Description
Steps to reproduce:
1. Open mercurial repository which has file with Windows line breaks ('\r\n'). For example repository https://bitbucket.org/pypy/pypy has such file rpython\translator\c\src\stacklet\switch_x64_msvc.asm
2. Make some change in file with Windows line breaks
3. Open Source Tree and press "Discard Hunk"
Actual result: Hunk is discarded but all line breaks are replaced with Unix breaks ('\n')
Expected result: file switch_x64_msvc.asm is restored to it's original state.