tests/hghaveaddon.py
author Martin von Zweigbergk <martinvonz@google.com>
Sat, 19 Oct 2019 10:42:09 -0700
changeset 4907 0ce6510b45ab
parent 2959 ef361938dfa1
permissions -rw-r--r--
obsexchange: delete dead code for old exchange protocol Dead since 79a926b557f1 (compat: drop support for older exchange protocol, 2017-10-25).

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