view tests/hghaveaddon.py @ 5619:5673730db8d5 stable

evolve: clean merge state when content divergence resolution has no changes This patch backs out b723805d7fe1, which only hid the problem. Usually mergestate is cleared (or should be cleared) when creating a new changeset, but sometimes there are situations when there's nothing to commit. When solving content divergence resulted in no changes and no new changesets were created, mergestate was left untouched. That's a problem because sometimes mergestate contains files with conflicts that were already resolved by user, and such mergestate only applies to the current wdir parent. Since evolve has already dealt with the current wdir parent successfully when it reached this code, this is a good place to clean the mergestate.
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 19 Sep 2020 17:49:31 +0200
parents 398c7031177a
children f2139537c2be
line wrap: on
line source

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

@hghave.check("flake8", "Flake8 python linter")
def has_flake8():
    try:
        import flake8

        flake8.__version__
    except ImportError:
        return False
    else:
        return True