[PATCH 1 of 7] py3: handle opts uniformly in commands.py
Pulkit Goyal
7895pulkit at gmail.com
Thu May 4 16:27:00 EDT 2017
On Thu, May 4, 2017 at 10:05 AM, Yuya Nishihara <yuya at tcha.org> wrote:
> 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?
>
Yeah sure, why not. :)
>
> > --- 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.
>
One of the later patch named "py3: handle opts correctly for `hg add`"
fixed this one.
>
> > 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)
>
I don't see opts being used in cmdutil.getcommiteditor(). Do you have any
idea why opts is there? I should better have a patch removing opts from
that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170505/97459b44/attachment.html>
More information about the Mercurial-devel
mailing list