tests/hghaveaddon.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 02 Mar 2018 19:33:20 -0500
branchstable
changeset 3510 3bd642f11313
parent 2959 ef361938dfa1
permissions -rw-r--r--
legacy: respect explicit config for server.bundle1 Unconditionally disabling bundle1 is a problem for larger hosting website. We adopt a less aggressive approach and only disable it the default would be used.

import hghave

@hghave.check("docgraph-ext", "Extension to generate graph from repository")
def docgraph():
    try:
        import hgext.docgraph
        hgext.docgraph.cmdtable # trigger import
    except ImportError:
        try:
            import hgext3rd.docgraph
            hgext3rd.docgraph.cmdtable # trigger import
        except ImportError:
            return False
    return True