tests/hghaveaddon.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 13 Sep 2018 18:21:07 +0200
branchstable
changeset 4097 4ea2a813b82c
parent 2959 ef361938dfa1
permissions -rw-r--r--
obscache: ignore permission and OS errors when writing In practice we always update this cache along side a new transaction, with lock taken so permission issues should not happens. However, staying on the safe side is better. Errors during Cache update should not block Mercurial operations.

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