##// END OF EJS Templates
ui: add prompt argument to write (issue5154) (API)...
timeless -
r28633:e35d7f13 default
parent child Browse files
Show More
@@ -424,7 +424,7 b' class colorui(uimod.ui):'
424 return super(colorui, self).write(*args, **opts)
424 return super(colorui, self).write(*args, **opts)
425
425
426 label = opts.get('label', '')
426 label = opts.get('label', '')
427 if self._buffers:
427 if self._buffers and not opts.get('prompt', False):
428 if self._bufferapplylabels:
428 if self._bufferapplylabels:
429 self._buffers[-1].extend(self.label(a, label) for a in args)
429 self._buffers[-1].extend(self.label(a, label) for a in args)
430 else:
430 else:
@@ -662,7 +662,7 b' class ui(object):'
662 "cmdname.type" is recommended. For example, status issues
662 "cmdname.type" is recommended. For example, status issues
663 a label of "status.modified" for modified files.
663 a label of "status.modified" for modified files.
664 '''
664 '''
665 if self._buffers:
665 if self._buffers and not opts.get('prompt', False):
666 self._buffers[-1].extend(a for a in args)
666 self._buffers[-1].extend(a for a in args)
667 else:
667 else:
668 self._progclear()
668 self._progclear()
@@ -842,7 +842,7 b' class ui(object):'
842
842
843 # call write() so output goes through subclassed implementation
843 # call write() so output goes through subclassed implementation
844 # e.g. color extension on Windows
844 # e.g. color extension on Windows
845 self.write(prompt)
845 self.write(prompt, prompt=True)
846
846
847 # instead of trying to emulate raw_input, swap (self.fin,
847 # instead of trying to emulate raw_input, swap (self.fin,
848 # self.fout) with (sys.stdin, sys.stdout)
848 # self.fout) with (sys.stdin, sys.stdout)
General Comments 0
You need to be logged in to leave comments. Login now