tests/hghaveaddon.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 13 Sep 2018 19:22:03 +0200
branchstable
changeset 4104 a023abd12f3b
parent 2959 ef361938dfa1
permissions -rw-r--r--
stablesortcache: update the variable tracking on-disk state after write Since we updated the on disk content, we should update that value. In practice the object will likely be discarded after the write, but there is nothing wrong in being more correct.

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