Mercurial > hg
changeset 50850:65e2cb23294e
summary: migrate `opts` to native kwargs
This has the added benefit of unconfusing PyCharm- it thought `opts` in the
nested functions were str based for some reason.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 20 Aug 2023 02:10:51 -0400 |
parents | fdf97ae05165 |
children | fa675fd648a3 |
files | mercurial/commands.py |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sun Aug 20 02:01:37 2023 -0400 +++ b/mercurial/commands.py Sun Aug 20 02:10:51 2023 -0400 @@ -7115,7 +7115,6 @@ Returns 0 on success. """ - opts = pycompat.byteskwargs(opts) ui.pager(b'summary') ctx = repo[None] parents = ctx.parents() @@ -7304,11 +7303,13 @@ cmdutil.summaryhooks(ui, repo) - if opts.get(b'remote'): + if opts.get('remote'): needsincoming, needsoutgoing = True, True else: needsincoming, needsoutgoing = False, False - for i, o in cmdutil.summaryremotehooks(ui, repo, opts, None): + for i, o in cmdutil.summaryremotehooks( + ui, repo, pycompat.byteskwargs(opts), None + ): if i: needsincoming = True if o: @@ -7325,7 +7326,7 @@ try: other = hg.peer(repo, {}, path) except error.RepoError: - if opts.get(b'remote'): + if opts.get('remote'): raise return path.loc, sbranch, None, None, None branches = (path.branch, []) @@ -7364,7 +7365,7 @@ try: dother = hg.peer(repo, {}, path if path is not None else dest) except error.RepoError: - if opts.get(b'remote'): + if opts.get('remote'): raise return dest, dbranch, None, None ui.debug(b'comparing with %s\n' % urlutil.hidepassword(dest)) @@ -7390,7 +7391,7 @@ else: dest = dbranch = dother = outgoing = None - if opts.get(b'remote'): + if opts.get('remote'): # Help pytype. --remote sets both `needsincoming` and `needsoutgoing`. # The former always sets `sother` (or raises an exception if it can't); # the latter always sets `outgoing`. @@ -7421,7 +7422,7 @@ cmdutil.summaryremotehooks( ui, repo, - opts, + pycompat.byteskwargs(opts), ( (source, sbranch, sother, commoninc), (dest, dbranch, dother, outgoing),