##// END OF EJS Templates
narrowcommands: use pycompat.{bytes,str}kwargs...
Augie Fackler -
r36172:4a7ba3ac default
parent child Browse files
Show More
@@ -19,6 +19,7 b' from mercurial import ('
19 hg,
19 hg,
20 merge,
20 merge,
21 node,
21 node,
22 pycompat,
22 registrar,
23 registrar,
23 repair,
24 repair,
24 repoview,
25 repoview,
@@ -69,6 +70,7 b' def expandpull(pullop, includepats, excl'
69
70
70 def clonenarrowcmd(orig, ui, repo, *args, **opts):
71 def clonenarrowcmd(orig, ui, repo, *args, **opts):
71 """Wraps clone command, so 'hg clone' first wraps localrepo.clone()."""
72 """Wraps clone command, so 'hg clone' first wraps localrepo.clone()."""
73 opts = pycompat.byteskwargs(opts)
72 wrappedextraprepare = util.nullcontextmanager()
74 wrappedextraprepare = util.nullcontextmanager()
73 opts_narrow = opts['narrow']
75 opts_narrow = opts['narrow']
74 if opts_narrow:
76 if opts_narrow:
@@ -111,7 +113,7 b' def clonenarrowcmd(orig, ui, repo, *args'
111 wrappedpull = extensions.wrappedfunction(exchange, 'pull', pullnarrow)
113 wrappedpull = extensions.wrappedfunction(exchange, 'pull', pullnarrow)
112
114
113 with wrappedextraprepare, wrappedpull:
115 with wrappedextraprepare, wrappedpull:
114 return orig(ui, repo, *args, **opts)
116 return orig(ui, repo, *args, **pycompat.strkwargs(opts))
115
117
116 def pullnarrowcmd(orig, ui, repo, *args, **opts):
118 def pullnarrowcmd(orig, ui, repo, *args, **opts):
117 """Wraps pull command to allow modifying narrow spec."""
119 """Wraps pull command to allow modifying narrow spec."""
General Comments 0
You need to be logged in to leave comments. Login now