tests/hghaveaddon.py
author Pulkit Goyal <7895pulkit@gmail.com>
Sun, 22 Apr 2018 20:14:42 +0530
changeset 3742 d577cef1f044
parent 2959 ef361938dfa1
permissions -rw-r--r--
evolvecmd: add comments and new lines in content-divergence handling logic I have visited this logic three times in last 10 days and I have to re-read the whole code to make sure I don't miss any part. Adding comments will help understanding the code in better and fast way.

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