comparison mercurial/ui.py @ 40587:5542bc9125c9

dispatch: pass around ui.fmsg channel This will be set by the command server. See the next patch.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 18 Jan 2015 18:43:23 +0900
parents db61a18148a4
children 054d0fcba2c4
comparison
equal deleted inserted replaced
40586:3b0f07cc9626 40587:5542bc9125c9
229 229
230 if src: 230 if src:
231 self._fout = src._fout 231 self._fout = src._fout
232 self._ferr = src._ferr 232 self._ferr = src._ferr
233 self._fin = src._fin 233 self._fin = src._fin
234 self._fmsg = src._fmsg
234 self._fmsgout = src._fmsgout 235 self._fmsgout = src._fmsgout
235 self._fmsgerr = src._fmsgerr 236 self._fmsgerr = src._fmsgerr
236 self._finoutredirected = src._finoutredirected 237 self._finoutredirected = src._finoutredirected
237 self.pageractive = src.pageractive 238 self.pageractive = src.pageractive
238 self._disablepager = src._disablepager 239 self._disablepager = src._disablepager
256 self._blockedtimes = src._blockedtimes 257 self._blockedtimes = src._blockedtimes
257 else: 258 else:
258 self._fout = procutil.stdout 259 self._fout = procutil.stdout
259 self._ferr = procutil.stderr 260 self._ferr = procutil.stderr
260 self._fin = procutil.stdin 261 self._fin = procutil.stdin
262 self._fmsg = None
261 self._fmsgout = self.fout # configurable 263 self._fmsgout = self.fout # configurable
262 self._fmsgerr = self.ferr # configurable 264 self._fmsgerr = self.ferr # configurable
263 self._finoutredirected = False 265 self._finoutredirected = False
264 self.pageractive = False 266 self.pageractive = False
265 self._disablepager = False 267 self._disablepager = False
909 return self._fin 911 return self._fin
910 912
911 @fin.setter 913 @fin.setter
912 def fin(self, f): 914 def fin(self, f):
913 self._fin = f 915 self._fin = f
916
917 @property
918 def fmsg(self):
919 """Stream dedicated for status/error messages; may be None if
920 fout/ferr are used"""
921 return self._fmsg
922
923 @fmsg.setter
924 def fmsg(self, f):
925 self._fmsg = f
926 self._fmsgout, self._fmsgerr = _selectmsgdests(self)
914 927
915 def pushbuffer(self, error=False, subproc=False, labeled=False): 928 def pushbuffer(self, error=False, subproc=False, labeled=False):
916 """install a buffer to capture standard output of the ui object 929 """install a buffer to capture standard output of the ui object
917 930
918 If error is True, the error output will be captured too. 931 If error is True, the error output will be captured too.