tests/hghaveaddon.py
author Anton Shestakov <av6@dwimlabs.net>
Fri, 15 Nov 2019 11:37:34 +0700
changeset 4942 acc7e27fa5c6
parent 2959 ef361938dfa1
permissions -rw-r--r--
topic: drop compat.getmarkers() and use obsutil.getmarkers() directly The function in question was moved from obsolete to obsutil in a14e2e7f7d1f (hg 4.3). See also 6aff4bb3970d for hgext3rd/evolve.

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