> > --- 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`. Dropped this patch from hg-committed before sinking deep.