tests/hghaveaddon.py
author Pulkit Goyal <7895pulkit@gmail.com>
Wed, 19 Feb 2020 13:13:09 +0530
branchstable
changeset 5132 fb5f49be3c90
parent 2959 ef361938dfa1
permissions -rw-r--r--
topic: use `%d` for integers instead of `%s` on py3 I have system mercurial using py3 which lead me to the traceback pointing to 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