tests/hghaveaddon.py
author Martin von Zweigbergk <martinvonz@google.com>
Tue, 09 Jul 2019 10:56:42 -0700
changeset 4718 23323092f0a7
parent 2959 ef361938dfa1
permissions -rw-r--r--
py3: convert _origdoc to sysstr to match __doc__ It's currently stored as bytes by core, so we need to convert it to match Python's expected type for __doc__. This patch can be dropped if D6623 gets accepted.

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