diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py --- a/hgext/largefiles/lfcommands.py +++ b/hgext/largefiles/lfcommands.py @@ -27,7 +27,6 @@ from mercurial import ( lock, logcmdutil, match as matchmod, - pycompat, scmutil, util, ) @@ -87,12 +86,11 @@ def lfconvert(ui, src, dest, *pats, **op Use --to-normal to convert largefiles back to normal files; after this, the DEST repository can be used without largefiles at all.""" - opts = pycompat.byteskwargs(opts) - if opts[b'to_normal']: + if opts['to_normal']: tolfile = False else: tolfile = True - size = lfutil.getminsize(ui, True, opts.get(b'size'), default=None) + size = lfutil.getminsize(ui, True, opts.get('size'), default=None) if not hg.islocal(src): raise error.Abort(_(b'%s is not a local Mercurial repo') % src) diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -1717,11 +1717,10 @@ def overridetransplant(orig, ui, repo, * @eh.wrapcommand(b'cat') def overridecat(orig, ui, repo, file1, *pats, **opts): - opts = pycompat.byteskwargs(opts) - ctx = logcmdutil.revsingle(repo, opts.get(b'rev')) + ctx = logcmdutil.revsingle(repo, opts.get('rev')) err = 1 notbad = set() - m = scmutil.match(ctx, (file1,) + pats, opts) + m = scmutil.match(ctx, (file1,) + pats, pycompat.byteskwargs(opts)) origmatchfn = m.matchfn def lfmatchfn(f): @@ -1758,12 +1757,12 @@ def overridecat(orig, ui, repo, file1, * m.visitdir = lfvisitdirfn for f in ctx.walk(m): - with cmdutil.makefileobj(ctx, opts.get(b'output'), pathname=f) as fp: + with cmdutil.makefileobj(ctx, opts.get('output'), pathname=f) as fp: lf = lfutil.splitstandin(f) if lf is None or origmatchfn(f): # duplicating unreachable code from commands.cat data = ctx[f].data() - if opts.get(b'decode'): + if opts.get('decode'): data = repo.wwritedata(f, data) fp.write(data) else: