[PATCH v2] progress: check stderr.isatty() before each print

Matt Mackall mpm at selenic.com
Mon Jun 28 23:12:47 CDT 2010


On Mon, 2010-06-28 at 20:49 -0500, Augie Fackler wrote:
> On Jun 28, 2010, at 12:51 PM, Matt Mackall wrote:
> 
> > On Sun, 2010-06-27 at 22:26 -0500, Augie Fackler wrote:
> >> # HG changeset patch
> >> # User Augie Fackler <durin42 at gmail.com>
> >> # Date 1277695247 18000
> >> # Branch stable
> >> # Node ID eefb5d1f2c45e686ac501ccba0b24f5da968e920
> >> # Parent  51021f4c80b5dcf608626ddc24b21c155df2cae8
> >> progress: check stderr.isatty() before each print
> > 
> > Ok, queued. We should try to fix this better somehow post-1.6.
> 
> Totally agree. In fact, this could be improved slightly to only check
> isatty() right before each print, once every 10th of a second instead
> of every progress call. Should I resend that way? (That occurred to me
> this afternoon while idly wondering what a better fix looks like.)

Please.

Something for future us to consider: a way to hook into the config
object such that changes to a given item would trigger a callback. Then
code that cared about ui.plain() could get notified when the mode was
activated.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list