tests/hghaveaddon.py
author Martin von Zweigbergk <martinvonz@google.com>
Fri, 19 Apr 2019 09:41:39 -0700
changeset 4607 d314deb12f08
parent 2959 ef361938dfa1
permissions -rw-r--r--
evolve: run in a single transaction This speeds up `hg evolve --all` of a stack of 24 commits in the hg repo from 11.5s to 3.7s (3x). As can be seen in the tests, it also avoid some warnings about transiently unstable commits.

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