Patchwork D1671: py3: handle keyword arguments correctly in debugcommands.py

login
register
mail settings
Submitter phabricator
Date Dec. 13, 2017, 1:05 p.m.
Message ID <5ca721e2279bd16d6c5514a8283e9eaa@localhost.localdomain>
Download mbox | patch
Permalink /patch/26270/
State Not Applicable
Headers show

Comments

phabricator - Dec. 13, 2017, 1:05 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc4d8920cfbaf: py3: handle keyword arguments correctly in debugcommands.py (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1671?vs=4396&id=4419

REVISION DETAIL
  https://phab.mercurial-scm.org/D1671

AFFECTED FILES
  mercurial/debugcommands.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, yuja
Cc: mercurial-devel

Patch

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -368,6 +368,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'))
@@ -870,6 +871,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)
 
@@ -2324,7 +2326,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('    ')
@@ -2450,6 +2452,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)