def get_repo_info():
    """
    Retrieves raw repository information and returns it for further processing
    """
    hashlen = min_hash_length()
    if not hashlen:
        term.err("Couldn't compute the minimum hash string length")
        sys.exit(1)

    full_build_id = get_build_id()
    if not full_build_id:
        term.err("Couldn't retrieve build id information")
        sys.exit(1)

    tag = last_tag()
    if not tag:
        term.err("Couldn't retrieve the latest tag")
        sys.exit(1)

    data = data_from_tag(tag)
    if data is None:
        term.err("Couldn't retrieve version information from tag \"" + tag +
                 "\".\ngitver expects tags to be in the format "
                 "[v]X.Y.Z[.REVISION][-PRE-RELEASE-METADATA]")
        sys.exit(1)

    vcount = count_tag_to_head(tag)

    return {'maj': data['maj'],
            'min': data['min'],
            'patch': data['patch'],
            'rev': data['revision'],
            'pr': data['prmeta'],
            'count': vcount,
            'full-build-id': full_build_id,
            'build-id': full_build_id[:hashlen],
            'last-tag': tag
    }
dataset/ETHPy150Open manuelbua/gitver/gitver/git.py/get_repo_info/original