'Inspect the received repository\'s contents to determine if they abide by the rules defined for
the contents of this type.  If the received revisions_to_check is a list of changeset revisions,
then inspection will be restricted to the revisions in the list.'

def is_valid_for_type(self, app, repository, revisions_to_check=None):

    repo = hg.repository(ui.ui(), repository.repo_path(app))
    if revisions_to_check:
        changeset_revisions = revisions_to_check
    else:
        changeset_revisions = repo.changelog
    for changeset in changeset_revisions:
        ctx = repo.changectx(changeset)
        files_changed_in_changeset = ctx.files()
        for file_path in files_changed_in_changeset:
            file_name = basic_util.strip_path(file_path)
            if (file_name not in self.valid_file_names):
                return False
    return True
