tests/hghaveaddon.py
author Pulkit Goyal <7895pulkit@gmail.com>
Tue, 12 Dec 2017 00:27:08 +0530
changeset 3283 039c4b8dc3ed
parent 2959 ef361938dfa1
permissions -rw-r--r--
obsnote: warn if user try to store a note in obsmarker on an older hg Support to store a note in obsmarker is from hg>=4.4. We have added notes support to all the evolve commands but we do support versions which don't support storing note in obsmarker. Warn if user tries to store a note in older hg.

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