[PATCH 1 of 7] py3: handle opts uniformly in commands.py

Yuya Nishihara yuya at tcha.org
Thu May 4 00:35:00 EDT 2017


On Thu, 04 May 2017 08:46:43 +0530, Pulkit Goyal wrote:
> # HG changeset patch
> # User Pulkit Goyal <7895pulkit at gmail.com>
> # Date 1493805306 -19800
> #      Wed May 03 15:25:06 2017 +0530
> # Node ID f15cb31ed5bd3d059401731b06930e0c344e0b4d
> # Parent  c3dcec6cbc1bc3428f8d7b757a3621204a4e1742
> py3: handle opts uniformly in commands.py

Queued the series, thanks.

I found a couple of nits. Can you fix them by a follow-up patch?

> --- a/mercurial/commands.py	Fri Apr 21 01:13:18 2017 +0530
> +++ b/mercurial/commands.py	Wed May 03 15:25:06 2017 +0530
> @@ -255,6 +255,7 @@
>      Returns 0 if all files are successfully added.
>      """
>  
> +    opts = pycompat.byteskwargs(opts)
>      m = scmutil.match(repo[None], pats, opts)
>      rejected = cmdutil.add(ui, repo, m, "", False, **opts)

Needs to convert opts back to a str-key dict.

>  def _dograft(ui, repo, *revs, **opts):
> +    opts = pycompat.byteskwargs(opts)
>      if revs and opts.get('rev'):
>          ui.warn(_('warning: inconsistent use of --rev might give unexpected '
>                    'revision ordering!\n'))

cmdutil.getcommiteditor(.., **opts)

> @@ -5210,6 +5253,7 @@
>      Returns 0 on success.
>      """
>  
> +    opts = pycompat.byteskwargs(opts)
>      ui.pager('tags')
>      fm = ui.formatter('tags', opts)
>      hexfunc = fm.hexfunc

cmdutil.getcommiteditor(.., **opts)


More information about the Mercurial-devel mailing list