beautifygraph: don't warn about busted terminal if HGPLAIN is set stable
authorAugie Fackler <augie@google.com>
Mon, 20 Aug 2018 16:33:48 -0400
branchstable
changeset 39198 362cb82385ea
parent 39196 8c6775e812d8
child 39199 d8ac2ad55d9c
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
hgext/beautifygraph.py
--- a/hgext/beautifygraph.py	Sun Aug 19 13:27:02 2018 +0900
+++ b/hgext/beautifygraph.py	Mon Aug 20 16:33:48 2018 -0400
@@ -77,6 +77,9 @@
     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 @@
                   'monospace narrow text required\n'))
         return
 
-    if ui.plain('graph'):
-        return
-
     extensions.wrapfunction(graphmod, 'outputgraph', outputprettygraph)
     extensions.wrapfunction(templatekw, 'getgraphnode', getprettygraphnode)