[PATCH] ui: add prompt argument to write (issue5154) (API)
pierre-yves.david at ens-lyon.org
Sun Mar 27 14:51:39 EDT 2016
On 03/25/2016 03:06 PM, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1458942660 0
> # Fri Mar 25 21:51:00 2016 +0000
> # Node ID bf9ecf0ce88dcd1cfdac848eb455fd5252d68392
> # Parent 345f4fa4cc8912bb722ad3e35d68858487420bc6
> ui: add prompt argument to write (issue5154) (API)
> When code like filemerge._iprompt calls ui.prompt, it expects
> the user to see the output in addition to getting the prompt.
> Other code such as histedit may call ui.pushbuffer, but its
> goal is not to interfere with prompts, so this commit adds
> an optional prompt flag to ui.write and has _readline
> include that argument.
> ui.promptchoice calls ui.prompt which calls ui._readline.
> This commit also updates hgext.color.write.
I've taken this because the bug is pretty bad. But just applying this
hack will lead to surprise and other bug. Can you follow up with patches:
- adding a developer warning when this happen? This would let the test
catch such situation in the tests?
- updating histedit to not get into this situation anymore.
More information about the Mercurial-devel