Windows Linebreaks are replaced with Unix breaks on "Discard Hunk" click

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • 3.4.20
    • Affects Version/s: 1.6.5, 3.4.19
    • Component/s: Mercurial
    • Environment:

      Windows 7 x64
      Mercurial Distributed SCM (version 3.0+317-1ab30e9ba0fc)

    • Severity 2 - Major

      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.

        1. changed_file_1.png
          changed_file_1.png
          119 kB
        2. changed_file_2.png
          changed_file_2.png
          112 kB

            Assignee:
            Mukesh Kumar (Inactive)
            Reporter:
            Sergey Kozyr
            Votes:
            42 Vote for this issue
            Watchers:
            28 Start watching this issue

              Created:
              Updated:
              Resolved: