def METHOD_NAME(c: Connection):
    """ Compare against remote/master, ensure there is no local modifications or
    commits """
    uncommitted_change = c.run(
        'hg summary | grep -q "commit: (clean)";'
        'echo $?', hide=True, warn=True,
    ).stdout == "1"
    local_commit_hash = c.run(
        'hg identify -i',
        hide=True, warn=True,
    ).stdout.replace('+', '').split()[0]
    remote_commit_hash = c.run(
        'hg identify -r remote/master',
        hide=True, warn=True,
    ).stdout.split()[0]
    if uncommitted_change:
        changes = [
            os.path.realpath(x.split()[1])
            for x in c.run('hg status', capture=True).split('\n')
        ]
        if set(changes) <= set(EXCLUDE_FILE_LIST):
            print(
                "Local changes detected in the following files from the "
                "EXCLUDE_FILE_LIST are ignored:\n%s" % '\n'.join(changes),
            )
            return False
        else:
            print("Warning: uncommitted changes found!!!")
            return True
    elif local_commit_hash != remote_commit_hash:
        print("Warning: local commits found compared against remote/master\
               !!!")
        return True
    else:
        return False