tests/hghaveaddon.py
author Boris Feld <boris.feld@octobus.net>
Wed, 14 Feb 2018 09:46:56 +0100
changeset 3499 512706514555
parent 2959 ef361938dfa1
permissions -rw-r--r--
obsfate: fix changeset description diff computing Mercurial core 8b6dd3922f70 changed the mdiff.unidiff API. Add a new compat method for all supported Mercurial versions.

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