# HG changeset patch # User Augie Fackler # Date 2018-02-13 15:39:31 # Node ID 4a7ba3ac916342cc6d66fe5778c0268dd70fb2e9 # Parent 72d155a792b161b5ac6472c451018a437e183c47 narrowcommands: use pycompat.{bytes,str}kwargs Differential Revision: https://phab.mercurial-scm.org/D2228 diff --git a/hgext/narrow/narrowcommands.py b/hgext/narrow/narrowcommands.py --- a/hgext/narrow/narrowcommands.py +++ b/hgext/narrow/narrowcommands.py @@ -19,6 +19,7 @@ from mercurial import ( hg, merge, node, + pycompat, registrar, repair, repoview, @@ -69,6 +70,7 @@ def expandpull(pullop, includepats, excl def clonenarrowcmd(orig, ui, repo, *args, **opts): """Wraps clone command, so 'hg clone' first wraps localrepo.clone().""" + opts = pycompat.byteskwargs(opts) wrappedextraprepare = util.nullcontextmanager() opts_narrow = opts['narrow'] if opts_narrow: @@ -111,7 +113,7 @@ def clonenarrowcmd(orig, ui, repo, *args wrappedpull = extensions.wrappedfunction(exchange, 'pull', pullnarrow) with wrappedextraprepare, wrappedpull: - return orig(ui, repo, *args, **opts) + return orig(ui, repo, *args, **pycompat.strkwargs(opts)) def pullnarrowcmd(orig, ui, repo, *args, **opts): """Wraps pull command to allow modifying narrow spec."""