tests/hghaveaddon.py
author Pulkit Goyal <7895pulkit@gmail.com>
Tue, 22 May 2018 23:51:57 +0530
changeset 3758 131758265150
parent 2959 ef361938dfa1
permissions -rw-r--r--
utility: use ui.interactive() instead of checking config value Before this patch, the rev selection prompt which pops up in case of ambiguity to ask user to select a rev used to check the config value of ui.interactive which can is by default set to None. We should use ui.interactive() instead which is more smart in such cases. Thanks to martinvonz for suggesting this.

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