2 Mercurial ui module replacement.
8 class SilentUI(mercurial.ui.ui):
10 def __init__(self, *args, **kwargs):
11 super(SilentUI, self).__init__(*args, **kwargs)
13 # make sure this doesn't collide with anything in Mercurial
14 self.__logger = logging.getLogger('mercurial')
16 def _is_trusted(self, fd, filename):
17 """ Checks if config file is trusted - on server side, this isn't very useful. """
20 def write(self, *args):
22 self._buffers[-1].extend([str(a) for a in args])
24 self.__logger.info(''.join(args))
26 def write_err(self, *args):
27 self.__logger.error(''.join(args))
32 def interactive(self):
35 def _readline(self, prompt=''):
38 def status(self, *msg):
39 self.__logger.debug(''.join(msg))
42 self.__logger.warn(''.join(msg))
45 self.__logger.info(''.join(msg))
47 def debug(self, *msg):
48 self.__logger.debug(''.join(msg))
50 def edit(self, text, user):
53 def traceback(self, exc=None):
54 if exc is not None: self.__logger.exception()
56 def progress(self, *args):