Mercurial > hg
changeset 45632:7d0e54056586
py3: use native string when comparing with a function's argspec
I only found two such bugs in `contrib/perf.py`
Differential Revision: https://phab.mercurial-scm.org/D9149
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Mon, 05 Oct 2020 10:33:52 +0200 |
parents | ede4a1bf14bd |
children | 9a6b409b8ebc |
files | contrib/perf.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/perf.py Fri Oct 02 10:29:22 2020 +0200 +++ b/contrib/perf.py Mon Oct 05 10:33:52 2020 +0200 @@ -231,7 +231,7 @@ command = registrar.command(cmdtable) elif safehasattr(cmdutil, 'command'): command = cmdutil.command(cmdtable) - if b'norepo' not in getargspec(command).args: + if 'norepo' not in getargspec(command).args: # for "historical portability": # wrap original cmdutil.command, because "norepo" option has # been available since 3.1 (or 75a96326cecb) @@ -805,7 +805,7 @@ repo.ui.quiet = True matcher = scmutil.match(repo[None]) opts[b'dry_run'] = True - if b'uipathfn' in getargspec(scmutil.addremove).args: + if 'uipathfn' in getargspec(scmutil.addremove).args: uipathfn = scmutil.getuipathfn(repo) timer(lambda: scmutil.addremove(repo, matcher, b"", uipathfn, opts)) else: