From patchwork Mon Jun 26 13:24:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1,of,6] py3: fix kwargs handling for `hg bookmarks` From: Pulkit Goyal <7895pulkit@gmail.com> X-Patchwork-Id: 21730 Message-Id: <1120675d6f0a18ff35eb.1498483482@workspace> To: mercurial-devel@mercurial-scm.org Date: Mon, 26 Jun 2017 18:54:42 +0530 # HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1498314301 -19800 # Sat Jun 24 19:55:01 2017 +0530 # Node ID 1120675d6f0a18ff35ebdd799a7e0b54d4fafcfc # Parent a49ab7f5e7e765a94a1dfab2ee3b1da695789eb6 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 @@ error, lock as lockmod, obsolete, + pycompat, scmutil, txnutil, util, @@ -771,6 +772,7 @@ 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 @@ 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"))