It seems that this comes from two reasons.
First one is in bzrlib.diff.DiffFromTool.edit_file. This method returns LF ended lines always, even if original data are CRLF ended lines.
Second is in bzrlib.shelf_ui.Shelver._count_changed_regions. This method returns wrong value when first or last line are changed.
It seems that this comes from two reasons.
First one is in bzrlib. diff.DiffFromTo ol.edit_ file.
This method returns LF ended lines always, even if original data are CRLF ended lines.
Second is in bzrlib. shelf_ui. Shelver. _count_ changed_ regions.
This method returns wrong value when first or last line are changed.