[PATCH 1 of 4] formatter: use stringutil.pprint() in debug output to drop b''

Gregory Szorc gregory.szorc at gmail.com
Sun Oct 14 03:39:14 EDT 2018


On Sun, Oct 14, 2018 at 8:34 AM Yuya Nishihara <yuya at tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1539492679 -7200
> #      Sun Oct 14 06:51:19 2018 +0200
> # Node ID b28a63d39d280a081a2de1f96c5c7276aef6a0e1
> # Parent  8783710b1d58d2ccc0f611904af244a1dde214d4
> formatter: use stringutil.pprint() in debug output to drop b''
>

Queued, thanks.


>
> diff --git a/mercurial/formatter.py b/mercurial/formatter.py
> --- a/mercurial/formatter.py
> +++ b/mercurial/formatter.py
> @@ -129,7 +129,10 @@ from . import (
>      templateutil,
>      util,
>  )
> -from .utils import dateutil
> +from .utils import (
> +    dateutil,
> +    stringutil,
> +)
>
>  pickle = util.pickle
>
> @@ -321,7 +324,7 @@ class debugformatter(baseformatter):
>          self._out = out
>          self._out.write("%s = [\n" % self._topic)
>      def _showitem(self):
> -        self._out.write('    %s,\n' % pycompat.byterepr(self._item))
> +        self._out.write('    %s,\n' % stringutil.pprint(self._item))
>      def end(self):
>          baseformatter.end(self)
>          self._out.write("]\n")
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20181014/60b9183f/attachment.html>


More information about the Mercurial-devel mailing list