tests/hghaveaddon.py
author Martin von Zweigbergk <martinvonz@google.com>
Fri, 19 Apr 2019 11:12:00 -0700
changeset 4609 fe2999627556
parent 2959 ef361938dfa1
permissions -rw-r--r--
next: start transaction before calling _solveone() All other callers do this, and I'm about to make _solveone() not create a transaction.

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