changeset 35005:aad6b9fdfc75

py3: handle keyword arguments in hgext/shelve.py Differential Revision: https://phab.mercurial-scm.org/D1324
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 23 Oct 2017 00:06:49 +0530
parents 3ebae3ec4664
children 8154119ed236
files hgext/shelve.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/shelve.py	Mon Oct 23 00:06:23 2017 +0530
+++ b/hgext/shelve.py	Mon Oct 23 00:06:49 2017 +0530
@@ -43,6 +43,7 @@
     node as nodemod,
     patch,
     phases,
+    pycompat,
     registrar,
     repair,
     scmutil,
@@ -380,7 +381,7 @@
             editor_ = False
             if editor:
                 editor_ = cmdutil.getcommiteditor(editform='shelve.shelve',
-                                                  **opts)
+                                                  **pycompat.strkwargs(opts))
             with repo.ui.configoverride(overrides):
                 return repo.commit(message, shelveuser, opts.get('date'),
                                    match, editor=editor_, extra=extra)
@@ -389,6 +390,7 @@
                 repo.mq.checkapplied = saved
 
     def interactivecommitfunc(ui, repo, *pats, **opts):
+        opts = pycompat.byteskwargs(opts)
         match = scmutil.match(repo['.'], pats, {})
         message = opts['message']
         return commitfunc(ui, repo, message, match, opts)
@@ -465,7 +467,7 @@
         else:
             node = cmdutil.dorecord(ui, repo, commitfunc, None,
                                     False, cmdutil.recordfilter, *pats,
-                                    **opts)
+                                    **pycompat.strkwargs(opts))
         if not node:
             _nothingtoshelvemessaging(ui, repo, pats, opts)
             return 1
@@ -852,6 +854,7 @@
         return _dounshelve(ui, repo, *shelved, **opts)
 
 def _dounshelve(ui, repo, *shelved, **opts):
+    opts = pycompat.byteskwargs(opts)
     abortf = opts.get('abort')
     continuef = opts.get('continue')
     if not abortf and not continuef:
@@ -1010,6 +1013,7 @@
     To delete specific shelved changes, use ``--delete``. To delete
     all shelved changes, use ``--cleanup``.
     '''
+    opts = pycompat.byteskwargs(opts)
     allowables = [
         ('addremove', {'create'}), # 'create' is pseudo action
         ('unknown', {'create'}),