# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2017-06-24 14:25:01 # Node ID d170f59f6f55dedae8746fe4b8b45b09f4b765b4 # Parent 73dfc72704b6147797b7bfb32a971e8aa9310c33 py3: fix kwargs handling for `hg bookmarks` diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py --- a/mercurial/bookmarks.py +++ b/mercurial/bookmarks.py @@ -20,6 +20,7 @@ from . import ( error, lock as lockmod, obsolete, + pycompat, scmutil, txnutil, util, @@ -771,6 +772,7 @@ def _printbookmarks(ui, repo, bmarks, ** Provides a way for extensions to control how bookmarks are printed (e.g. prepend or postpend names) """ + opts = pycompat.byteskwargs(opts) fm = ui.formatter('bookmarks', opts) hexfn = fm.hexfunc if len(bmarks) == 0 and fm.isplain(): diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -944,12 +944,11 @@ def bookmark(ui, repo, *names, **opts): hg book -f @ ''' - opts = pycompat.byteskwargs(opts) - force = opts.get('force') - rev = opts.get('rev') - delete = opts.get('delete') - rename = opts.get('rename') - inactive = opts.get('inactive') + force = opts.get(r'force') + rev = opts.get(r'rev') + delete = opts.get(r'delete') + rename = opts.get(r'rename') + inactive = opts.get(r'inactive') if delete and rename: raise error.Abort(_("--delete and --rename are incompatible"))