Mercurial > hg
changeset 31534:2abba5068aa1
commit: keep opts as byteskwargs as much as possible
This fixes many flag-handling bugs on 'hg commit' in Python 3.
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 19 Mar 2017 01:20:08 -0400 |
parents | 28f00d07e2ee |
children | d0f95ecca2ad |
files | mercurial/commands.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Mar 19 01:19:27 2017 -0400 +++ b/mercurial/commands.py Sun Mar 19 01:20:08 2017 -0400 @@ -1636,10 +1636,12 @@ release(lock, wlock) def _docommit(ui, repo, *pats, **opts): + opts = pycompat.byteskwargs(opts) if opts.get('interactive'): opts.pop('interactive') ret = cmdutil.dorecord(ui, repo, commit, None, False, - cmdutil.recordfilter, *pats, **opts) + cmdutil.recordfilter, *pats, + **pycompat.strkwargs(opts)) # ret can be 0 (no changes to record) or the value returned by # commit(), 1 if nothing changed or None on success. return 1 if ret == 0 else ret @@ -1711,7 +1713,8 @@ with ui.configoverride(overrides, 'commit'): editform = cmdutil.mergeeditform(repo[None], 'commit.normal') - editor = cmdutil.getcommiteditor(editform=editform, **opts) + editor = cmdutil.getcommiteditor( + editform=editform, **pycompat.strkwargs(opts)) return repo.commit(message, opts.get('user'), opts.get('date'),