# HG changeset patch # User Yuya Nishihara # Date 1421570573 -32400 # Node ID d8997c5ce2ff982bbb84c5954c0da5275f21fc23 # Parent c2aea007130b21ca6fef05b831ac949213162ef7 ui: label prompt and echo messages I'm going to add a dedicated command-server channel for status messages, which carries metadata alongside a message text. 'ui.*' label provides a hint how message text should be processed. diff -r c2aea007130b -r d8997c5ce2ff mercurial/ui.py --- a/mercurial/ui.py Sat Nov 03 18:17:30 2018 +0900 +++ b/mercurial/ui.py Sun Jan 18 17:42:53 2015 +0900 @@ -1340,7 +1340,8 @@ If ui is not interactive, the default is returned. """ if not self.interactive(): - self.write(msg, ' ', default or '', "\n") + self.write(msg, ' ', label='ui.prompt') + self.write(default or '', "\n", label='ui.promptecho') return default self._writenobuf(self.fout, msg, label='ui.prompt') self.flush() @@ -1349,7 +1350,7 @@ if not r: r = default if self.configbool('ui', 'promptecho'): - self.write(r, "\n") + self.write(r, "\n", label='ui.promptecho') return r except EOFError: raise error.ResponseExpected()