mercurial/ui.py
changeset 47437 7a430116f639
parent 47415 b1b3127227be
child 48875 6000f5b25c9b
equal deleted inserted replaced
47436:6ecd0980d7f9 47437:7a430116f639
  1143 
  1143 
  1144     @fmsg.setter
  1144     @fmsg.setter
  1145     def fmsg(self, f):
  1145     def fmsg(self, f):
  1146         self._fmsg = f
  1146         self._fmsg = f
  1147         self._fmsgout, self._fmsgerr = _selectmsgdests(self)
  1147         self._fmsgout, self._fmsgerr = _selectmsgdests(self)
       
  1148 
       
  1149     @contextlib.contextmanager
       
  1150     def silent(self, error=False, subproc=False, labeled=False):
       
  1151         self.pushbuffer(error=error, subproc=subproc, labeled=labeled)
       
  1152         try:
       
  1153             yield
       
  1154         finally:
       
  1155             self.popbuffer()
  1148 
  1156 
  1149     def pushbuffer(self, error=False, subproc=False, labeled=False):
  1157     def pushbuffer(self, error=False, subproc=False, labeled=False):
  1150         """install a buffer to capture standard output of the ui object
  1158         """install a buffer to capture standard output of the ui object
  1151 
  1159 
  1152         If error is True, the error output will be captured too.
  1160         If error is True, the error output will be captured too.