diff mercurial/commandserver.py @ 40594:234c2d8c9e48

commandserver: send raw progress information to message channel This is pretty basic implementation to support GUI progress bar.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 04 Nov 2018 12:51:14 +0900
parents 83dd8c63a0c6
children cb372d09d30a
line wrap: on
line diff
--- a/mercurial/commandserver.py	Sun Nov 04 12:38:49 2018 +0900
+++ b/mercurial/commandserver.py	Sun Nov 04 12:51:14 2018 +0900
@@ -93,7 +93,8 @@
 
     def write(self, data, **opts):
         opts = pycompat.byteskwargs(opts)
-        opts[b'data'] = data
+        if data is not None:
+            opts[b'data'] = data
         self._cout.write(self._encodefn(opts))
 
     def __getattr__(self, attr):