# HG changeset patch # User Augie Fackler # Date 1489900808 14400 # Node ID 2abba5068aa13b1a8ad3404d3d059e724fdbf420 # Parent 28f00d07e2ee1433ba7af9eeedfca1b60226dc24 commit: keep opts as byteskwargs as much as possible This fixes many flag-handling bugs on 'hg commit' in Python 3. diff -r 28f00d07e2ee -r 2abba5068aa1 mercurial/commands.py --- 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'),