Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
40593:6f0941f4a184 | 40594:234c2d8c9e48 |
---|---|
91 self.encoding = encodename | 91 self.encoding = encodename |
92 self._encodefn = encodefn | 92 self._encodefn = encodefn |
93 | 93 |
94 def write(self, data, **opts): | 94 def write(self, data, **opts): |
95 opts = pycompat.byteskwargs(opts) | 95 opts = pycompat.byteskwargs(opts) |
96 opts[b'data'] = data | 96 if data is not None: |
97 opts[b'data'] = data | |
97 self._cout.write(self._encodefn(opts)) | 98 self._cout.write(self._encodefn(opts)) |
98 | 99 |
99 def __getattr__(self, attr): | 100 def __getattr__(self, attr): |
100 return getattr(self._cout, attr) | 101 return getattr(self._cout, attr) |
101 | 102 |