Show More
@@ -0,0 +1,11 b'' | |||||
|
1 | #!/usr/bin/env python | |||
|
2 | ||||
|
3 | from hgext import color | |||
|
4 | ||||
|
5 | # ensure errors aren't buffered | |||
|
6 | testui = color.colorui() | |||
|
7 | testui.pushbuffer() | |||
|
8 | testui.write('buffered\n') | |||
|
9 | testui.warn('warning\n') | |||
|
10 | testui.write_err('error\n') | |||
|
11 | print repr(testui.popbuffer()) |
@@ -165,7 +165,7 b' class colorui(uimod.ui):' | |||||
165 | for a in args: |
|
165 | for a in args: | |
166 | win32print(a, super(colorui, self).write_err, **opts) |
|
166 | win32print(a, super(colorui, self).write_err, **opts) | |
167 | else: |
|
167 | else: | |
168 | return super(colorui, self).write( |
|
168 | return super(colorui, self).write_err( | |
169 | *[self.label(str(a), label) for a in args], **opts) |
|
169 | *[self.label(str(a), label) for a in args], **opts) | |
170 |
|
170 | |||
171 | def label(self, msg, label): |
|
171 | def label(self, msg, label): |
General Comments 0
You need to be logged in to leave comments.
Login now