diff hgext/color.py @ 31089:a2ee25ff75e5

color: add multiple messages input support to 'win32print' All other function doing writes support any number of input message. For simplicity, we make 'win32print' able to do the same.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 24 Feb 2017 21:34:07 +0100
parents 894bdcdc75df
children ad074f900907
line wrap: on
line diff
--- a/hgext/color.py	Fri Feb 24 21:31:47 2017 +0100
+++ b/hgext/color.py	Fri Feb 24 21:34:07 2017 +0100
@@ -308,8 +308,7 @@
             else:
                 self._buffers[-1].extend(args)
         elif self._colormode == 'win32':
-            for a in args:
-                color.win32print(a, super(colorui, self).write, **opts)
+            color.win32print(super(colorui, self).write, *args, **opts)
         else:
             return super(colorui, self).write(
                 *[self.label(a, label) for a in args], **opts)
@@ -322,8 +321,7 @@
         if self._bufferstates and self._bufferstates[-1][0]:
             return self.write(*args, **opts)
         if self._colormode == 'win32':
-            for a in args:
-                color.win32print(a, super(colorui, self).write_err, **opts)
+            color.win32print(super(colorui, self).write_err, *args, **opts)
         else:
             return super(colorui, self).write_err(
                 *[self.label(a, label) for a in args], **opts)