tests/hghaveaddon.py
author Martin von Zweigbergk <martinvonz@google.com>
Thu, 18 Oct 2018 22:11:43 -0700
branchstable
changeset 4191 5c734be63c3e
parent 2959 ef361938dfa1
permissions -rw-r--r--
evolve: adapt for changed @command decorator Core changed the hacky "^command" syntax to be a proper decorator option in fa88170c10bb (help: adding a proper declaration for shortlist/basic commands (API), 2018-10-12). This patch makes evolve compatible with that.

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