Mercurial > public > mercurial-scm > hg
diff hgext/fastannotate/support.py @ 43077:687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Done with
python3.7 contrib/byteify-strings.py -i $(hg files 'set:mercurial/**.py - mercurial/thirdparty/** + hgext/**.py - hgext/fsmonitor/pywatchman/** - mercurial/__init__.py')
black -l 80 -t py33 -S $(hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**" - hgext/fsmonitor/pywatchman/**')
# skip-blame mass-reformatting only
Differential Revision: https://phab.mercurial-scm.org/D6972
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 06 Oct 2019 09:48:39 -0400 |
parents | 2372284d9457 |
children | c59eb1560c44 |
line wrap: on
line diff
--- a/hgext/fastannotate/support.py Sun Oct 06 09:45:02 2019 -0400 +++ b/hgext/fastannotate/support.py Sun Oct 06 09:48:39 2019 -0400 @@ -64,7 +64,7 @@ def _getmaster(fctx): """(fctx) -> str""" - return fctx._repo.ui.config('fastannotate', 'mainbranch') or 'default' + return fctx._repo.ui.config(b'fastannotate', b'mainbranch') or b'default' def _doannotate(fctx, follow=True, diffopts=None): @@ -83,7 +83,7 @@ except Exception: ac.rebuild() # try rebuild once fctx._repo.ui.debug( - 'fastannotate: %s: rebuilding broken cache\n' % fctx._path + b'fastannotate: %s: rebuilding broken cache\n' % fctx._path ) try: annotated, contents = ac.annotate( @@ -98,7 +98,7 @@ def _hgwebannotate(orig, fctx, ui): diffopts = patch.difffeatureopts( - ui, untrusted=True, section='annotate', whitespace=True + ui, untrusted=True, section=b'annotate', whitespace=True ) return _doannotate(fctx, diffopts=diffopts) @@ -115,7 +115,7 @@ return _doannotate(self, follow, diffopts) except Exception as ex: self._repo.ui.debug( - 'fastannotate: falling back to the vanilla ' 'annotate: %r\n' % ex + b'fastannotate: falling back to the vanilla ' b'annotate: %r\n' % ex ) return orig(self, follow=follow, skiprevs=skiprevs, diffopts=diffopts) @@ -130,8 +130,8 @@ def replacehgwebannotate(): - extensions.wrapfunction(hgweb.webutil, 'annotate', _hgwebannotate) + extensions.wrapfunction(hgweb.webutil, b'annotate', _hgwebannotate) def replacefctxannotate(): - extensions.wrapfunction(hgcontext.basefilectx, 'annotate', _fctxannotate) + extensions.wrapfunction(hgcontext.basefilectx, b'annotate', _fctxannotate)