Show More
@@ -96,11 +96,24 b' class blackboxlogger(object):' | |||||
96 | self._trackedevents = set(ui.configlist('blackbox', 'track')) |
|
96 | self._trackedevents = set(ui.configlist('blackbox', 'track')) | |
97 | self._maxfiles = ui.configint('blackbox', 'maxfiles') |
|
97 | self._maxfiles = ui.configint('blackbox', 'maxfiles') | |
98 | self._maxsize = ui.configbytes('blackbox', 'maxsize') |
|
98 | self._maxsize = ui.configbytes('blackbox', 'maxsize') | |
|
99 | self._inlog = False | |||
99 |
|
100 | |||
100 | def tracked(self, event): |
|
101 | def tracked(self, event): | |
101 | return b'*' in self._trackedevents or event in self._trackedevents |
|
102 | return b'*' in self._trackedevents or event in self._trackedevents | |
102 |
|
103 | |||
103 | def log(self, ui, event, msg, opts): |
|
104 | def log(self, ui, event, msg, opts): | |
|
105 | # self._log() -> ctx.dirty() may create new subrepo instance, which | |||
|
106 | # ui is derived from baseui. So the recursion guard in ui.log() | |||
|
107 | # doesn't work as it's local to the ui instance. | |||
|
108 | if self._inlog: | |||
|
109 | return | |||
|
110 | self._inlog = True | |||
|
111 | try: | |||
|
112 | self._log(ui, event, msg, opts) | |||
|
113 | finally: | |||
|
114 | self._inlog = False | |||
|
115 | ||||
|
116 | def _log(self, ui, event, msg, opts): | |||
104 | default = ui.configdate('devel', 'default-date') |
|
117 | default = ui.configdate('devel', 'default-date') | |
105 | date = dateutil.datestr(default, ui.config('blackbox', 'date-format')) |
|
118 | date = dateutil.datestr(default, ui.config('blackbox', 'date-format')) | |
106 | user = procutil.getuser() |
|
119 | user = procutil.getuser() |
General Comments 0
You need to be logged in to leave comments.
Login now