diff mercurial/color.py @ 31106: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 75c4aafee490
children 8903f67b9ca8
line wrap: on
line diff
--- a/mercurial/color.py	Fri Feb 24 21:31:47 2017 +0100
+++ b/mercurial/color.py	Fri Feb 24 21:34:07 2017 +0100
@@ -288,7 +288,11 @@
             ansire = re.compile('\033\[([^m]*)m([^\033]*)(.*)',
                                 re.MULTILINE | re.DOTALL)
 
-    def win32print(text, writefunc, **opts):
+    def win32print(writefunc, *msgs, **opts):
+        for text in msgs:
+            _win32print(text, writefunc, **opts)
+
+    def _win32print(text, writefunc, **opts):
         label = opts.get('label', '')
         attr = origattr