Show More
@@ -34,7 +34,7 b' from vcsserver.base import RepoFactory, ' | |||||
34 | from vcsserver.hgcompat import ( |
|
34 | from vcsserver.hgcompat import ( | |
35 | archival, bin, clone, config as hgconfig, diffopts, hex, get_ctx, |
|
35 | archival, bin, clone, config as hgconfig, diffopts, hex, get_ctx, | |
36 | hg_url as url_parser, httpbasicauthhandler, httpdigestauthhandler, |
|
36 | hg_url as url_parser, httpbasicauthhandler, httpdigestauthhandler, | |
37 | makepeer, instance, match, memctx, exchange, memfilectx, nullrev, |
|
37 | makepeer, instance, match, memctx, exchange, memfilectx, nullrev, hg_merge, | |
38 | patch, peer, revrange, ui, hg_tag, Abort, LookupError, RepoError, |
|
38 | patch, peer, revrange, ui, hg_tag, Abort, LookupError, RepoError, | |
39 | RepoLookupError, InterventionRequired, RequirementError) |
|
39 | RepoLookupError, InterventionRequired, RequirementError) | |
40 |
|
40 | |||
@@ -42,7 +42,29 b' log = logging.getLogger(__name__)' | |||||
42 |
|
42 | |||
43 |
|
43 | |||
44 | def make_ui_from_config(repo_config): |
|
44 | def make_ui_from_config(repo_config): | |
45 | baseui = ui.ui() |
|
45 | ||
|
46 | class LoggingUI(ui.ui): | |||
|
47 | def status(self, *msg, **opts): | |||
|
48 | log.info(' '.join(msg).rstrip('\n')) | |||
|
49 | super(LoggingUI, self).status(*msg, **opts) | |||
|
50 | ||||
|
51 | def warn(self, *msg, **opts): | |||
|
52 | log.warn(' '.join(msg).rstrip('\n')) | |||
|
53 | super(LoggingUI, self).warn(*msg, **opts) | |||
|
54 | ||||
|
55 | def error(self, *msg, **opts): | |||
|
56 | log.error(' '.join(msg).rstrip('\n')) | |||
|
57 | super(LoggingUI, self).error(*msg, **opts) | |||
|
58 | ||||
|
59 | def note(self, *msg, **opts): | |||
|
60 | log.info(' '.join(msg).rstrip('\n')) | |||
|
61 | super(LoggingUI, self).note(*msg, **opts) | |||
|
62 | ||||
|
63 | def debug(self, *msg, **opts): | |||
|
64 | log.debug(' '.join(msg).rstrip('\n')) | |||
|
65 | super(LoggingUI, self).debug(*msg, **opts) | |||
|
66 | ||||
|
67 | baseui = LoggingUI() | |||
46 |
|
68 | |||
47 | # clean the baseui object |
|
69 | # clean the baseui object | |
48 | baseui._ocfg = hgconfig.config() |
|
70 | baseui._ocfg = hgconfig.config() |
General Comments 0
You need to be logged in to leave comments.
Login now