# HG changeset patch # User Pulkit Goyal # Date 2018-09-03 10:52:49 # Node ID b3572f733dbd36ca0fdca638f77538badda9c460 # Parent cb70501d8b71edea2fa6eaee54f15e556f4b54e2 py3: add r'' prefix to prevent b'' being prepended The keys of keyword arguments should be str. # skip-blame because we are adding just r'' prefixes. Differential Revision: https://phab.mercurial-scm.org/D4449 diff --git a/hgext/fastannotate/commands.py b/hgext/fastannotate/commands.py --- a/hgext/fastannotate/commands.py +++ b/hgext/fastannotate/commands.py @@ -70,7 +70,7 @@ def _matchpaths(repo, rev, pats, opts, a yield p fastannotatecommandargs = { - 'options': [ + r'options': [ ('r', 'rev', '.', _('annotate the specified revision'), _('REV')), ('u', 'user', None, _('list the author (long with -v)')), ('f', 'file', None, _('list the filename')), @@ -88,8 +88,8 @@ fastannotatecommandargs = { ('', 'rebuild', None, _('rebuild cache even if it exists ' '(EXPERIMENTAL)')), ] + commands.diffwsopts + commands.walkopts + commands.formatteropts, - 'synopsis': _('[-r REV] [-f] [-a] [-u] [-d] [-n] [-c] [-l] FILE...'), - 'inferrepo': True, + r'synopsis': _('[-r REV] [-f] [-a] [-u] [-d] [-n] [-c] [-l] FILE...'), + r'inferrepo': True, } def fastannotate(ui, repo, *pats, **opts): @@ -197,7 +197,7 @@ def fastannotate(ui, repo, *pats, **opts _newopts = set([]) _knownopts = set([opt[1].replace('-', '_') for opt in - (fastannotatecommandargs['options'] + commands.globalopts)]) + (fastannotatecommandargs[r'options'] + commands.globalopts)]) def _annotatewrapper(orig, ui, repo, *pats, **opts): """used by wrapdefault"""