changeset 36154:4a7ba3ac9163

narrowcommands: use pycompat.{bytes,str}kwargs Differential Revision: https://phab.mercurial-scm.org/D2228
author Augie Fackler <augie@google.com>
date Tue, 13 Feb 2018 10:39:31 -0500
parents 72d155a792b1
children 0c104ee51918
files hgext/narrow/narrowcommands.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/narrow/narrowcommands.py	Tue Feb 13 10:38:02 2018 -0500
+++ b/hgext/narrow/narrowcommands.py	Tue Feb 13 10:39:31 2018 -0500
@@ -19,6 +19,7 @@
     hg,
     merge,
     node,
+    pycompat,
     registrar,
     repair,
     repoview,
@@ -69,6 +70,7 @@
 
 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 @@
     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."""