D1324: py3: handle keyword arguments in hgext/shelve.py

2017-11-09 Thread pulkit (Pulkit Goyal)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGaad6b9fdfc75: py3: handle keyword arguments in 
hgext/shelve.py (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1324?vs=3287=3368

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

AFFECTED FILES
  hgext/shelve.py

CHANGE DETAILS

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -43,6 +43,7 @@
 node as nodemod,
 patch,
 phases,
+pycompat,
 registrar,
 repair,
 scmutil,
@@ -380,15 +381,16 @@
 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)
 finally:
 if hasmq:
 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'}),



To: pulkit, #hg-reviewers, yuja
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D1324: py3: handle keyword arguments in hgext/shelve.py

2017-11-04 Thread pulkit (Pulkit Goyal)
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/D1324

AFFECTED FILES
  hgext/shelve.py

CHANGE DETAILS

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -43,6 +43,7 @@
 node as nodemod,
 patch,
 phases,
+pycompat,
 registrar,
 repair,
 scmutil,
@@ -380,15 +381,16 @@
 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)
 finally:
 if hasmq:
 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'}),



To: pulkit, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel