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
Resolve some services for an XRI.
dataset/ETHPy150Open zerok/zerokspot.gitrecipe/zerokspot/recipe/git/__init__.py/get_reponame--crossover with--dataset/ETHPy150Open CollabQ/CollabQ/openid/yadis/xrires.py/ProxyResolver.query