1 # -*- coding: utf-8 -*-
3 Mercurial ui module replacement.
10 class SilentUI(mercurial.ui.ui):
12 def __init__(self, *args, **kwargs):
13 super(SilentUI, self).__init__(*args, **kwargs)
15 # make sure this doesn't collide with anything in Mercurial
16 self.__logger = logging.getLogger('mercurial')
18 def _is_trusted(self, fd, filename):
19 """ Checks if config file is trusted - on server side, this isn't very useful. """
22 def write(self, *args):
24 self._buffers[-1].extend([str(a) for a in args])
26 self.__logger.info(''.join(args))
28 def write_err(self, *args):
29 self.__logger.error(''.join(args))
34 def interactive(self):
37 def _readline(self, prompt=''):
40 def status(self, *msg):
41 self.__logger.debug(''.join(msg))
44 self.__logger.warn(''.join(msg))
47 self.__logger.info(''.join(msg))
49 def debug(self, *msg):
50 self.__logger.debug(''.join(msg))
52 def edit(self, text, user):
55 def traceback(self, exc=None):
57 self.__logger.exception()
59 def progress(self, *args, **kwargs):