##// END OF EJS Templates
debugwireargs: migrate `opts` to native kwargs
Matt Harbison -
r51865:a4d21089 default
parent child Browse files
Show More
@@ -4219,16 +4219,15 b' def debugwhyunstable(ui, repo, rev):'
4219 norepo=True,
4219 norepo=True,
4220 )
4220 )
4221 def debugwireargs(ui, repopath, *vals, **opts):
4221 def debugwireargs(ui, repopath, *vals, **opts):
4222 opts = pycompat.byteskwargs(opts)
4222 repo = hg.peer(ui, pycompat.byteskwargs(opts), repopath)
4223 repo = hg.peer(ui, opts, repopath)
4224 try:
4223 try:
4225 for opt in cmdutil.remoteopts:
4224 for opt in cmdutil.remoteopts:
4226 del opts[opt[1]]
4225 del opts[pycompat.sysstr(opt[1])]
4227 args = {}
4226 args = {}
4228 for k, v in opts.items():
4227 for k, v in opts.items():
4229 if v:
4228 if v:
4230 args[k] = v
4229 args[k] = v
4231 args = pycompat.strkwargs(args)
4230
4232 # run twice to check that we don't mess up the stream for the next command
4231 # run twice to check that we don't mess up the stream for the next command
4233 res1 = repo.debugwireargs(*vals, **args)
4232 res1 = repo.debugwireargs(*vals, **args)
4234 res2 = repo.debugwireargs(*vals, **args)
4233 res2 = repo.debugwireargs(*vals, **args)
General Comments 0
You need to be logged in to leave comments. Login now