From patchwork Thu May 24 02:28:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2,of,2] py3: replace str.format(x) with `str % x` in githelp From: Matt Harbison X-Patchwork-Id: 31826 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Wed, 23 May 2018 22:28:53 -0400 # HG changeset patch # User Matt Harbison # Date 1527128700 14400 # Wed May 23 22:25:00 2018 -0400 # Node ID c3960c7e66fad7436f1a550ef1de693a635faa3a # Parent cfa93fbbe9b4ee98d66a7dc55cb0224c4cf03e9f py3: replace str.format(x) with `str % x` in githelp diff --git a/hgext/githelp.py b/hgext/githelp.py --- a/hgext/githelp.py +++ b/hgext/githelp.py @@ -94,9 +94,9 @@ def parseoptions(ui, cmdoptions, args): try: args.remove(flag) except Exception: - msg = _("unknown option '{0}' packed with other options") - hint = _("please try passing the option as its own flag: -{0}") - raise error.Abort(msg.format(ex.opt), hint=hint.format(ex.opt)) + msg = _("unknown option '%s' packed with other options") + hint = _("please try passing the option as its own flag: -%s") + raise error.Abort(msg % ex.opt, hint=hint % ex.opt) ui.warn(_("ignoring unknown option %s\n") % flag)