[PATCH 5 of 5] ui: use bytes IO and convert EOL manually in ui.editor()

Yuya Nishihara yuya at tcha.org
Sat Apr 1 10:00:07 UTC 2017


On Fri, 31 Mar 2017 09:52:37 -0700, David Soria Parra wrote:
> On Wed, Mar 29, 2017 at 11:46:41PM +0900, Yuya Nishihara wrote:
> > # HG changeset patch
> > # User Yuya Nishihara <yuya at tcha.org>
> > # Date 1490791418 -32400
> > #      Wed Mar 29 21:43:38 2017 +0900
> > # Node ID 81aa3738f703e4354b0f853e87548a139b129bdd
> > # Parent  c43fe15a4a4bec542b7411087a1ad0233cb5614f
> > ui: use bytes IO and convert EOL manually in ui.editor()
> > 
> I am not sure if we should convert line endings. In particular crecord is
> calling ui.edit() with a patch. A patch that would have CRLF line endings would
> be displayed wrong and if someone wants to add a lineending or remove it in the
> process, we would wrongly convert it to LF on Windows machines.

We need EOL conversion on Windows because of notepad.exe. For crecord, we
might want to add ui.edit(text=False) option.


More information about the Mercurial-devel mailing list