'Check to make sure the repo is in a sane state:
ensure we have at least XX amount of free space
Make sure we can write to the repo'

def repo_check(self, repo):

    if ((not repo.startswith('/')) and (not repo.startswith('ssh:'))):
        return
    try:
        create_directory(repo)
        check_diskspace(repo)
        check_write(repo)
    except (error.RepoWriteError, error.RepoUnknownError, error.RepoDiskFullError) as e:
        raise error.RepoError(('ERROR:    Repo    %s:    %s' % (repo, e)))
