Mercurial > hg
changeset 39666:b77f2ea51da5
py3: fix kwargs handling in hgext/fastannotate.py
Differential Revision: https://phab.mercurial-scm.org/D4588
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Fri, 14 Sep 2018 23:51:21 +0300 |
parents | c73c7653dfb9 |
children | 0b7594ada0db |
files | hgext/fastannotate/commands.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/fastannotate/commands.py Mon Sep 17 15:55:18 2018 +0300 +++ b/hgext/fastannotate/commands.py Fri Sep 14 23:51:21 2018 +0300 @@ -130,6 +130,8 @@ if ui.configbool('fastannotate', 'unfilteredrepo'): repo = repo.unfiltered() + opts = pycompat.byteskwargs(opts) + rev = opts.get('rev', '.') rebuild = opts.get('rebuild', False) @@ -207,12 +209,12 @@ # treat the file as text (skip the isbinary check) if ui.configbool('fastannotate', 'forcetext'): - opts['text'] = True + opts[r'text'] = True # check if we need to do prefetch (client-side) - rev = opts.get('rev') + rev = opts.get(r'rev') if util.safehasattr(repo, 'prefetchfastannotate') and rev is not None: - paths = list(_matchpaths(repo, rev, pats, opts)) + paths = list(_matchpaths(repo, rev, pats, pycompat.byteskwargs(opts))) repo.prefetchfastannotate(paths) return orig(ui, repo, *pats, **opts) @@ -241,6 +243,7 @@ The annotate cache will be built using the default diff and follow options and lives in '.hg/fastannotate/default'. """ + opts = pycompat.byteskwargs(opts) rev = opts.get('REV') or ui.config('fastannotate', 'mainbranch') if not rev: raise error.Abort(_('you need to provide a revision'),