tests/hghaveaddon.py
author Martin von Zweigbergk <martinvonz@google.com>
Tue, 12 Mar 2019 09:44:05 -0700
changeset 4452 444e664616c7
parent 2959 ef361938dfa1
permissions -rw-r--r--
tests: reduce dependence on previous tests for setup The tests in test-evolve-phase-divergence.t built on each other for no good reason, which makes the tests hard to modify and hard to read. This patch cleans up some of them. We should clean up the rest too, but the rest won't matter for my next patch, so I haven't bothered.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2959
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     1
import hghave
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     2
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     3
@hghave.check("docgraph-ext", "Extension to generate graph from repository")
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     4
def docgraph():
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     5
    try:
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     6
        import hgext.docgraph
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     7
        hgext.docgraph.cmdtable # trigger import
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     8
    except ImportError:
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     9
        try:
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    10
            import hgext3rd.docgraph
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    11
            hgext3rd.docgraph.cmdtable # trigger import
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    12
        except ImportError:
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    13
            return False
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    14
    return True