fereria
8/16/2017 - 4:45 AM

svn_update.py

import subprocess
import sys

def get_update_file(buff):

    buff = buff.decode('cp932').split("\n")
    ret_val = []
    for i in buff:
        ret_val.append(os.path.basename(i.strip()))
    return ret_val

revision_code = sys.argv[2]
repository = sys.argv[1]

description = subprocess.check_output('svnlook log {0} --revision {1}'.format(repository, revision_code))
author = subprocess.check_output('svnlook author {0} --revision {1}'.format(repository, revision_code)).strip()
change_file = get_update_file(subprocess.check_output('svnlook changed {0} --revision {1}'.format(repository, revision_code)))