Mercurial > hg
comparison hgext/beautifygraph.py @ 39198:362cb82385ea stable
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
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 20 Aug 2018 16:33:48 -0400 |
parents | 9abe91a503da |
children | 5b9f116104f9 |
comparison
equal
deleted
inserted
replaced
39196:8c6775e812d8 | 39198:362cb82385ea |
---|---|
75 (edges, text) = zip(*graph) | 75 (edges, text) = zip(*graph) |
76 graph = zip([convertedges(e) for e in edges], text) | 76 graph = zip([convertedges(e) for e in edges], text) |
77 return orig(ui, graph, *args, **kwargs) | 77 return orig(ui, graph, *args, **kwargs) |
78 | 78 |
79 def extsetup(ui): | 79 def extsetup(ui): |
80 if ui.plain('graph'): | |
81 return | |
82 | |
80 if encoding.encoding != 'UTF-8': | 83 if encoding.encoding != 'UTF-8': |
81 ui.warn(_('beautifygraph: unsupported encoding, UTF-8 required\n')) | 84 ui.warn(_('beautifygraph: unsupported encoding, UTF-8 required\n')) |
82 return | 85 return |
83 | 86 |
84 if 'A' in encoding._wide: | 87 if 'A' in encoding._wide: |
85 ui.warn(_('beautifygraph: unsupported terminal settings, ' | 88 ui.warn(_('beautifygraph: unsupported terminal settings, ' |
86 'monospace narrow text required\n')) | 89 'monospace narrow text required\n')) |
87 return | 90 return |
88 | 91 |
89 if ui.plain('graph'): | |
90 return | |
91 | |
92 extensions.wrapfunction(graphmod, 'outputgraph', outputprettygraph) | 92 extensions.wrapfunction(graphmod, 'outputgraph', outputprettygraph) |
93 extensions.wrapfunction(templatekw, 'getgraphnode', getprettygraphnode) | 93 extensions.wrapfunction(templatekw, 'getgraphnode', getprettygraphnode) |