Show More
@@ -434,16 +434,15 b' class colorui(uimod.ui):' | |||||
434 | label = opts.get('label', '') |
|
434 | label = opts.get('label', '') | |
435 | if self._buffers: |
|
435 | if self._buffers: | |
436 | if self._bufferapplylabels: |
|
436 | if self._bufferapplylabels: | |
437 |
self._buffers[-1].extend(self.label( |
|
437 | self._buffers[-1].extend(self.label(a, label) for a in args) | |
438 | for a in args) |
|
|||
439 | else: |
|
438 | else: | |
440 |
self._buffers[-1].extend( |
|
439 | self._buffers[-1].extend(args) | |
441 | elif self._colormode == 'win32': |
|
440 | elif self._colormode == 'win32': | |
442 | for a in args: |
|
441 | for a in args: | |
443 | win32print(a, super(colorui, self).write, **opts) |
|
442 | win32print(a, super(colorui, self).write, **opts) | |
444 | else: |
|
443 | else: | |
445 | return super(colorui, self).write( |
|
444 | return super(colorui, self).write( | |
446 |
*[self.label( |
|
445 | *[self.label(a, label) for a in args], **opts) | |
447 |
|
446 | |||
448 | def write_err(self, *args, **opts): |
|
447 | def write_err(self, *args, **opts): | |
449 | if self._colormode is None: |
|
448 | if self._colormode is None: | |
@@ -457,7 +456,7 b' class colorui(uimod.ui):' | |||||
457 | win32print(a, super(colorui, self).write_err, **opts) |
|
456 | win32print(a, super(colorui, self).write_err, **opts) | |
458 | else: |
|
457 | else: | |
459 | return super(colorui, self).write_err( |
|
458 | return super(colorui, self).write_err( | |
460 |
*[self.label( |
|
459 | *[self.label(a, label) for a in args], **opts) | |
461 |
|
460 | |||
462 | def showlabel(self, msg, label): |
|
461 | def showlabel(self, msg, label): | |
463 | if label and msg: |
|
462 | if label and msg: |
@@ -622,11 +622,11 b' class ui(object):' | |||||
622 | a label of "status.modified" for modified files. |
|
622 | a label of "status.modified" for modified files. | |
623 | ''' |
|
623 | ''' | |
624 | if self._buffers: |
|
624 | if self._buffers: | |
625 |
self._buffers[-1].extend( |
|
625 | self._buffers[-1].extend(a for a in args) | |
626 | else: |
|
626 | else: | |
627 | self._progclear() |
|
627 | self._progclear() | |
628 | for a in args: |
|
628 | for a in args: | |
629 |
self.fout.write( |
|
629 | self.fout.write(a) | |
630 |
|
630 | |||
631 | def write_err(self, *args, **opts): |
|
631 | def write_err(self, *args, **opts): | |
632 | self._progclear() |
|
632 | self._progclear() | |
@@ -636,7 +636,7 b' class ui(object):' | |||||
636 | if not getattr(self.fout, 'closed', False): |
|
636 | if not getattr(self.fout, 'closed', False): | |
637 | self.fout.flush() |
|
637 | self.fout.flush() | |
638 | for a in args: |
|
638 | for a in args: | |
639 |
self.ferr.write( |
|
639 | self.ferr.write(a) | |
640 | # stderr may be buffered under win32 when redirected to files, |
|
640 | # stderr may be buffered under win32 when redirected to files, | |
641 | # including stdout. |
|
641 | # including stdout. | |
642 | if not getattr(self.ferr, 'closed', False): |
|
642 | if not getattr(self.ferr, 'closed', False): |
General Comments 0
You need to be logged in to leave comments.
Login now