[PATCH 01 of 13] ui: add ui.write() output labeling API

Gilles Moris gilles.moris at free.fr
Wed Mar 31 15:10:06 CDT 2010


On Wednesday 31 March 2010 07:09:29 pm Brodie Rao wrote:
> On Mar 31, 2010, at 12:33 PM, Matt Mackall wrote:
> > On Wed, 2010-03-31 at 10:00 -0500, Brodie Rao wrote:
> >> class ui(object):
> >>     def __init__(self, src=None):
> >> -        self._buffers = []
> >> +        self.buffers = []
> >
> > Uh, have we decided that buffers is now a public member?
>
> Anyone wrapping write/write_err and popbuffer() will also need access to
> buffers. You can see this usage in the patch against hgext/color.py. Do you
> think this is a bad idea?
>

Has the option of deriving the ui class in color.py been already considered ?
Could it be an option ?
This would avoid making _buffer public.

Regards.
Gilles.


More information about the Mercurial-devel mailing list