tests/hghaveaddon.py
author Martin von Zweigbergk <martinvonz@google.com>
Wed, 30 Jan 2019 10:03:00 -0800
changeset 4393 159a4a6ded0b
parent 2959 ef361938dfa1
permissions -rw-r--r--
prompts: use 1-indexing in revselectionprompt() The consumer is generally a human, not a computer. I've made the mistake of entering "1" instead of "0" a few times myself.

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