tests/hghaveaddon.py
author Gregory Szorc <gregory.szorc@gmail.com>
Mon, 17 Sep 2018 09:25:28 -0700
branchstable
changeset 4119 c4b891fe44c3
parent 2959 ef361938dfa1
permissions -rw-r--r--
obsdiscovery: adopt to calling convention change Upstream commits 71d83b315778 and abce899c985f changed the calling convention of setdiscovery._takefullsample(). We inspect the signature of the function before calling it so we can pass the proper arguments.

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