##// END OF EJS Templates
py3: handle keyword arguments in hgext/shelve.py...
Pulkit Goyal -
r35006:aad6b9fd default
parent child Browse files
Show More
@@ -43,6 +43,7 from mercurial import (
43 node as nodemod,
43 node as nodemod,
44 patch,
44 patch,
45 phases,
45 phases,
46 pycompat,
46 registrar,
47 registrar,
47 repair,
48 repair,
48 scmutil,
49 scmutil,
@@ -380,7 +381,7 def getcommitfunc(extra, interactive, ed
380 editor_ = False
381 editor_ = False
381 if editor:
382 if editor:
382 editor_ = cmdutil.getcommiteditor(editform='shelve.shelve',
383 editor_ = cmdutil.getcommiteditor(editform='shelve.shelve',
383 **opts)
384 **pycompat.strkwargs(opts))
384 with repo.ui.configoverride(overrides):
385 with repo.ui.configoverride(overrides):
385 return repo.commit(message, shelveuser, opts.get('date'),
386 return repo.commit(message, shelveuser, opts.get('date'),
386 match, editor=editor_, extra=extra)
387 match, editor=editor_, extra=extra)
@@ -389,6 +390,7 def getcommitfunc(extra, interactive, ed
389 repo.mq.checkapplied = saved
390 repo.mq.checkapplied = saved
390
391
391 def interactivecommitfunc(ui, repo, *pats, **opts):
392 def interactivecommitfunc(ui, repo, *pats, **opts):
393 opts = pycompat.byteskwargs(opts)
392 match = scmutil.match(repo['.'], pats, {})
394 match = scmutil.match(repo['.'], pats, {})
393 message = opts['message']
395 message = opts['message']
394 return commitfunc(ui, repo, message, match, opts)
396 return commitfunc(ui, repo, message, match, opts)
@@ -465,7 +467,7 def _docreatecmd(ui, repo, pats, opts):
465 else:
467 else:
466 node = cmdutil.dorecord(ui, repo, commitfunc, None,
468 node = cmdutil.dorecord(ui, repo, commitfunc, None,
467 False, cmdutil.recordfilter, *pats,
469 False, cmdutil.recordfilter, *pats,
468 **opts)
470 **pycompat.strkwargs(opts))
469 if not node:
471 if not node:
470 _nothingtoshelvemessaging(ui, repo, pats, opts)
472 _nothingtoshelvemessaging(ui, repo, pats, opts)
471 return 1
473 return 1
@@ -852,6 +854,7 def unshelve(ui, repo, *shelved, **opts)
852 return _dounshelve(ui, repo, *shelved, **opts)
854 return _dounshelve(ui, repo, *shelved, **opts)
853
855
854 def _dounshelve(ui, repo, *shelved, **opts):
856 def _dounshelve(ui, repo, *shelved, **opts):
857 opts = pycompat.byteskwargs(opts)
855 abortf = opts.get('abort')
858 abortf = opts.get('abort')
856 continuef = opts.get('continue')
859 continuef = opts.get('continue')
857 if not abortf and not continuef:
860 if not abortf and not continuef:
@@ -1010,6 +1013,7 def shelvecmd(ui, repo, *pats, **opts):
1010 To delete specific shelved changes, use ``--delete``. To delete
1013 To delete specific shelved changes, use ``--delete``. To delete
1011 all shelved changes, use ``--cleanup``.
1014 all shelved changes, use ``--cleanup``.
1012 '''
1015 '''
1016 opts = pycompat.byteskwargs(opts)
1013 allowables = [
1017 allowables = [
1014 ('addremove', {'create'}), # 'create' is pseudo action
1018 ('addremove', {'create'}), # 'create' is pseudo action
1015 ('unknown', {'create'}),
1019 ('unknown', {'create'}),
General Comments 0
You need to be logged in to leave comments. Login now