mercurial/ui.py
changeset 35996 b62c4154bb28
parent 35995 fd54846e1f8e
child 36000 0ff41ced4c12
--- a/mercurial/ui.py	Mon Feb 05 20:40:49 2018 +0900
+++ b/mercurial/ui.py	Mon Feb 05 20:48:51 2018 +0900
@@ -886,13 +886,17 @@
         "cmdname.type" is recommended. For example, status issues
         a label of "status.modified" for modified files.
         '''
-        if self._buffers and not opts.get(r'prompt', False):
+        if self._buffers:
             if self._bufferapplylabels:
                 label = opts.get(r'label', '')
                 self._buffers[-1].extend(self.label(a, label) for a in args)
             else:
                 self._buffers[-1].extend(args)
-        elif self._colormode == 'win32':
+        else:
+            self._writenobuf(*args, **opts)
+
+    def _writenobuf(self, *args, **opts):
+        if self._colormode == 'win32':
             # windows color printing is its own can of crab, defer to
             # the color module and that is it.
             color.win32print(self, self._write, *args, **opts)
@@ -1276,7 +1280,7 @@
         if not self.interactive():
             self.write(msg, ' ', default or '', "\n")
             return default
-        self.write(msg, label='ui.prompt', prompt=True)
+        self._writenobuf(msg, label='ui.prompt')
         self.flush()
         try:
             r = self._readline()