D1671: py3: handle keyword arguments correctly in debugcommands.py
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Tue Dec 12 23:25:56 UTC 2017
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D1671
AFFECTED FILES
mercurial/debugcommands.py
CHANGE DETAILS
diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -365,6 +365,7 @@
norepo=True)
def debugcapabilities(ui, path, **opts):
"""lists the capabilities of a remote peer"""
+ opts = pycompat.byteskwargs(opts)
peer = hg.peer(ui, opts, path)
caps = peer.capabilities()
ui.write(('Main capabilities:\n'))
@@ -867,6 +868,7 @@
Use --verbose to get extra information about current config value and
Mercurial default."""
+ opts = pycompat.byteskwargs(opts)
maxvariantlength = max(len(fv.name) for fv in upgrade.allformatvariant)
maxvariantlength = max(len('format-variant'), maxvariantlength)
@@ -2296,7 +2298,7 @@
ctx = repo[rev]
ui.write('%s\n'% ctx2str(ctx))
for succsset in obsutil.successorssets(repo, ctx.node(),
- closest=opts['closest'],
+ closest=opts[r'closest'],
cache=cache):
if succsset:
ui.write(' ')
@@ -2422,6 +2424,7 @@
for k, v in opts.iteritems():
if v:
args[k] = v
+ args = pycompat.strkwargs(args)
# run twice to check that we don't mess up the stream for the next command
res1 = repo.debugwireargs(*vals, **args)
res2 = repo.debugwireargs(*vals, **args)
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list