color: pass write/write_err to win32print correctly (issue2312) stable
authorBrodie Rao <brodie@bitheap.org>
Sun, 01 Aug 2010 16:26:02 -0400
branchstable
changeset 11727 c34a1ab80550
parent 11725 56b41b2cc690
child 11731 87dcf758309d
color: pass write/write_err to win32print correctly (issue2312)
hgext/color.py
--- a/hgext/color.py	Sun Aug 01 13:49:43 2010 -0500
+++ b/hgext/color.py	Sun Aug 01 16:26:02 2010 -0400
@@ -154,7 +154,7 @@
             self._buffers[-1].extend([(str(a), label) for a in args])
         elif self._colormode == 'win32':
             for a in args:
-                win32print(a, orig, **opts)
+                win32print(a, super(colorui, self).write, **opts)
         else:
             return super(colorui, self).write(
                 *[self.label(str(a), label) for a in args], **opts)
@@ -163,7 +163,7 @@
         label = opts.get('label', '')
         if self._colormode == 'win32':
             for a in args:
-                win32print(a, orig, **opts)
+                win32print(a, super(colorui, self).write_err, **opts)
         else:
             return super(colorui, self).write(
                 *[self.label(str(a), label) for a in args], **opts)