hgext/beautifygraph.py
changeset 39262 5b9f116104f9
parent 39054 de3a9d7ec1c2
parent 39198 362cb82385ea
child 40457 c2a0bc6412db
--- a/hgext/beautifygraph.py	Fri Aug 24 10:19:31 2018 -0700
+++ b/hgext/beautifygraph.py	Fri Aug 24 12:55:05 2018 -0700
@@ -80,6 +80,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
@@ -89,8 +92,5 @@
                   'monospace narrow text required\n'))
         return
 
-    if ui.plain('graph'):
-        return
-
     extensions.wrapfunction(graphmod, 'outputgraph', outputprettygraph)
     extensions.wrapfunction(templatekw, 'getgraphnode', getprettygraphnode)