

def remotes(path):
    if remote_hash.get(path):
        return remote_hash.get(path)
    command = ('cd %s && git remote -v | awk \'{ print $1 "=" $2 }\'' % path)
    output = os.popen(command).read()
    if vim:
        vim.command('redraw!')
    remotes = {
        
    }
    for line in output.splitlines():
        pieces = tuple(line.split('='))
        if remotes.has_key(pieces[0]):
            continue
        uri_pieces = re.split('[\\:,\\/]+', pieces[1])
        project_name = re.sub('\\.git$', '', uri_pieces[(- 1)])
        creator = uri_pieces[(- 2)]
        remotes[pieces[0]] = (creator, uri_pieces)
    remote_hash[path] = remotes
    return remote_hash.get(path)

dataset/ETHPy150Open jonmorehouse/vimhub/lib/git.py remotes/VarMisuse@163/228 `project_name`->`uri_pieces`