tests/hghaveaddon.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 17 Oct 2018 14:47:38 +0200
branchstable
changeset 4190 883e75e0a810
parent 2959 ef361938dfa1
permissions -rw-r--r--
topicidx: stop assigning index number to obsolete changesets Obsolete changeset are no longer part of the stack, the old logic tried to assigns them the index of their successors but this is flacky and error prone. So we stop doing so.

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