tests/hghaveaddon.py
author Anton Shestakov <av6@dwimlabs.net>
Sun, 27 Jan 2019 17:39:09 +0800
changeset 4379 2893b127923b
parent 2959 ef361938dfa1
permissions -rw-r--r--
topic: make ranges work in revset relations like 'foo#topic[1:2]' Since #topic is very similar to #generations, we reuse the function directly. Few tests because #generations is already tested in core.

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