Patchwork D1628: py3: handle keyword arguments correctly in commands.py

login
register
mail settings
Submitter phabricator
Date Dec. 10, 2017, 2:07 a.m.
Message ID <8d8f9ff5c675e8c5cf920ca72211a05a@localhost.localdomain>
Download mbox | patch
Permalink /patch/26170/
State Not Applicable
Headers show

Comments

phabricator - Dec. 10, 2017, 2:07 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG920cca6c8462: py3: handle keyword arguments correctly in commands.py (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1628?vs=4295&id=4308

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1278,6 +1278,7 @@ 
 
     Returns 0 on success.
     """
+    opts = pycompat.byteskwargs(opts)
     ctx = scmutil.revsingle(repo, opts.get('rev'))
     m = scmutil.match(ctx, (file1,) + pats, opts)
     fntemplate = opts.pop('output', '')
@@ -1290,7 +1291,8 @@ 
         ui.pager('cat')
         fm = ui.formatter('cat', opts)
     with fm:
-        return cmdutil.cat(ui, repo, ctx, m, fm, fntemplate, '', **opts)
+        return cmdutil.cat(ui, repo, ctx, m, fm, fntemplate, '',
+                           **pycompat.strkwargs(opts))
 
 @command('^clone',
     [('U', 'noupdate', None, _('the clone will include an empty working '
@@ -1743,7 +1745,7 @@ 
 def debugcomplete(ui, cmd='', **opts):
     """returns the completion list associated with the given command"""
 
-    if opts.get('options'):
+    if opts.get(r'options'):
         options = []
         otables = [globalopts]
         if cmd: