

def get_revisions(old, new):
    git = subprocess.Popen(['git', 'rev-list', '--pretty=medium', ('%s..%s' % (old, new))], stdout=subprocess.PIPE)
    sections = git.stdout.read().split('\n\n')[:(- 1)]
    revisions = []
    s = 0
    while (s < len(sections)):
        lines = sections[s].split('\n')
        props = {
            'id': lines[0].strip().split(' ')[1],
        }
        for l in lines[1:]:
            (key, val) = l.split(' ', 1)
            props[key[:(- 1)].lower()] = val.strip()
        props['message'] = sections[(old + 1)].strip()
        basetime = datetime.strptime(props['date'][:(- 6)], '%a %b %d %H:%M:%S %Y')
        tzstr = props['date'][(- 5):]
        props['date'] = (basetime.strftime('%Y-%m-%dT%H:%M:%S') + tzstr)
        m = EMAIL_RE.match(props['author'])
        if m:
            props['name'] = m.group(1)
            props['email'] = m.group(2)
        else:
            props['name'] = 'unknown'
            props['email'] = 'unknown'
        del props['author']
        s += 2
        revisions.append(props)
    return revisions

dataset/ETHPy150Open madzak/tfs-git-hook/lib/git.py get_revisions/VarMisuse@181/214 `s`->`old`