D3635: py3: add support for NoneType in stringutil.pprint()

Yuya Nishihara yuya at tcha.org
Tue May 22 07:23:39 EDT 2018


> --- a/mercurial/utils/stringutil.py
> +++ b/mercurial/utils/stringutil.py
> @@ -29,6 +29,8 @@
>          if bprefix:
>              return "b'%s'" % escapestr(o)
>          return "'%s'" % escapestr(o)
> +    elif o is None:
> +        return 'None'

Should be handled by `b'%r' % o`.


More information about the Mercurial-devel mailing list