view tests/testlib/graphviz_setup.sh @ 2950:1b4c92621e23

doc: integrate graphviz graphs in tutorials Use the mercurial-graphviz extension (https://bitbucket.org/octobus/mercurial_graphviz) in tutorials in order to have some dot graphs in the tutorials .t files. In order to run the tests, export the GRAPHVIZ_EXTENSION variable which points to your copy of the extension. Please be aware that pygraphviz should be installed in your environment. That should be sufficient for generating dot graphs in text format. Then generate the doc as usual, the sphinx-graphviz extension (http://www .sphinx-doc.org/en/stable/ext/graphviz.html) has been added and it should handle the generation of the graphs. Please be aware that you need the dot binary installed in your system. Please refer to the extension documentation for more configuration.
author Boris Feld <boris.feld@octobus.net>
date Tue, 29 Aug 2017 16:42:40 +0200
parents
children
line wrap: on
line source

. $TESTDIR/testlib/pythonpath.sh

if ! test -z "${GRAPHVIZ_EXTENSION}"; then

cat >> $HGRCPATH << EOF
[extensions]
graphviz=${GRAPHVIZ_EXTENSION}/hgext3rd/graphviz.py
EOF

else

cat >> $HGRCPATH << EOF
[alias]
graphviz=log -r "0" -Tt
EOF

fi