comparison mercurial/exthelper.py @ 43238:101ae8bbfa02

cleanup: hgdemandimport.tracing accepts strings, not bytes This does mean that the resulting traces will have some b'' goo in them on Python 3, but I think that's a worthwile price to pay since it doesn't break any tests. Differential Revision: https://phab.mercurial-scm.org/D7108
author Augie Fackler <augie@google.com>
date Tue, 15 Oct 2019 11:06:04 -0400
parents d783f945a701
children bd22900e26ac
comparison
equal deleted inserted replaced
43237:b21e3a747501 43238:101ae8bbfa02
137 for opt in opts: 137 for opt in opts:
138 entry[1].append(opt) 138 entry[1].append(opt)
139 for cont, funcname, wrapper in self._functionwrappers: 139 for cont, funcname, wrapper in self._functionwrappers:
140 extensions.wrapfunction(cont, funcname, wrapper) 140 extensions.wrapfunction(cont, funcname, wrapper)
141 for c in self._uicallables: 141 for c in self._uicallables:
142 with tracing.log(b'finaluisetup: %s', pycompat.sysbytes(repr(c))): 142 with tracing.log('finaluisetup: %s', repr(c)):
143 c(ui) 143 c(ui)
144 144
145 def finaluipopulate(self, ui): 145 def finaluipopulate(self, ui):
146 """Method to be used as the extension uipopulate 146 """Method to be used as the extension uipopulate
147 147
178 if opts: 178 if opts:
179 for opt in opts: 179 for opt in opts:
180 entry[1].append(opt) 180 entry[1].append(opt)
181 181
182 for c in self._extcallables: 182 for c in self._extcallables:
183 with tracing.log(b'finalextsetup: %s', pycompat.sysbytes(repr(c))): 183 with tracing.log('finalextsetup: %s', repr(c)):
184 c(ui) 184 c(ui)
185 185
186 def finalreposetup(self, ui, repo): 186 def finalreposetup(self, ui, repo):
187 """Method to be used as the extension reposetup 187 """Method to be used as the extension reposetup
188 188
191 - All hooks but pre-* and post-* 191 - All hooks but pre-* and post-*
192 - Modify configuration variables 192 - Modify configuration variables
193 - Changes to repo.__class__, repo.dirstate.__class__ 193 - Changes to repo.__class__, repo.dirstate.__class__
194 """ 194 """
195 for c in self._repocallables: 195 for c in self._repocallables:
196 with tracing.log(b'finalreposetup: %s', pycompat.sysbytes(repr(c))): 196 with tracing.log('finalreposetup: %s', repr(c)):
197 c(ui, repo) 197 c(ui, repo)
198 198
199 def uisetup(self, call): 199 def uisetup(self, call):
200 """Decorated function will be executed during uisetup 200 """Decorated function will be executed during uisetup
201 201