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

2018-05-22 Thread yuja (Yuya Nishihara)
yuja added a comment. >> --- 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: > > +

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

2018-05-22 Thread Yuya Nishihara
> > --- 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

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

2018-05-22 Thread Yuya Nishihara
> --- 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`.

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

2018-05-22 Thread yuja (Yuya Nishihara)
yuja added a comment. > - 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`. REPOSITORY rHG

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

2018-05-21 Thread pulkit (Pulkit Goyal)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG7aeb8aa262eb: py3: add support for NoneType in stringutil.pprint() (authored by pulkit, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

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

2018-05-20 Thread pulkit (Pulkit Goyal)
pulkit created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY There are some places in codebase where we try to print the value None, however `'%s' % None` is invalid on Python 3. So it will be good to have support in