# HG changeset patch # User Augie Fackler # Date 2018-08-20 20:33:48 # Node ID 362cb82385ea06c5d51907072a86383ec953fc11 # Parent 8c6775e812d8423a8910be47048c8313a98847f3 beautifygraph: don't warn about busted terminal if HGPLAIN is set This was breaking some automation for users that discovered the extension and turned it on. Differential Revision: https://phab.mercurial-scm.org/D4338 diff --git a/hgext/beautifygraph.py b/hgext/beautifygraph.py --- a/hgext/beautifygraph.py +++ b/hgext/beautifygraph.py @@ -77,6 +77,9 @@ def outputprettygraph(orig, ui, graph, * return orig(ui, graph, *args, **kwargs) def extsetup(ui): + if ui.plain('graph'): + return + if encoding.encoding != 'UTF-8': ui.warn(_('beautifygraph: unsupported encoding, UTF-8 required\n')) return @@ -86,8 +89,5 @@ def extsetup(ui): 'monospace narrow text required\n')) return - if ui.plain('graph'): - return - extensions.wrapfunction(graphmod, 'outputgraph', outputprettygraph) extensions.wrapfunction(templatekw, 'getgraphnode', getprettygraphnode)