def get_reponame(url, branch = None, rev = None):
    base = filter(lambda x: len(x), url.split('/'))[-1]
    if base.endswith('.git'):
        base = base[:-4]

    if rev != None or branch != None:
        base = base + '@' + (rev or branch)
    return base
Given the URL of a repository, this function returns the name of it after
dataset/ETHPy150Open zerok/zerokspot.gitrecipe/zerokspot/recipe/git/__init__.py/get_reponame