comparison hgext/fastannotate/commands.py @ 39433:b3572f733dbd

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
author Pulkit Goyal <pulkit@yandex-team.ru>
date Mon, 03 Sep 2018 13:52:49 +0300
parents 1ddb296e0dee
children b77f2ea51da5
comparison
equal deleted inserted replaced
39432:cb70501d8b71 39433:b3572f733dbd
68 m = scmutil.match(ctx, pats, opts, badfn=bad) 68 m = scmutil.match(ctx, pats, opts, badfn=bad)
69 for p in ctx.walk(m): 69 for p in ctx.walk(m):
70 yield p 70 yield p
71 71
72 fastannotatecommandargs = { 72 fastannotatecommandargs = {
73 'options': [ 73 r'options': [
74 ('r', 'rev', '.', _('annotate the specified revision'), _('REV')), 74 ('r', 'rev', '.', _('annotate the specified revision'), _('REV')),
75 ('u', 'user', None, _('list the author (long with -v)')), 75 ('u', 'user', None, _('list the author (long with -v)')),
76 ('f', 'file', None, _('list the filename')), 76 ('f', 'file', None, _('list the filename')),
77 ('d', 'date', None, _('list the date (short with -q)')), 77 ('d', 'date', None, _('list the date (short with -q)')),
78 ('n', 'number', None, _('list the revision number (default)')), 78 ('n', 'number', None, _('list the revision number (default)')),
86 'of merges (EXPERIMENTAL)')), 86 'of merges (EXPERIMENTAL)')),
87 ('', 'long-hash', None, _('show long changeset hash (EXPERIMENTAL)')), 87 ('', 'long-hash', None, _('show long changeset hash (EXPERIMENTAL)')),
88 ('', 'rebuild', None, _('rebuild cache even if it exists ' 88 ('', 'rebuild', None, _('rebuild cache even if it exists '
89 '(EXPERIMENTAL)')), 89 '(EXPERIMENTAL)')),
90 ] + commands.diffwsopts + commands.walkopts + commands.formatteropts, 90 ] + commands.diffwsopts + commands.walkopts + commands.formatteropts,
91 'synopsis': _('[-r REV] [-f] [-a] [-u] [-d] [-n] [-c] [-l] FILE...'), 91 r'synopsis': _('[-r REV] [-f] [-a] [-u] [-d] [-n] [-c] [-l] FILE...'),
92 'inferrepo': True, 92 r'inferrepo': True,
93 } 93 }
94 94
95 def fastannotate(ui, repo, *pats, **opts): 95 def fastannotate(ui, repo, *pats, **opts):
96 """show changeset information by line for each file 96 """show changeset information by line for each file
97 97
195 formatter.write(result, lines, existinglines=existinglines) 195 formatter.write(result, lines, existinglines=existinglines)
196 formatter.end() 196 formatter.end()
197 197
198 _newopts = set([]) 198 _newopts = set([])
199 _knownopts = set([opt[1].replace('-', '_') for opt in 199 _knownopts = set([opt[1].replace('-', '_') for opt in
200 (fastannotatecommandargs['options'] + commands.globalopts)]) 200 (fastannotatecommandargs[r'options'] + commands.globalopts)])
201 201
202 def _annotatewrapper(orig, ui, repo, *pats, **opts): 202 def _annotatewrapper(orig, ui, repo, *pats, **opts):
203 """used by wrapdefault""" 203 """used by wrapdefault"""
204 # we need this hack until the obsstore has 0.0 seconds perf impact 204 # we need this hack until the obsstore has 0.0 seconds perf impact
205 if ui.configbool('fastannotate', 'unfilteredrepo'): 205 if ui.configbool('fastannotate', 'unfilteredrepo'):