Mercurial > public > mercurial-scm > hg
diff 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 |
line wrap: on
line diff
--- a/hgext/fastannotate/__init__.py Sat Oct 05 10:29:34 2019 -0400 +++ b/hgext/fastannotate/__init__.py Sun Oct 06 09:45:02 2019 -0400 @@ -149,9 +149,11 @@ commands.registercommand() elif name == 'hgweb': from . import support + support.replacehgwebannotate() elif name == 'fctx': from . import support + support.replacefctxannotate() commands.wrapdefault() else: @@ -160,11 +162,13 @@ if ui.configbool('fastannotate', 'server'): protocol.serveruisetup(ui) + def extsetup(ui): # fastannotate has its own locking, without depending on repo lock # TODO: avoid mutating this unless the specific repo has it enabled localrepo.localrepository._wlockfreeprefix.add('fastannotate/') + def reposetup(ui, repo): if ui.configbool('fastannotate', 'client'): protocol.clientreposetup(ui, repo)