Submitter | Augie Fackler |
---|---|
Date | March 19, 2017, 6:11 a.m. |
Message ID | <6823ee960b6e67f6fb6e.1489903894@imladris.local> |
Download | mbox | patch |
Permalink | /patch/19439/ |
State | Accepted |
Headers | show |
Comments
On Sun, 19 Mar 2017 02:11:34 -0400, Augie Fackler wrote: > # HG changeset patch > # User Augie Fackler <augie@google.com> > # Date 1489897324 14400 > # Sun Mar 19 00:22:04 2017 -0400 > # Node ID 6823ee960b6e67f6fb6e91f6266b060deac8e7d0 > # Parent 18c8a3ed2c4da13676038dccbf8359e00f55a5b1 > dispatch: ensure repr is bytes in _mayberepr Queued, but found a nit. > --- a/mercurial/dispatch.py > +++ b/mercurial/dispatch.py > @@ -94,7 +94,7 @@ def _formatparse(write, inst): > > def _mayberepr(a): > if ' ' in a: > - return repr(a) > + return encoding.strtolocal(repr(a)) repr() of bytes has b'' prefix on Python 3, which wouldn't be what we want. Maybe we can use util.shellquote() to format command args.
Patch
diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -94,7 +94,7 @@ def _formatparse(write, inst): def _mayberepr(a): if ' ' in a: - return repr(a) + return encoding.strtolocal(repr(a)) return a def _formatargs(args):