Mercurial > hg
comparison mercurial/dispatch.py @ 30586:2d555d753f0e
py3: make keys of keyword arguments strings
keys of keyword arguments on Python 3 has to be string. We are dealing with
bytes in our codebase so the keys are also bytes. Done that using
pycompat.strkwargs().
Also after this patch, `hg version` now runs on Python 3.5. Hurray!
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 13 Dec 2016 20:53:40 +0530 |
parents | 541949a10a68 |
children | b2be4ccaff1d |
comparison
equal
deleted
inserted
replaced
30585:0f865311ae3f | 30586:2d555d753f0e |
---|---|
801 elif rpath: | 801 elif rpath: |
802 ui.warn(_("warning: --repository ignored\n")) | 802 ui.warn(_("warning: --repository ignored\n")) |
803 | 803 |
804 msg = ' '.join(' ' in a and repr(a) or a for a in fullargs) | 804 msg = ' '.join(' ' in a and repr(a) or a for a in fullargs) |
805 ui.log("command", '%s\n', msg) | 805 ui.log("command", '%s\n', msg) |
806 d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) | 806 strcmdopt = pycompat.strkwargs(cmdoptions) |
807 d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) | |
807 try: | 808 try: |
808 return runcommand(lui, repo, cmd, fullargs, ui, options, d, | 809 return runcommand(lui, repo, cmd, fullargs, ui, options, d, |
809 cmdpats, cmdoptions) | 810 cmdpats, cmdoptions) |
810 finally: | 811 finally: |
811 if repo and repo != req.repo: | 812 if repo and repo != req.repo: |