comparison hgext/fastannotate/__init__.py @ 43076:2372284d9457

formatting: blacken the codebase This is using my patch to black (https://github.com/psf/black/pull/826) so we don't un-wrap collection literals. Done with: hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S # skip-blame mass-reformatting only # no-check-commit reformats foo_bar functions Differential Revision: https://phab.mercurial-scm.org/D6971
author Augie Fackler <augie@google.com>
date Sun, 06 Oct 2019 09:45:02 -0400
parents 0152a907f714
children 687b865b95ad
comparison
equal deleted inserted replaced
43075:57875cf423c9 43076:2372284d9457
147 for name in modes: 147 for name in modes:
148 if name == 'fastannotate': 148 if name == 'fastannotate':
149 commands.registercommand() 149 commands.registercommand()
150 elif name == 'hgweb': 150 elif name == 'hgweb':
151 from . import support 151 from . import support
152
152 support.replacehgwebannotate() 153 support.replacehgwebannotate()
153 elif name == 'fctx': 154 elif name == 'fctx':
154 from . import support 155 from . import support
156
155 support.replacefctxannotate() 157 support.replacefctxannotate()
156 commands.wrapdefault() 158 commands.wrapdefault()
157 else: 159 else:
158 raise hgerror.Abort(_('fastannotate: invalid mode: %s') % name) 160 raise hgerror.Abort(_('fastannotate: invalid mode: %s') % name)
159 161
160 if ui.configbool('fastannotate', 'server'): 162 if ui.configbool('fastannotate', 'server'):
161 protocol.serveruisetup(ui) 163 protocol.serveruisetup(ui)
162 164
165
163 def extsetup(ui): 166 def extsetup(ui):
164 # fastannotate has its own locking, without depending on repo lock 167 # fastannotate has its own locking, without depending on repo lock
165 # TODO: avoid mutating this unless the specific repo has it enabled 168 # TODO: avoid mutating this unless the specific repo has it enabled
166 localrepo.localrepository._wlockfreeprefix.add('fastannotate/') 169 localrepo.localrepository._wlockfreeprefix.add('fastannotate/')
167 170
171
168 def reposetup(ui, repo): 172 def reposetup(ui, repo):
169 if ui.configbool('fastannotate', 'client'): 173 if ui.configbool('fastannotate', 'client'):
170 protocol.clientreposetup(ui, repo) 174 protocol.clientreposetup(ui, repo)