'Create a IgnoreFilterManager from a repository.
:param repo: Repository object
:return: A `IgnoreFilterManager` object'

@classmethod
def from_repo(cls, repo):

    global_filters = []
    for p in [os.path.join(repo.controldir(), 'info', 'exclude'), default_user_ignore_filter_path(repo.get_config_stack())]:
        try:
            global_filters.append(IgnoreFilter.from_path(p))
        except IOError:
            pass
    config = repo.get_config_stack()
    ignorecase = config.get_boolean('core', 'ignorecase', False)
    return cls(repo.path, global_filters, ignorecase)
